Skip to content

DPTP-4340: Remove direct mirroring to registry.ci.openshift.org, consolidate to single promotion step#4866

Open
deepsm007 wants to merge 2 commits intoopenshift:mainfrom
deepsm007:DPTP-4340
Open

DPTP-4340: Remove direct mirroring to registry.ci.openshift.org, consolidate to single promotion step#4866
deepsm007 wants to merge 2 commits intoopenshift:mainfrom
deepsm007:DPTP-4340

Conversation

@deepsm007
Copy link
Copy Markdown
Contributor

@deepsm007 deepsm007 commented Dec 5, 2025

Removes the direct mirroring step to registry.ci.openshift.org and consolidates promotion into a single step that handles both quay.io mirroring and tagging.

The promotion now:
(1) mirrors to quay.io/openshift/ci using oc image mirror, then
(2) tags in registry.ci.openshift.org from quay-proxy.ci.openshift.org using oc tag.

/hold
/cc @Prucek @openshift/test-platform

Summary by CodeRabbit

  • Bug Fixes

    • Refined image promotion logic for registry override scenarios—when no override is specified, images are promoted to quay.io; when an override is configured, promotion to quay.io is skipped.
  • Refactor

    • Simplified Quay image reference naming format for improved clarity.
    • Updated image target classification criteria to more reliably distinguish between tag-based and mirror-based promotions.

@openshift-ci-robot
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: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 5, 2025
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Dec 5, 2025

@deepsm007: This pull request references DPTP-4340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

Removes the direct mirroring step to registry.ci.openshift.org and consolidates promotion into a single step that handles both quay.io mirroring and tagging.

The promotion now:
(1) mirrors to quay.io/openshift/ci using oc image mirror, then
(2) tags in registry.ci.openshift.org from quay-proxy.ci.openshift.org using oc tag.

/hold
/cc @Prucek @openshift/test-platform

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 5, 2025

Walkthrough

Removed the "-quay" suffix from promotion target naming and adjusted promotion control flow: Quay promotion is now conditionally appended based on RegistryOverride; proxy target keys and mirror logic were simplified to use tag-based references without digest overrides; tests and fixtures updated accordingly.

Changes

Cohort / File(s) Summary
Configuration & Defaults
pkg/defaults/defaults.go, pkg/defaults/defaults_test.go
Removed unconditional creation of a default promotion step; quay promotion step is appended only when RegistryOverride is empty. Test expectations updated to remove the extra "[promotion]" post-step.
API Layer
pkg/api/promotion.go, pkg/api/promotion_test.go
Dropped -quay infix from proxy target naming (namespace/imagestream-name:tag instead of ...-quay:tag). Removed alternate digest-based proxy mapping (qciPullSpec) from QuayCombinedMirrorFunc; proxy entries now map to QuayImageReference(tag) (tag form). Tests adjusted to expect tag-addressable values instead of sha256 digests.
Promotion Step Logic
pkg/steps/release/promote.go, pkg/steps/release/promote_test.go
Changed heuristic for treating targets as tags: removed check for -quay: and now classify as tagged when key contains ${component} or the image target contains quay-proxy.ci.openshift.org. Tests updated to use simplified target keys (removed -quay suffixes).
Test Fixtures
pkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay.yaml, pkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay_multiple_tags.yaml
Updated fixture target names to drop -quay suffixes and use the new naming scheme; loop structure and control flow unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 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 change: removing direct mirroring to registry.ci.openshift.org and consolidating promotion into a single step, which aligns with all file changes across the codebase.
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 Repository uses standard Go testing package, not Ginkgo; PR contains no Ginkgo test definitions and all test names are static strings.
Test Structure And Quality ✅ Passed Test files contain only assertion value updates for refactored promotion logic, maintaining existing test structure and coverage patterns.
Microshift Test Compatibility ✅ Passed PR contains only unit test updates to promotion and defaults logic, no new Ginkgo e2e tests added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This pull request does not add any new Ginkgo e2e tests. Changes are limited to standard Go unit tests and promotion logic modifications.
Topology-Aware Scheduling Compatibility ✅ Passed Pull request modifies CI infrastructure tooling without introducing scheduling constraints that assume standard HA topology.
Ote Binary Stdout Contract ✅ Passed PR modifies only library packages with no process-level stdout writes or entry point modifications, maintaining OTE binary JSON communication contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR modifies only standard Go unit tests, not Ginkgo e2e tests. No It(), Describe(), Context(), or When() patterns are added.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci bot requested review from a team and Prucek December 5, 2025 17:00
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 5, 2025
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Dec 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepsm007

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2025
@deepsm007
Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test integration-optional-test

@Prucek
Copy link
Copy Markdown
Member

Prucek commented Dec 12, 2025

when we merge this only the X.Y-quay IS will stay, is that what we want? Or do we want the current X.Y IS to use QCI images https://github.com/openshift/ci-tools/blob/main/pkg/api/promotion.go#L114

@deepsm007 deepsm007 force-pushed the DPTP-4340 branch 2 times, most recently from 8c8865e to 778e4f1 Compare February 6, 2026 14:40
@deepsm007
Copy link
Copy Markdown
Contributor Author

/test images

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@deepsm007 deepsm007 force-pushed the DPTP-4340 branch 5 times, most recently from 4dd323b to 0c9127a Compare February 10, 2026 23:24
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 31, 2026
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 21, 2026
FromConfig no longer registers the legacy promotion step when promoting; update TestFromConfig expectedPost to match.
@deepsm007
Copy link
Copy Markdown
Contributor Author

@coderabbitai resume

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 21, 2026

✅ Actions performed

Reviews resumed.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Apr 21, 2026

@deepsm007: This pull request references DPTP-4340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Removes the direct mirroring step to registry.ci.openshift.org and consolidates promotion into a single step that handles both quay.io mirroring and tagging.

The promotion now:
(1) mirrors to quay.io/openshift/ci using oc image mirror, then
(2) tags in registry.ci.openshift.org from quay-proxy.ci.openshift.org using oc tag.

/hold
/cc @Prucek @openshift/test-platform

Summary by CodeRabbit

  • Bug Fixes

  • Refined image promotion logic for registry override scenarios—when no override is specified, images are promoted to quay.io; when an override is configured, promotion to quay.io is skipped.

  • Refactor

  • Simplified Quay image reference naming format for improved clarity.

  • Updated image target classification criteria to more reliably distinguish between tag-based and mirror-based promotions.

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/defaults/defaults_test.go (1)

1700-1705: ⚠️ Potential issue | 🟡 Minor

Test expectation correctly updated for consolidated promotion flow.

The removal of "[promotion]" from expectedPost aligns with the code changes: the direct mirroring step is removed, leaving only "[promotion-quay]" which handles both quay.io mirroring and proxy tagging.

Minor: Add test case for RegistryOverride with promotion. The current test covers the normal promote scenario, but the RegistryOverride conditional path (lines 307–310 in defaults.go) is not tested in the main test suite. Consider adding a test case with promote: true and PromotionConfiguration.RegistryOverride set to verify no promotion steps are generated in that scenario.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/defaults/defaults_test.go` around lines 1700 - 1705, Add a new table test
case in defaults_test.go alongside the existing promote:true case that sets
promote: true and the PromotionConfiguration.RegistryOverride field to a
non-empty value; name it to indicate "RegistryOverride with promotion". In that
case set expectedSteps to the same pre-promotion steps (e.g., "[output-images]",
"[images]") but set expectedPost to an empty slice (or assert that no promotion
steps are generated) to verify the conditional path in defaults.go (the
PromotionConfiguration.RegistryOverride branch around lines ~307–310) produces
no promotion steps. Ensure the test populates the same input struct used by the
table (referencing promote and PromotionConfiguration.RegistryOverride) and
asserts equality against expectedPost and expectedSteps like the other cases.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@pkg/defaults/defaults_test.go`:
- Around line 1700-1705: Add a new table test case in defaults_test.go alongside
the existing promote:true case that sets promote: true and the
PromotionConfiguration.RegistryOverride field to a non-empty value; name it to
indicate "RegistryOverride with promotion". In that case set expectedSteps to
the same pre-promotion steps (e.g., "[output-images]", "[images]") but set
expectedPost to an empty slice (or assert that no promotion steps are generated)
to verify the conditional path in defaults.go (the
PromotionConfiguration.RegistryOverride branch around lines ~307–310) produces
no promotion steps. Ensure the test populates the same input struct used by the
table (referencing promote and PromotionConfiguration.RegistryOverride) and
asserts equality against expectedPost and expectedSteps like the other cases.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d059087d-6e01-49bd-bc62-cae27a8f234a

📥 Commits

Reviewing files that changed from the base of the PR and between 253a819 and 4c28a9a.

📒 Files selected for processing (4)
  • pkg/api/promotion.go
  • pkg/api/promotion_test.go
  • pkg/defaults/defaults.go
  • pkg/defaults/defaults_test.go
💤 Files with no reviewable changes (1)
  • pkg/defaults/defaults.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/api/promotion_test.go

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 21, 2026

@deepsm007: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 4c28a9a link true /test images
ci/prow/breaking-changes 4c28a9a link false /test breaking-changes

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants