Skip to content

fix(release): promotion tag retry shell exit 0 on success#5280

Merged
openshift-merge-robot merged 1 commit into
openshift:mainfrom
deepsm007:fix/promotion-quay-tag-retry-exit
Jun 26, 2026
Merged

fix(release): promotion tag retry shell exit 0 on success#5280
openshift-merge-robot merged 1 commit into
openshift:mainfrom
deepsm007:fix/promotion-quay-tag-retry-exit

Conversation

@deepsm007

@deepsm007 deepsm007 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

/cc @hector-vido

found a bug failing promotion.

This change fixes Quay promotion retries in the release flow by ensuring the generated shell script exits cleanly after a successful tag attempt instead of falling through and failing the promotion step. The affected release promotion logic now emits an explicit no-op command in the retry loop, and the updated test fixtures reflect the corrected script behavior for both release and non-release namespaces.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci openshift-ci Bot requested a review from hector-vido June 26, 2026 20:36
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

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: Enterprise

Run ID: 70b924d7-2149-4bd9-a749-de6f9d74b601

📥 Commits

Reviewing files that changed from the base of the PR and between e4d97be and 6f61479.

📒 Files selected for processing (3)
  • pkg/steps/release/promote.go
  • pkg/steps/release/testdata/zz_fixture_TestGetQuayPromotionShell_promotion_quay.yaml
  • pkg/steps/release/testdata/zz_fixture_TestGetQuayPromotionShell_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)

📝 Walkthrough

Walkthrough

The Quay promotion retry shell template now emits a standalone Bash : command in the loop body, and the embedded promotion shell fixtures were updated to match.

Changes

Quay promotion retry shell

Layer / File(s) Summary
Retry loop template and fixtures
pkg/steps/release/promote.go, pkg/steps/release/testdata/zz_fixture_TestGetQuayPromotionShell_promotion_quay.yaml, pkg/steps/release/testdata/zz_fixture_TestGetQuayPromotionShell_promotion_quay_non_release_namespace.yaml
The generated retry loop body adds a : no-op before done, and the promotion shell fixtures mirror that script text.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • openshift/ci-tools#5255: Touches the same Quay promotion retry shell generation path in pkg/steps/release/promote.go.

Suggested reviewers

  • danilo-gemoli
🚥 Pre-merge checks | ✅ 17
✅ Passed checks (17 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change: a release promotion tag retry shell fix to exit 0 on success.
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.
Go Error Handling ✅ Passed PASS: The PR only adjusts shell-template text; no new ignored errors, panic calls, or nil dereferences were introduced in the changed Go code.
Test Coverage For New Features ✅ Passed PASS: TestGetQuayPromotionShell golden fixtures cover the modified shell output, and would fail without the added : no-op.
Stable And Deterministic Test Names ✅ Passed PASS: The PR only changes shell script templates/fixtures; no It/Describe/Context/When titles were added or modified.
Test Structure And Quality ✅ Passed PASS: The PR only changes shell generation and fixture snapshots; no Ginkgo tests, cluster waits, or test-structure regressions were introduced.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only tweaks promotion shell generation and fixture snapshots, so MicroShift compatibility isn’t impacted.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only the promotion shell helper and YAML fixtures changed; no new Ginkgo e2e tests or multi-node/SNO-sensitive test code were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only shell-template no-op ':' additions and fixture updates changed; no manifests, controllers, node selectors, affinity, or replica logic were introduced.
Ote Binary Stdout Contract ✅ Passed The PR only changes shell-template text in release helpers/fixtures; promote.go has no main/init/TestMain or stdout writes, so the OTE stdout contract isn’t affected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Not applicable: the PR only updates promotion shell templates/fixtures, with no new Ginkgo e2e tests or IPv4/external-network assumptions.
No-Weak-Crypto ✅ Passed Touched code only changes shell retry no-ops; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons found.
Container-Privileges ✅ Passed Modified files only adjust shell retry text; the promotion pod spec has no privileged, hostNetwork/hostPID/hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed PASS: Changes only add shell no-op ':' in retry loops; no new log statements or secret-bearing output were introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2026
@hector-vido

Copy link
Copy Markdown
Contributor

/lgtm

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

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepsm007, hector-vido

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:
  • OWNERS [deepsm007,hector-vido]

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

@openshift-merge-robot openshift-merge-robot merged commit cad4a33 into openshift:main Jun 26, 2026
1 of 16 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants