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

registry-replacer: add ignore-repos option

Open Prucek opened this issue 2 months ago • 10 comments

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

Prucek avatar Jan 08 '26 14:01 Prucek

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

openshift-ci-robot avatar Jan 08 '26 14:01 openshift-ci-robot

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.

coderabbitai[bot] avatar Jan 08 '26 14:01 coderabbitai[bot]

/retest-required

Prucek avatar Jan 09 '26 08:01 Prucek

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 Jan 09 '26 10:01 openshift-ci-robot

/hold

Prucek avatar Jan 09 '26 10:01 Prucek

/retest-required /test e2e

Prucek avatar Jan 09 '26 12:01 Prucek

/test e2e

Prucek avatar Jan 15 '26 15:01 Prucek

/test e2e

Prucek avatar Jan 20 '26 15:01 Prucek

/unhold /retest-required

Prucek avatar Jan 21 '26 07:01 Prucek

[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

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

openshift-ci[bot] avatar Jan 21 '26 07:01 openshift-ci[bot]

/override ci/prow/integration-optional-test

Prucek avatar Jan 21 '26 08:01 Prucek

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

openshift-ci[bot] avatar Jan 21 '26 08:01 openshift-ci[bot]

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

openshift-ci[bot] avatar Jan 21 '26 09:01 openshift-ci[bot]