Skip to content

fleetshift: harden image mirror CI against build-farm flakes#82029

Merged
openshift-merge-bot[bot] merged 5 commits into
openshift:mainfrom
mshort55:fleetshift-image-mirror-durability
Jul 16, 2026
Merged

fleetshift: harden image mirror CI against build-farm flakes#82029
openshift-merge-bot[bot] merged 5 commits into
openshift:mainfrom
mshort55:fleetshift-image-mirror-durability

Conversation

@mshort55

@mshort55 mshort55 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

https://redhat.atlassian.net/browse/OME-204

  • Collapse fleetshift UI and POC CI to a single multiarch config (remove duplicate single-arch + __multiarch variants) so each push runs one build/mirror path.
  • Teach fleetshift-ci-image-mirror to optionally tag :latest in the same job as the SHA tag (ALSO_TAG_LATEST), so postsubmits publish both atomically.
  • Add retried periodics that republish :latest (UI every 6h; POC staggered) so capacity-related postsubmit failures can recover without another merge.

Motivation

Recent fleetshift-user-interface image-mirror failures were build-farm capacity issues (Insufficient cpu / node group maxed, long Pending), not Dockerfile/app errors. Presubmit aborts from superseded PRs also looked like red builds. This reduces duplicate multiarch load and adds a durable :latest recovery path.

Test plan

  • Confirm generated jobs look correct after make ci-operator-config / make jobs / make registry-metadata (or make update) on a supported host
  • CI config validation / prowgen checks pass on this PR
  • After merge, verify one postsubmit mirrors both SHA and :latest for UI and POC
  • Confirm periodics appear and can succeed with retry after a capacity flake

Summary by CodeRabbit

  • Hardens FleetShift image-mirror CI in ci-operator/ to better survive build-farm capacity failures by reshaping periodic republish workflows and improving mirror error handling.
  • Consolidates FleetShift UI and POC CI multiarch configuration into the primary *-main.yaml files by adding arm64 to the image build matrices and removing the now-redundant *__multiarch.yaml configs.
  • Updates FleetShift POC and UI image-mirroring jobs to:
    • Split mirror/merge logic into distinct main and local merge jobs.
    • Apply capabilities: [arm64] where appropriate.
    • Use ALSO_TAG_LATEST: "true" for merge flows so :latest and commit-SHA tags come from the same build.
    • Add/rework cron-based, retried periodic jobs to republish :latest for UI (every six hours) and for POC on a staggered schedule, enabling recovery from capacity flakes without another merge.
  • Extends mirroring support for the POC “local” image by adding corresponding mirror and republish workflows.
  • Improves the fleetshift-ci-image-mirror implementation by:
    • Failing fast on missing/invalid registry credentials.
    • Deriving IMAGE_TAG from JOB_TYPE when unset.
    • Refactoring mirroring into a mirror_image(tag) helper with retries and per-attempt logging.
    • Capturing oc image mirror stderr/output into artifacts (including the final failed attempt in artifacts/logs) and cleaning up temporary logs via a RETURN trap.
  • Updates the fleetshift-ci-image-mirror step documentation to clarify IMAGE_TAG defaults for postsubmit vs periodic jobs and the purpose of ALSO_TAG_LATEST.

Collapse single-arch and multiarch variants, publish sha+latest from one
postsubmit, and add retried periodics so :latest can recover after capacity failures.
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@mshort55, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 14fd99f1-3842-4084-a495-c23c6a8e2a29

📥 Commits

Reviewing files that changed from the base of the PR and between b0f78c9 and b75b975.

📒 Files selected for processing (1)
  • ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-commands.sh

Walkthrough

FleetShift image configurations now build arm64 images and define local-image workflows. Mirror jobs support main and local images, merge workflows also tag latest, and scheduled republish jobs are added. The shared mirror step now handles explicit tags, retries, and optional latest mirroring.

Changes

FleetShift image mirroring

Layer / File(s) Summary
Image and workflow configuration
ci-operator/config/fleetshift/fleetshift-poc/*, ci-operator/config/fleetshift/fleetshift-user-interface/*
Image builds add arm64 support; POC workflows add local-image mirror and republish jobs, while UI workflows add arm64 mirror and scheduled republish handling. Multi-architecture variant configurations are removed.
Tag-aware mirror execution
ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-commands.sh
The mirror step validates tags and credentials, retries mirroring per tag, records final failures, and optionally mirrors latest after the primary tag.
Mirror step contract
ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-ref.yaml
Documentation describes explicit periodic tags and optional latest-tag mirroring.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MergeJob
  participant ImageMirrorStep
  participant SourceRegistry
  participant DestinationRegistry
  MergeJob->>ImageMirrorStep: Set IMAGE_TAG and optional ALSO_TAG_LATEST
  ImageMirrorStep->>SourceRegistry: Read source image
  ImageMirrorStep->>DestinationRegistry: Mirror primary tag with retries
  ImageMirrorStep->>DestinationRegistry: Mirror latest when enabled
Loading

Possibly related PRs

Suggested reviewers: alechenninger, hyperkid123, sahare

🚥 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 accurately summarizes the main goal: hardening FleetShift image-mirror CI against build-farm flakes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 PR contains only CI/CD config and shell scripts; no Ginkgo test files or test name definitions present. Check is not applicable.
Test Structure And Quality ✅ Passed No Ginkgo test code exists in this PR; it only modifies CI configuration YAML and bash scripts. The test structure check is not applicable.
Microshift Test Compatibility ✅ Passed The only changed file is a shell script; no new Ginkgo e2e tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR contains no new Ginkgo e2e tests. Changes are CI/CD configuration (YAML) and a shell script for image mirroring—not test code. The SNO compatibility check does not apply.
Topology-Aware Scheduling Compatibility ✅ Passed PASS: The PR only changes CI operator configs and an image-mirror script; no deployment manifests, pod affinity, node selectors, PDBs, or topology-aware scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed PR only changes CI YAML and a shell helper; no OTE binary main/init/TestMain code or top-level stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo/e2e test code was added in the PR diff; only a shell script changed, so the IPv4/disconnected-network check is not applicable.
No-Weak-Crypto ✅ Passed No MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or custom crypto appears in the touched code; only non-secret string checks on job flags/image tags were found.
Container-Privileges ✅ Passed No modified fleetshift manifest adds privileged/hostNetwork/hostPID/hostIPC/SYS_ADMIN/allowPrivilegeEscalation; the only capabilities entries are arm64 image targets.
No-Sensitive-Data-In-Logs ✅ Passed The PR improves security by limiting oc image mirror error output to last 20 lines instead of full output (which may contain auth details), explicitly documented in code comments and commit message.
✨ 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.

@mshort55

Copy link
Copy Markdown
Contributor Author

/pj-rehearse more

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mshort55: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-commands.sh`:
- Around line 59-66: Update the mirroring flow around oc image mirror to track
its exit status and return success only when the command completes successfully;
do not use mirror_log contents as the success condition. Preserve the existing
error log for failed mirrors and ensure failed commands cannot report the
requested tag as published.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 5c0dd48c-fdd3-433a-a29f-9184193ad7fa

📥 Commits

Reviewing files that changed from the base of the PR and between 91df185 and 7eb389d.

⛔ Files ignored due to path filters (6)
  • ci-operator/jobs/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main-periodics.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main-postsubmits.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main-presubmits.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/fleetshift/fleetshift-user-interface/fleetshift-fleetshift-user-interface-main-periodics.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/fleetshift/fleetshift-user-interface/fleetshift-fleetshift-user-interface-main-postsubmits.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/fleetshift/fleetshift-user-interface/fleetshift-fleetshift-user-interface-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (6)
  • ci-operator/config/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main.yaml
  • ci-operator/config/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main__multiarch.yaml
  • ci-operator/config/fleetshift/fleetshift-user-interface/fleetshift-fleetshift-user-interface-main.yaml
  • ci-operator/config/fleetshift/fleetshift-user-interface/fleetshift-fleetshift-user-interface-main__multiarch.yaml
  • ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-commands.sh
  • ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-ref.yaml
💤 Files with no reviewable changes (2)
  • ci-operator/config/fleetshift/fleetshift-user-interface/fleetshift-fleetshift-user-interface-main__multiarch.yaml
  • ci-operator/config/fleetshift/fleetshift-poc/fleetshift-fleetshift-poc-main__multiarch.yaml

Avoid logging pullspecs/secret paths, and treat mirror success as exit 0 plus non-empty stdout.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-commands.sh`:
- Around line 21-24: Ensure the `$HOME/.docker` directory exists before the
`base64` redirection writes `config.json`. Add a `mkdir -p "$HOME/.docker"` step
immediately before the decode command, preserving the existing decode error
handling.
- Around line 44-68: Update the mirroring retry loop to capture stderr in
mirror_log instead of discarding it, suppressing intermediate failures but
logging the final command output before returning failure. Replace the repeated
rm -f cleanup in the mirroring function with a trap that removes mirror_log on
every exit, and remove the unreachable cleanup after the loop.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 3fc83427-4937-4e3c-9f84-2f16cf3fc18b

📥 Commits

Reviewing files that changed from the base of the PR and between 7eb389d and f5b8424.

📒 Files selected for processing (1)
  • ci-operator/step-registry/fleetshift/ci/image-mirror/fleetshift-ci-image-mirror-commands.sh

mshort55 added 2 commits July 16, 2026 18:46
Capture stderr, dump the final attempt output into artifacts/logs, and
clean up the temp log with a RETURN trap.
Avoid copying full mirror output into public artifacts; keep enough
context to debug failures without exposing chatty auth detail.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mshort55, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

could not determine changed registry steps: could not load step registry: test `fleetshift-ci-image-mirror` has `commands` containing `trap` command, but test step is missing grace_period
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.

CI registry load rejects trap without grace_period; clean up temp files explicitly instead.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@mshort55: 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
pull-ci-fleetshift-fleetshift-user-interface-main-images fleetshift/fleetshift-user-interface presubmit Presubmit changed
pull-ci-fleetshift-fleetshift-user-interface-main-pr-image-mirror fleetshift/fleetshift-user-interface presubmit Presubmit changed
pull-ci-fleetshift-fleetshift-poc-main-images fleetshift/fleetshift-poc presubmit Presubmit changed
pull-ci-fleetshift-fleetshift-poc-main-pr-image-mirror fleetshift/fleetshift-poc presubmit Presubmit changed
pull-ci-fleetshift-fleetshift-poc-main-pr-image-mirror-local fleetshift/fleetshift-poc presubmit Presubmit changed
periodic-ci-fleetshift-fleetshift-poc-main-republish-local-latest N/A periodic Periodic changed
periodic-ci-fleetshift-fleetshift-poc-main-republish-latest N/A periodic Periodic changed
periodic-ci-fleetshift-fleetshift-user-interface-main-republish-latest N/A periodic Periodic changed
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.

@alechenninger

Copy link
Copy Markdown
Contributor

/lgtm

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

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alechenninger, mshort55

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

The pull request process is described 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

@mshort55

Copy link
Copy Markdown
Contributor Author

/pj-rehearse skip

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mshort55: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 16, 2026
@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@mshort55: 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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 939c03b into openshift:main Jul 16, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants