Skip to content

Conversation

@Prucek
Copy link
Member

@Prucek Prucek commented Jan 8, 2026

Add --ignore-repos flag to registry-replacer

Changes:

  • Add --ignore-repos flag that accepts org/repo notation (can be passed multiple times)
  • Skip processing for repos in the ignore list
  • Add openshift/origin into the ignore list

The dockerfile-inputs feature will handle base image detection at build time,
while registry-replacer will skip these repos in its periodic runs.

Related: Phase 2 of dockerfile-inputs rollout (registry-replacer deprecation)
Needs: #4851

@openshift-ci-robot
Copy link
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

@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

Walkthrough

Adds a new --ignore-repos flag, threads an ignoreRepos set into the registry-replacer invocation, implements early skipping of listed repos in the replacer, refactors some set construction, and updates tests and an autoconfigbrancher flag usage to cover the new behavior and metadata propagation.

Changes

Cohort / File(s) Summary
Registry replacer CLI
cmd/registry-replacer/main.go
Adds an ignoreRepos option from a new --ignore-repos flag and passes it into the replacer call.
Replacer implementation
(implementation referenced by tests)
Replacer now accepts an ignore set and returns early (skips) when a repo is in ignore-repos. Refactors ensureReplacement to construct target sets with sets.New(...); hasReplacementFor behavior preserved.
Tests
cmd/registry-replacer/main_test.go
Adds ignoreRepos to test cases and replacer invocation, updates context to pass config.Info{Metadata: ...}, and adds a test verifying a repo listed in ignore-repos is skipped. Minor literal set construction change in a test.
Autoconfigbrancher step
cmd/autoconfigbrancher/main.go
Adds the --ignore-repos flag usage to pass a default ignored repo (e.g., openshift/origin) into the registry-replacer step.
Module metadata
go.mod
Small module file update (metadata/tidy change).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization 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 635aabc and 3f21d79.

📒 Files selected for processing (1)
  • cmd/autoconfigbrancher/main.go
🧰 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:

  • cmd/autoconfigbrancher/main.go
🔇 Additional comments (1)
cmd/autoconfigbrancher/main.go (1)

172-172: Flag implementation verified and distinction is clear.

The --ignore-repos flag is properly implemented in registry-replacer (cmd/registry-replacer/main.go line 70) and serves a distinct purpose from --ensure-correct-promotion-dockerfile-ignored-repos:

  • --ignore-repos: completely skips repos from all registry-replacer processing (useful for repos using dockerfile-inputs feature)
  • --ensure-correct-promotion-dockerfile-ignored-repos: only skips the promotion dockerfile verification step for specified repos

The addition of openshift/origin to the ignore list on line 172 is correct for the dockerfile-inputs rollout.


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

@openshift-ci openshift-ci bot requested review from deepsm007 and smg247 January 8, 2026 14:20
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2026
Copy link

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @cmd/autoconfigbrancher/main.go:
- Line 172: The command invocation currently uses the incorrect flag string
"--ignore-repo" which is unrecognized; change that literal to the expected
"--ignore-repos" (plural) wherever it appears in the command construction (the
argument list containing "--ignore-repo", "openshift/origin") so the
registry-replacer flag is recognized.
📜 Review details

Configuration used: Organization 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 b2d2d1a and 635aabc.

📒 Files selected for processing (1)
  • cmd/autoconfigbrancher/main.go
🧰 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:

  • cmd/autoconfigbrancher/main.go

@Prucek
Copy link
Member Author

Prucek commented Jan 9, 2026

/retest-required

configResolver func(config api.ReleaseBuildConfiguration) (api.ReleaseBuildConfiguration, error),
) func(*api.ReleaseBuildConfiguration, *config.Info) error {
return func(config *api.ReleaseBuildConfiguration, info *config.Info) error {
// Skip repos that should use dockerfile-inputs feature
Copy link
Contributor

Choose a reason for hiding this comment

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

AI's obvious comments ;)

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmguzik, Prucek

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-robot
Copy link
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
Member Author

Prucek commented Jan 9, 2026

/hold

@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 Jan 9, 2026
@Prucek Prucek force-pushed the registry-repalcer-ingore-repos branch from 635aabc to 3f21d79 Compare January 9, 2026 11:00
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

New changes are detected. LGTM label has been removed.

@Prucek
Copy link
Member Author

Prucek commented Jan 9, 2026

/retest-required
/test e2e

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

@Prucek: 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/e2e 3f21d79 link true /test e2e
ci/prow/breaking-changes 3f21d79 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants