Skip to content

registry-replacer: add ignore-repos option - #4890

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
Prucek:registry-repalcer-ingore-repos
Jan 21, 2026
Merged

registry-replacer: add ignore-repos option#4890
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
Prucek:registry-repalcer-ingore-repos

Conversation

@Prucek

@Prucek Prucek commented Jan 8, 2026

Copy link
Copy Markdown
Member

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

@coderabbitai

coderabbitai Bot commented Jan 8, 2026

Copy link
Copy Markdown

Walkthrough

Adds a new --ignore-repos flag, threads an ignoreRepos set into registry-replacer, skips processing for repos listed there, updates set construction in replacement logic, propagates metadata into replacer calls, and updates tests and an autoconfigbrancher flag usage.

Changes

Cohort / File(s) Summary
Registry replacer CLI
cmd/registry-replacer/main.go
Adds ignoreRepos *flagutil.Strings to options, registers --ignore-repos flag, initializes it in gatherOptions, and passes it into replacer invocation.
Replacer implementation & logic
(referenced by tests / ensureReplacement / hasReplacementFor)
Replacer signature updated to accept an ignore set; early-return (skip) when repo is in ignore-repos; ensureReplacement now constructs target sets directly with sets.New(...) (removes temporary set build).
Tests
cmd/registry-replacer/main_test.go
Tests updated to include ignoreRepos field and pass it into replacer; context passed as &config.Info{Metadata: ...}; adds test case validating repo-skipping via ignore-repos; minor literal set construction tweak.
Autoconfigbrancher invocation
cmd/autoconfigbrancher/main.go
Adds --ignore-repos flag usage when invoking the registry-replacer step (includes default like openshift/origin).
Module metadata
go.mod
Small module file change (tidy/metadata).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing touches
  • 📝 Generate docstrings

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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

Comment thread cmd/autoconfigbrancher/main.go Outdated
@Prucek

Prucek commented Jan 9, 2026

Copy link
Copy Markdown
Member Author

/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
Copy Markdown
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-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

Prucek commented Jan 9, 2026

Copy link
Copy Markdown
Member Author

/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
@Prucek

Prucek commented Jan 9, 2026

Copy link
Copy Markdown
Member Author

/retest-required
/test e2e

@Prucek

Prucek commented Jan 15, 2026

Copy link
Copy Markdown
Member Author

/test e2e

@Prucek
Prucek force-pushed the registry-repalcer-ingore-repos branch from 3f21d79 to 9f94f2d Compare January 20, 2026 15:06
@Prucek

Prucek commented Jan 20, 2026

Copy link
Copy Markdown
Member Author

/test e2e

@Prucek

Prucek commented Jan 21, 2026

Copy link
Copy Markdown
Member Author

/unhold
/retest-required

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 21, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2026
@openshift-ci

openshift-ci Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmguzik, liangxia, 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:
  • OWNERS [Prucek,jmguzik,liangxia]

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

@Prucek

Prucek commented Jan 21, 2026

Copy link
Copy Markdown
Member Author

/override ci/prow/integration-optional-test

@openshift-ci

openshift-ci Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

@Prucek: Overrode contexts on behalf of Prucek: ci/prow/integration-optional-test

Details

In response to this:

/override ci/prow/integration-optional-test

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.

@openshift-ci

openshift-ci Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

@Prucek: 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 9f94f2d 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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit e2d4dd7 into openshift:main Jan 21, 2026
14 of 15 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.

4 participants