fix(release): staged quay promotion via bash oc image mirror#5242
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR implements a staged image mirroring workflow for ChangesQuay Float Promotion Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 13❌ Failed checks (1 warning, 12 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/steps/release/promote.go (1)
390-394: 💤 Low valueUnused
newSrcfield in struct.The
newSrcfield is populated at line 476 but never read.getStagedQuayFloatPromotionShellonly takesfloatTagandpruneTag. Consider removing it.type quayFloatPromotion struct { floatTag string - newSrc string pruneTag string }🤖 Prompt for 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. In `@pkg/steps/release/promote.go` around lines 390 - 394, The quayFloatPromotion struct contains an unused field newSrc that is set but never read (see construction of quayFloatPromotion and usage in getStagedQuayFloatPromotionShell which only needs floatTag and pruneTag); remove the newSrc field from the quayFloatPromotion type and stop populating it where instances are created (ensure any code that assigned to .newSrc is updated to only set floatTag and pruneTag), and run a project-wide search to confirm there are no remaining references to newSrc before committing.
🤖 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.
Nitpick comments:
In `@pkg/steps/release/promote.go`:
- Around line 390-394: The quayFloatPromotion struct contains an unused field
newSrc that is set but never read (see construction of quayFloatPromotion and
usage in getStagedQuayFloatPromotionShell which only needs floatTag and
pruneTag); remove the newSrc field from the quayFloatPromotion type and stop
populating it where instances are created (ensure any code that assigned to
.newSrc is updated to only set floatTag and pruneTag), and run a project-wide
search to confirm there are no remaining references to newSrc before committing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: ee1c043b-1627-4146-aa46-c6b5baf7699e
📒 Files selected for processing (5)
pkg/steps/release/promote.gopkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay_4.12.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay_multiple_tags.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay_non_release_namespace.yaml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift/release(manual)openshift/ci-docs(manual)openshift/release-controller(manual)openshift/ci-chat-bot(manual)
0d00db1 to
f0b750a
Compare
|
/test e2e |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danilo-gemoli, deepsm007 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/override ci/prow/images |
|
/unhold |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
@deepsm007: Overrode contexts on behalf of deepsm007: ci/prow/images DetailsIn response to this:
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. |
|
@deepsm007: 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. |
https://redhat-internal.slack.com/archives/GB7NB0CUC/p1781030982393999?thread_ts=1778764637.570759&cid=GB7NB0CUC
Staged
promotion-quayuses bash-onlyoc image mirror: new image lands on*_incomingfirst, then (if float exists) abort-on-fail backup to_prune_*+__pre, latch_incoming→float, and__post1—replacing directnew→floatand prune|| true.Closes manifest-unknown gap when mirror failed after float moved: old digest stays pinned on QCI via
__preuntil next promotion/cc @jupierce @openshift/test-platform
Staged Quay Image Promotion via Bash oc image mirror
This PR changes ci-operator’s Quay image promotion to a staged, bash-only oc image mirror workflow that makes promotions to quay.io/openshift/ci resilient to partial failures.
Affected component
What changed (practical effect for CI users/operators)
Why this matters
Scope