registry-replacer: add ignore-repos option
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: https://github.com/openshift/ci-tools/pull/4851
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
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.
/retest-required
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
/hold
/retest-required /test e2e
/test e2e
/test e2e
/unhold /retest-required
[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
- ~~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
/override ci/prow/integration-optional-test
@Prucek: Overrode contexts on behalf of Prucek: ci/prow/integration-optional-test
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.
@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 | 9f94f2dbf3345cc9f239d7c95a6e40ea6ae467fa | 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.