Skip to content

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.

@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

Walkthrough

Added a Deprecated message to the Cobra command for the mirror subcommand, marking it deprecated in 4.22 and planned for 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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 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.

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 a577c3a to 84e5849 Compare February 5, 2026 21:28
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 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.

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

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