ci-tools icon indicating copy to clipboard operation
ci-tools copied to clipboard

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

Open deepsm007 opened this issue 3 months ago โ€ข 8 comments

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

deepsm007 avatar Dec 05 '25 16:12 deepsm007

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 avatar Dec 05 '25 16:12 openshift-ci-robot

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

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.

openshift-ci-robot avatar Dec 05 '25 16:12 openshift-ci-robot

Walkthrough

Removed the generic promotion step from defaults; promotion is now handled only via the quay-specific promotion path (and logging when RegistryOverride is set), with corresponding test expectation updated.

Changes

Cohort / File(s) Change Summary
Defaults implementation
pkg/defaults/defaults.go
Removed addition of a generic promotion step that used registryDomain(config.PromotionConfiguration), api.DefaultMirrorFunc, and api.DefaultTargetNameFunc; flow now relies on the quay-specific promotion step or logs when RegistryOverride prevents promotion.
Unit test update
pkg/defaults/defaults_test.go
Updated TestFromConfig "promote" case to expect only "[promotion-quay]" in post-build steps (removed expectation of standalone "[promotion]").

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~10 minutes

  • Inspect pkg/defaults/defaults.go to ensure no remaining references assume the generic promotion step exists.
  • Run/verify updated unit test pkg/defaults/defaults_test.go and check for other tests that might assert the old behavior.
โœจ Finishing touches
  • [ ] ๐Ÿ“ Generate docstrings
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

๐Ÿ“œ Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 6f270d2a6188278f8c13b9cb29c1a2e96b98f685 and 661cd2f9f5d5ea27fac1fea59868dd58b993b483.

๐Ÿ“’ Files selected for processing (1)
  • pkg/defaults/defaults_test.go (1 hunks)
๐Ÿงฐ Additional context used
๐Ÿ““ Path-based instructions (1)
**

โš™๏ธ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • pkg/defaults/defaults_test.go
๐Ÿ”‡ Additional comments (1)
pkg/defaults/defaults_test.go (1)

1736-1736: LGTM! Test expectation correctly updated.

The test expectation now reflects the consolidated promotion flow where only the [promotion-quay] step executes post-build, removing the redundant generic [promotion] step. This aligns with the PR objective to consolidate promotion into a single step.


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

coderabbitai[bot] avatar Dec 05 '25 17:12 coderabbitai[bot]

[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

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[bot] avatar Dec 05 '25 17:12 openshift-ci[bot]

/pipeline required

deepsm007 avatar Dec 05 '25 21:12 deepsm007

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

openshift-ci-robot avatar Dec 05 '25 21:12 openshift-ci-robot

@deepsm007: The following test 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/breaking-changes 661cd2f9f5d5ea27fac1fea59868dd58b993b483 link false /test breaking-changes

Full PR test history. Your PR dashboard.

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-ci[bot] avatar Dec 05 '25 22:12 openshift-ci[bot]

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

Prucek avatar Dec 12 '25 13:12 Prucek