Skip to content

deprecating registry-replacer for the openshift org - #4913

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
Prucek:ignore-orgs
Jan 30, 2026
Merged

deprecating registry-replacer for the openshift org #4913
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
Prucek:ignore-orgs

Conversation

@Prucek

@Prucek Prucek commented Jan 28, 2026

Copy link
Copy Markdown
Member

Follow up of: #4890, #4851

@openshift-ci
openshift-ci Bot requested review from droslean and pruan-rht January 28, 2026 15:04
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2026
@Prucek

Prucek commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

/retest-required

@coderabbitai

coderabbitai Bot commented Jan 29, 2026

Copy link
Copy Markdown

Walkthrough

Adds organization-level ignore support: introduces a new --ignore-orgs flag and wiring to skip entire orgs in registry-replacer, updates auto-config-brancher invocation to use the new flag, and adds tests and a nil-check for base image pruning.

Changes

Cohort / File(s) Summary
Auto-config-brancher Invocation
cmd/auto-config-brancher/main.go
Replaced use of --ignore-repos "openshift/origin" with --ignore-orgs "openshift" when invoking registry-replacer.
Registry-replacer CLI & Logic
cmd/registry-replacer/main.go
Added ignoreOrgs option and --ignore-orgs flag, passed org set into replacer(...) (signature updated), implemented early-return skip for ignored orgs, and added a nil-check before iterating config.BaseImages.
Registry-replacer Tests
cmd/registry-replacer/main_test.go
Added ignoreOrgs field to test cases and a new test verifying that repos in ignored orgs are skipped.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing touches
  • 📝 Generate docstrings

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

/bin/bash: line 1: golangci-lint: command not found


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

@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: 0

Caution

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

⚠️ Outside diff range comments (1)
cmd/registry-replacer/main.go (1)

38-72: Initialize ignoreOrgs before registering the flag.

At line 178, opts.ignoreOrgs.Strings() is called without ignoreOrgs being initialized in gatherOptions(), causing a nil pointer panic at runtime.

Proposed fix
 o := &options{
 	ensureCorrectPromotionDockerfileIngoredRepos: &flagutil.Strings{},
 	ignoreRepos:                                  &flagutil.Strings{},
+	ignoreOrgs:                                   &flagutil.Strings{},
 }

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

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 4728410 and 2 for PR HEAD 81a4fb8 in total

@Prucek

Prucek commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

/test checkconfig

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 29, 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: 0

Caution

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

⚠️ Outside diff range comments (1)
cmd/registry-replacer/main.go (1)

53-71: Initialize ignoreOrgs to prevent a startup panic.

Line 71 registers o.ignoreOrgs with flag.Var(), but the options literal never initializes it, causing a nil pointer panic. Initialize it alongside the other flagutil.Strings fields.

Fix
 o := &options{
 	ensureCorrectPromotionDockerfileIngoredRepos: &flagutil.Strings{},
 	ignoreRepos: &flagutil.Strings{},
+	ignoreOrgs: &flagutil.Strings{},
 }

@droslean

Copy link
Copy Markdown
Member

/lgtm
/approve
/retest

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2026
@Prucek

Prucek commented Jan 30, 2026

Copy link
Copy Markdown
Member Author

/override ci/prow/images
/override ci/prow/e2e

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@openshift-ci

openshift-ci Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

@Prucek: Overrode contexts on behalf of Prucek: ci/prow/e2e, ci/prow/images

Details

In response to this:

/override ci/prow/images
/override ci/prow/e2e

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.

@bear-redhat

Copy link
Copy Markdown
Contributor

/lgtm

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

openshift-ci Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 30, 2026

Copy link
Copy Markdown
Member Author

/override ci/prow/e2e

@openshift-ci

openshift-ci Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

@Prucek: Overrode contexts on behalf of Prucek: ci/prow/e2e

Details

In response to this:

/override ci/prow/e2e

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-merge-bot
openshift-merge-bot Bot merged commit a1cf5a1 into openshift:main Jan 30, 2026
13 of 14 checks passed
@openshift-ci

openshift-ci Bot commented Jan 30, 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 0f5477f 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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants