Skip to content

OTA-1856: pkg/cli/admin/release/mirror: Deprecate in favor of oc-mirror#2195

Open
wking wants to merge 1 commit intoopenshift:mainfrom
wking:deprecate-adm-release-mirror
Open

OTA-1856: pkg/cli/admin/release/mirror: Deprecate in favor of oc-mirror#2195
wking wants to merge 1 commit intoopenshift:mainfrom
wking:deprecate-adm-release-mirror

Conversation

@wking
Copy link
Member

@wking wking commented Feb 5, 2026

Reduce the number of use-facing commands that need to be documented and maintained. oc-mirror provides a more comprehensive experience, including mirroring OLM catalogs and Sigstore signatures and other functionality that is necessary in most OpenShift deployments.

Summary by CodeRabbit

  • Deprecations
    • The Mirror subcommand in the admin release CLI has been marked as deprecated. This change initiates the deprecation timeline for this functionality.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 5, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 5, 2026

@wking: This pull request references OTA-1856 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Reduce the number of use-facing commands that need to be documented and maintained. oc-mirror provides a more comprehensive experience, including mirroring OLM catalogs and Sigstore signatures and other functionality that is necessary in most OpenShift deployments.

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0dca5041-fae0-4ce5-b6d3-108519ce7761

📥 Commits

Reviewing files that changed from the base of the PR and between 84e5849 and 582b29c.

📒 Files selected for processing (1)
  • pkg/cli/admin/release/mirror.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/cli/admin/release/mirror.go

Walkthrough

Added a Deprecated message to the Cobra command for the mirror subcommand indicating deprecation in 4.22 and planned removal in 5.1. No functional changes to Run, Complete, Validate, control flow, or error handling.

Changes

Cohort / File(s) Summary
Deprecation Notice
pkg/cli/admin/release/mirror.go
Set the Cobra command's Deprecated field to indicate deprecation in 4.22 and planned removal in 5.1; no codepath or behavior changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: deprecating the Mirror command in the admin release subcommand in favor of oc-mirror, directly matching the changeset modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Stable And Deterministic Test Names ✅ Passed This pull request does not contain any Ginkgo tests. The pkg/cli/admin/release/mirror_test.go file uses the standard Go testing framework with t.Run() subtests, not Ginkgo. All test names are static and descriptive, containing no dynamic information that changes between runs. Since the custom check applies exclusively to Ginkgo test names and this PR contains no Ginkgo tests, the check is not applicable and therefore passes.
Test Structure And Quality ✅ Passed The custom check requests Ginkgo test code review, but this PR uses Go's standard testing package with table-driven unit tests, not Ginkgo BDD-style tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@openshift-ci openshift-ci bot requested review from ardaguclu and tchap February 5, 2026 20:47
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wking

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2026
@wking wking force-pushed the deprecate-adm-release-mirror branch from b9ef5c0 to 92e6968 Compare February 5, 2026 20:47
@wking
Copy link
Member Author

wking commented Feb 5, 2026

Testing with 92e6968:

$ ./oc adm release mirror --help >/dev/null 
Command "mirror" is deprecated, with deprecation (but continued support) in 4.22 with removal planned for 5.0.  Please use oc-mirror instead.

@wking wking force-pushed the deprecate-adm-release-mirror branch from 92e6968 to a577c3a Compare February 5, 2026 20:53
@wking
Copy link
Member Author

wking commented Feb 5, 2026

Subin suggested 5.1 removal instead, so I've pushed 92e6968 -> a577c3a with that pivot.

Copy link

@coderabbitai coderabbitai bot left a comment

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 `@pkg/cli/admin/release/mirror.go`:
- Around line 96-99: Update the Deprecated message on the mirror command to
match the intended removal version: locate the cobra command definition that has
the Deprecated field (the command with Use: "mirror", Short: "Mirror a release
to a different image registry location") and change the text from "with
deprecation (but continued support) in 4.22 with removal planned for 5.1. 
Please use oc-mirror instead." to use "removal planned for 5.0" so the
deprecation timeline is consistent with the PR and CLI output.

Comment on lines 96 to 99
Use: "mirror",
Short: "Mirror a release to a different image registry location",
Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 5.1. Please use oc-mirror instead.",
Long: templates.LongDesc(`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align deprecation timeline with stated intent (Line 98).

PR objectives and reported CLI output indicate removal planned for 5.0, but the message says 5.1. Please update the version to avoid user-facing inconsistencies.

Proposed fix
-		Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 5.1.  Please use oc-mirror instead.",
+		Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 5.0.  Please use oc-mirror instead.",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Use: "mirror",
Short: "Mirror a release to a different image registry location",
Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 5.1. Please use oc-mirror instead.",
Long: templates.LongDesc(`
Use: "mirror",
Short: "Mirror a release to a different image registry location",
Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 5.0. Please use oc-mirror instead.",
Long: templates.LongDesc(`
🤖 Prompt for AI Agents
In `@pkg/cli/admin/release/mirror.go` around lines 96 - 99, Update the Deprecated
message on the mirror command to match the intended removal version: locate the
cobra command definition that has the Deprecated field (the command with Use:
"mirror", Short: "Mirror a release to a different image registry location") and
change the text from "with deprecation (but continued support) in 4.22 with
removal planned for 5.1.  Please use oc-mirror instead." to use "removal planned
for 5.0" so the deprecation timeline is consistent with the PR and CLI output.

@wking wking force-pushed the deprecate-adm-release-mirror branch from a577c3a to 84e5849 Compare February 5, 2026 21:28
Copy link
Member

@ardaguclu ardaguclu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering that oc-mirror covers feature parity of this, I think, this is the right move.

Short: "Mirror a release to a different image registry location",
Use: "mirror",
Short: "Mirror a release to a different image registry location",
Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 5.1. Please use oc-mirror instead.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to align with other deprecation messages, what about this;

Suggested change
Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 5.1. Please use oc-mirror instead.",
Deprecated: "and will be removed in the future (5.1). Use oc-mirror instead.",

@dis016
Copy link

dis016 commented Feb 10, 2026

Test Scenario: verify warning is present in oc adm release mirror --help

Step1: Launch cluster with changes.

launch 4.22,openshift/oc#2195 aws

Step2: verify warning is present with oc adm release mirror --help

 
dinesh@Dineshs-MacBook-Pro Downloads % ./oc version 
Client Version: v4.2.0-alpha.0-2866-g1d1ef6d
Kustomize Version: v5.7.1
Server Version: 4.22.0-0-2026-02-10-063526-test-ci-ln-xt2fwzb-latest
Kubernetes Version: v1.34.2
dinesh@Dineshs-MacBook-Pro Downloads % ./oc adm release mirror --help >/dev/null
Command "mirror" is deprecated, with deprecation (but continued support) in 4.22 with removal planned for 5.1.  Please use oc-mirror instead.
dinesh@Dineshs-MacBook-Pro Downloads % 

@dis016
Copy link

dis016 commented Feb 10, 2026

/verified by @dis016

1 similar comment
@dis016
Copy link

dis016 commented Mar 2, 2026

/verified by @dis016

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 2, 2026
@openshift-ci-robot
Copy link

@dis016: This PR has been marked as verified by @dis016.

Details

In response to this:

/verified by @dis016

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 openshift-eng/jira-lifecycle-plugin repository.

Reduce the number of use-facing commands that need to be documented
and maintained.  oc-mirror provides a more comprehensive experience,
including mirroring OLM catalogs and Sigstore signatures and other
functionality that is necessary in most OpenShift deployments.
@wking wking force-pushed the deprecate-adm-release-mirror branch from 84e5849 to 582b29c Compare March 6, 2026 05:32
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Mar 6, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 6, 2026

@wking: This pull request references OTA-1856 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Reduce the number of use-facing commands that need to be documented and maintained. oc-mirror provides a more comprehensive experience, including mirroring OLM catalogs and Sigstore signatures and other functionality that is necessary in most OpenShift deployments.

Summary by CodeRabbit

  • Deprecations
  • The Mirror subcommand in the admin release CLI has been marked as deprecated. This change initiates the deprecation timeline for this functionality.

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 openshift-eng/jira-lifecycle-plugin repository.

Short: "Mirror a release to a different image registry location",
Use: "mirror",
Short: "Mirror a release to a different image registry location",
Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 6.0. Please use oc-mirror instead.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to mention about "4.22".

Suggested change
Deprecated: "with deprecation (but continued support) in 4.22 with removal planned for 6.0. Please use oc-mirror instead.",
Deprecated: "and will be removed in the future (6.0). Use oc-mirror instead.",

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 2026

@wking: all tests passed!

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants