From 84c674fee05fc0d6657fb3c2ec42d4ce98274577 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 6 Feb 2023 13:44:54 -0500 Subject: [PATCH 1/2] Revert "Cirrus: Emergency fix to un-stuck PRs" This reverts commit 6b3073f53e63c824b349266d45a58a6d8fe02e98. Signed-off-by: Chris Evich --- contrib/cirrus/prebuild.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/cirrus/prebuild.sh b/contrib/cirrus/prebuild.sh index 480d9f83a3..583f26bf5f 100755 --- a/contrib/cirrus/prebuild.sh +++ b/contrib/cirrus/prebuild.sh @@ -46,8 +46,7 @@ if [[ "${DISTRO_NV}" =~ fedora ]]; then showrun ${SCRIPT_BASE}/lib.sh.t export PREBUILD=1 - # TODO: Disabled due to test failure breaking all PRs - # showrun bash ${CIRRUS_WORKING_DIR}/.github/actions/check_cirrus_cron/test.sh + showrun bash ${CIRRUS_WORKING_DIR}/.github/actions/check_cirrus_cron/test.sh fi msg "Checking 3rd party network service connectivity" From 50f72fe7b1ad41bc4ca54db2aa412ef6cd5e6c5a Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 6 Feb 2023 13:45:35 -0500 Subject: [PATCH 2/2] [CI:BUILD] Cirrus: Fix GraphQL ownerRepository:null error A semantic change to a Cirrus-CI GraphQL API parameter caused a unit-test to fail (as it should have) with the error: ``` Query result did not pass filter '.data.ownerRepository.cronSettings': '{"data":{"ownerRepository":null}}' ``` As per Cirrus-support, a change was introduced in schema affecting certain fields that were incorrectly marked Nullable. They indicated the `platform` field was set incorrectly, and should use the value `github`. * Fix the platform field's value to `github` instead of `LINUX`. * Change the unit-test to only execute as part of the 'main' cirrus-cron job so it cannot impact PRs. Signed-off-by: Chris Evich --- .github/actions/check_cirrus_cron/cron_failures.sh | 2 +- contrib/cirrus/prebuild.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/actions/check_cirrus_cron/cron_failures.sh b/.github/actions/check_cirrus_cron/cron_failures.sh index 2d007d0a71..f4d11613ec 100755 --- a/.github/actions/check_cirrus_cron/cron_failures.sh +++ b/.github/actions/check_cirrus_cron/cron_failures.sh @@ -19,7 +19,7 @@ confirm_gha_environment mkdir -p ./artifacts cat > ./artifacts/query_raw.json << "EOF" query { - ownerRepository(platform: "LINUX", owner: "@@OWNER@@", name: "@@REPO@@") { + ownerRepository(platform: "github", owner: "@@OWNER@@", name: "@@REPO@@") { cronSettings { name lastInvocationBuild { diff --git a/contrib/cirrus/prebuild.sh b/contrib/cirrus/prebuild.sh index 583f26bf5f..10f799f575 100755 --- a/contrib/cirrus/prebuild.sh +++ b/contrib/cirrus/prebuild.sh @@ -45,8 +45,15 @@ if [[ "${DISTRO_NV}" =~ fedora ]]; then # Tests for lib.sh showrun ${SCRIPT_BASE}/lib.sh.t - export PREBUILD=1 - showrun bash ${CIRRUS_WORKING_DIR}/.github/actions/check_cirrus_cron/test.sh + # Run this during daily cron job to prevent a GraphQL API change/breakage + # from impacting every PR. Down-side being if it does fail, a maintainer + # will need to do some archaeology to find it. + # Defined by CI system + # shellcheck disable=SC2154 + if [[ "$CIRRUS_CRON" == "main" ]]; then + export PREBUILD=1 + showrun bash ${CIRRUS_WORKING_DIR}/.github/actions/check_cirrus_cron/test.sh + fi fi msg "Checking 3rd party network service connectivity"