ocm-ci-fastforward-multiple: fail job when repos skipped for no write access - #83832
ocm-ci-fastforward-multiple: fail job when repos skipped for no write access#83832dislbenn wants to merge 1 commit into
Conversation
… 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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. WalkthroughThe fast-forward script now warns when repositories are skipped for missing write access. It also sets a failure bit so Prow marks the job as failed and triggers Slack alerting. ChangesRepository access skip handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized change makes the job fail when repositories are skipped because they lack write access, improving alerting without changing normal processing; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@dislbenn: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dislbenn, ngraham20 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Problem
The
periodic-ci-stolostron-acm-config-main-fast-forwardjob skips repos it can't push to (SKIPPED_NO_ACCESS), e.g. due to a revoked token, org membership change, or a repo being transferred/deleted. These skips were logged and listed in the summary, but never affectedexit_code.stolostron/acm-config's Prow config has a Slack reporter configured to alert#team-acm-fastforward-alertsonfailure/errorjob states:Because
exit_codestayed0even when repos were skipped, Prow reported the job assuccess, and the Slack alert never fired — even during a run where ~half the fleet's repos were skipped.Fix
If
SKIPPED_NO_ACCESSis non-empty at the end of the run, ORexit_codewith1before the finalexit. This causes Prow to reportfailure, triggering the Slack alert.The job still runs to completion first — fast-forward and Tekton work continues normally for every reachable repo. Only the final exit status changes when there were unexpected access skips.
Intentional skips (
SKIPPED_REPOShardcoded list,SKIP_VERSIONS_PATHper-repo version exclusions) are unaffected — they never populateSKIPPED_NO_ACCESS, so they don't trigger the alert.Given the job runs every 2 hours, alerting on any occurrence (rather than a threshold) gives ops fast, low-noise visibility into access regressions.
Testing
bash -nsyntax check passesshellcheck --severity=warningcleanSKIPPED_NO_ACCESS→exit_code=1; empty array →exit_code=0Summary by CodeRabbit
ocm-ci-fastforward-multipleto fail when repositories are skipped because of missing write access (SKIPPED_NO_ACCESS).SKIPPED_REPOSandSKIP_VERSIONS_PATH.