image-updater: add --repositories flag for y-stream repo version upgrade detection#4892
image-updater: add --repositories flag for y-stream repo version upgrade detection#4892
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hbhushan3 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new repository-version-upgrade subcommand to tooling/image-updater to detect next ACM/MCE version-suffixed Quay repositories and update config files accordingly.
Changes:
- Registers a new cobra subcommand and Makefile target to run repository-version upgrades.
- Introduces
internal/upgradepackage with Quay version detection + file rewrite logic. - Adds unit tests and documentation for the new workflow.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tooling/image-updater/main.go | Registers the new repository-version-upgrade subcommand. |
| tooling/image-updater/cmd/repository_version_upgrade.go | Implements the cobra command, flags, and execution flow. |
| tooling/image-updater/internal/upgrade/upgrade.go | Adds Quay repo detection, version parsing, reporting, and config rewrite logic. |
| tooling/image-updater/internal/upgrade/upgrade_test.go | Adds unit tests covering parsing, Quay checks, formatting, and apply logic. |
| tooling/image-updater/Makefile | Adds upgrade-repository-version target and help text. |
| tooling/image-updater/README.md | Documents the new subcommand usage and behavior. |
| tooling/image-updater/AGENTS.md | Adds agent-facing runbook steps for the new command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@hbhushan3: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
Adds a
--repositories/-rflag to theupdatecommand that detects when new y-stream (minor version) Quay repositories become available for configured components (ACM, MCE). This is config-driven viarepoVersionUpgrade.repoPrefixon each source.Jira: AROSLSRE-645
Problem
ACM/MCE creates new Quay repos per y-stream release (e.g.
acm-operator-bundle-acm-217→acm-operator-bundle-acm-218). The image updater currently only updates digests/tags within a fixed repo — it can't detect when a new version repo appears.Solution
update --repositoriesmode:repoPrefix--dry-run,--output-file, and--output-format(table/markdown/json)--components,--groups,--exclude-components)Config
Sources opt in with
repoVersionUpgrade.repoPrefix:Output Formats
Table (default):
Markdown (
--output-format markdown):JSON (
--output-format json): Full result objects array.Usage
Key Design Decisions
repoVersionUpgrade.repoPrefixare checked — no hardcoded ACM/MCE logic--repositoriesrejects--components/--groups/--exclude-componentssince it operates on a different axisos.Renameto prevent partial writes, preserves original file modeFiles Changed
tooling/image-updater/internal/upgrade/upgrade.go— Core logic: checker, repo detection, formatting, atomic applytooling/image-updater/internal/upgrade/upgrade_test.go— Unit teststooling/image-updater/cmd/update.go— Wires--repositoriesinto update commandtooling/image-updater/internal/options/options.go—--repositories/-rflagtooling/image-updater/internal/config/config.go—RepoVersionUpgradeconfig typetooling/image-updater/config.yaml— ACM/MCE prefixes configuredtooling/image-updater/Makefile—update-repositoriestargettooling/image-updater/README.md— Documentationtooling/image-updater/AGENTS.md— Agent instructions