From a3b21be30ff112035fb9f6bb623cc9f48a232074 Mon Sep 17 00:00:00 2001 From: dislbenn Date: Fri, 21 Aug 2026 13:15:40 -0400 Subject: [PATCH] ocm-ci-fastforward-multiple: fail job when repos skipped for no write access Previously, repos skipped due to lacking write access (revoked token, org membership change, repo transferred, etc.) were recorded in SKIPPED_NO_ACCESS and printed in the summary, but never affected exit_code. The job could therefore report success to Prow even though some repos were silently unreachable, and the Slack alert configured for stolostron/acm-config in _prowconfig.yaml (which only fires on failure/error job states) never triggered. Now, if SKIPPED_NO_ACCESS is non-empty, exit_code is OR'd with 1 before the final exit, causing Prow to report failure and the Slack alert to fire. The job still completes its full run first (fast-forwarding and Tekton work continues normally for all reachable repos); only the final exit status is affected. Intentional skips (SKIPPED_REPOS, SKIP_VERSIONS_PATH) are unaffected since they never populate SKIPPED_NO_ACCESS. --- .../ocm-ci-fastforward-multiple-commands.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci-operator/step-registry/ocm/ci/fastforward-multiple/ocm-ci-fastforward-multiple-commands.sh b/ci-operator/step-registry/ocm/ci/fastforward-multiple/ocm-ci-fastforward-multiple-commands.sh index b0b89bef3c685..2813cc54a971d 100755 --- a/ci-operator/step-registry/ocm/ci/fastforward-multiple/ocm-ci-fastforward-multiple-commands.sh +++ b/ci-operator/step-registry/ocm/ci/fastforward-multiple/ocm-ci-fastforward-multiple-commands.sh @@ -1623,6 +1623,16 @@ if [[ ${#SKIPPED_NO_ACCESS[@]} -gt 0 ]]; then echo " - ${repo}" done echo "" + + # A repo skipped for lack of write access is an unexpected access problem + # (revoked token, org membership change, repo transferred/deleted, etc.), + # not an intentional exclusion (those are handled separately via + # SKIPPED_REPOS / SKIP_VERSIONS_PATH and never reach SKIPPED_NO_ACCESS). + # Mark the job as failed so Prow reports failure/error and the Slack + # alert configured in _prowconfig.yaml fires, instead of this condition + # silently persisting across every 2h run. + echo "WARNING: ${#SKIPPED_NO_ACCESS[@]} repo(s) skipped due to no write access; marking job as failed for alerting" + exit_code=$((exit_code | 1)) fi # List failures if any