Skip to content

ocm-ci-fastforward-multiple: fail job when repos skipped for no write access - #83832

Open
dislbenn wants to merge 1 commit into
openshift:mainfrom
dislbenn:fastforward-alert-on-skipped-no-access
Open

ocm-ci-fastforward-multiple: fail job when repos skipped for no write access#83832
dislbenn wants to merge 1 commit into
openshift:mainfrom
dislbenn:fastforward-alert-on-skipped-no-access

Conversation

@dislbenn

@dislbenn dislbenn commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The periodic-ci-stolostron-acm-config-main-fast-forward job 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 affected exit_code.

stolostron/acm-config's Prow config has a Slack reporter configured to alert #team-acm-fastforward-alerts on failure/error job states:

slack_reporter_configs:
  stolostron/acm-config:
    channel: '#team-acm-fastforward-alerts'
    job_states_to_report: [failure, error]

Because exit_code stayed 0 even when repos were skipped, Prow reported the job as success, and the Slack alert never fired — even during a run where ~half the fleet's repos were skipped.

Fix

If SKIPPED_NO_ACCESS is non-empty at the end of the run, OR exit_code with 1 before the final exit. This causes Prow to report failure, 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_REPOS hardcoded list, SKIP_VERSIONS_PATH per-repo version exclusions) are unaffected — they never populate SKIPPED_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 -n syntax check passes
  • shellcheck --severity=warning clean
  • Verified in isolation: non-empty SKIPPED_NO_ACCESSexit_code=1; empty array → exit_code=0

Summary by CodeRabbit

  • Updates ocm-ci-fastforward-multiple to fail when repositories are skipped because of missing write access (SKIPPED_NO_ACCESS).
  • Keeps processing all reachable repositories before exiting.
  • Preserves intentional skips from SKIPPED_REPOS and SKIP_VERSIONS_PATH.
  • Adds a warning for unexpected access problems, allowing Prow to trigger the configured Slack alert.

… 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.
@openshift-ci
openshift-ci Bot requested review from smg247 and sosiouxme August 21, 2026 17:16
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a078c10-cd19-4376-8333-f607874f9adb

📥 Commits

Reviewing files that changed from the base of the PR and between 2abbe58 and a3b21be.

📒 Files selected for processing (1)
  • ci-operator/step-registry/ocm/ci/fastforward-multiple/ocm-ci-fastforward-multiple-commands.sh

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

The 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.

Changes

Repository access skip handling

Layer / File(s) Summary
Detect and report access skips
ci-operator/step-registry/ocm/ci/fastforward-multiple/ocm-ci-fastforward-multiple-commands.sh
The script warns that no-write-access skips indicate an unexpected access problem and updates exit_code to fail the job.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to a3b21

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)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: failing the job when repositories lack write access.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only a shell script; the diff adds exit-status handling and a warning, with no Ginkgo tests or dynamic test titles.
Test Structure And Quality ✅ Passed PASS: The diff changes only one shell script and adds no Ginkgo test code, so the listed test-structure requirements do not apply.
Microshift Test Compatibility ✅ Passed The PR changes only a Bash CI script; it adds no Ginkgo e2e tests or MicroShift-incompatible API references.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only a shell script exit-status block; it adds no Ginkgo e2e tests or multi-node assumptions, so SNO compatibility checks do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed The pull request changes only a CI Bash script to set its exit code for skipped repositories; it adds no deployment manifests, operators, controllers, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only a Bash CI step command. No OTE binary or process-level Go suite code is changed, so the OTE JSON stdout contract is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The diff changes only a shell workflow script and adds no Ginkgo e2e tests, IPv4 assumptions, or external connectivity requirements.
No-Weak-Crypto ✅ Passed The only changed file adds a warning and exit_code bitwise update; added lines contain no MD5, SHA1, DES, RC4, Blowfish, ECB, crypto implementation, or secret comparison.
Container-Privileges ✅ Passed The PR changes only shell logging and exit status. Its diff adds no privileged, hostPID/hostNetwork/hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or root settings.
No-Sensitive-Data-In-Logs ✅ Passed The diff adds only a count-based WARNING. It does not log tokens, passwords, PII, hostnames, or customer data; repository-name logging predates this change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@dislbenn: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
periodic-ci-stolostron-acm-config-main-fast-forward N/A periodic Registry content changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@dislbenn: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@ngraham20 ngraham20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 21, 2026
@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dislbenn, ngraham20
Once this PR has been reviewed and has the lgtm label, please assign mark-nc for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants