Skip to content

Conversation

@r4f4
Copy link

@r4f4 r4f4 commented Sep 22, 2025

This will allow oc-mirror to be injected with the OCP release version it's a part of.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Sep 22, 2025
@openshift-ci-robot
Copy link

@r4f4: This pull request references Jira Issue OCPBUGS-60903, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @nidangavali

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This will allow oc-mirror to be injected with the OCP release version it's a part of.

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.

@openshift-ci openshift-ci bot requested a review from nidangavali September 22, 2025 07:52
@r4f4
Copy link
Author

r4f4 commented Sep 22, 2025

/cc @joepvd

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: r4f4
Once this PR has been reviewed and has the lgtm label, please assign wking for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

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

@r4f4
Copy link
Author

r4f4 commented Sep 22, 2025

/hold
For tests

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 22, 2025
To learn more about OpenShift, visit [docs.openshift.com](https://docs.openshift.com)
and select the version of OpenShift you are using.
# Installing the tools
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO this should be Installing the Tools

Copy link
Author

Choose a reason for hiding this comment

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

I copied from the other instances which are all "Installing the tools" but I can change it, no problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just a nit, anyway. You can just keep it to be consistent.

@r4f4 r4f4 force-pushed the ocpbugs-60903-output-ocp-release-oc-mirror branch from a90ea8e to 08da716 Compare October 20, 2025 08:48
@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

Walkthrough

Added a readme block for the OC Mirror utility and three new extraction target entries (oc-mirror.rhel9, oc-mirror.rhel8, oc-mirror) with binary mappings, archive patterns, and InjectReleaseVersion enabled.

Changes

Cohort / File(s) Summary
OC Mirror extraction targets
pkg/cli/admin/release/extract_tools.go
Added readmeOCMirror documentation block and three extraction targets: oc-mirror.rhel9, oc-mirror.rhel8, and oc-mirror. Each target includes Mapping Image entries (pointing to usr/bin/oc-mirror*), ArchiveFormat patterns (oc-mirror*-%s.tar.gz), InjectReleaseVersion enabled, and appropriate command naming (oc-mirror). Also updated unsupported-command error text to include oc-mirror.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "OCPBUGS-60903: oc adm release extract: add oc-mirror to the tools list" is directly related to the main change in the changeset. The modified file pkg/cli/admin/release/extract_tools.go shows exactly what the title describes: adding oc-mirror (including oc-mirror.rhel9 and oc-mirror.rhel8 variants) to the tools list. The title is concise, clear, and specific enough that a teammate scanning the git history would immediately understand that this change adds oc-mirror tooling support to the release extraction functionality. The inclusion of the Jira issue reference provides additional context without reducing clarity.
Description Check ✅ Passed The pull request description "This will allow oc-mirror to be injected with the OCP release version it's a part of" is related to the changeset and provides meaningful context. While brief, the description clearly explains the purpose and motivation behind adding oc-mirror to the tools list—enabling version injection during the release extraction process. This aligns with the changes shown in the file summary where oc-mirror targets are configured with InjectReleaseVersion flags, making the description a proper explanation of the "why" behind the code changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/cli/admin/release/extract_tools.go (1)

641-641: Update the error message to include oc-mirror.

The error message lists supported commands but does not include the newly added oc-mirror command. Additionally, there's inconsistent quote usage (backticks for openshift-baremetal-install vs. single quotes for others).

Apply this diff to update the error message:

-			return fmt.Errorf("the supported commands are 'oc', 'openshift-install', `openshift-baremetal-install` and 'ccoctl'")
+			return fmt.Errorf("the supported commands are 'oc', 'openshift-install', 'openshift-baremetal-install', 'ccoctl', and 'oc-mirror'")
🧹 Nitpick comments (1)
pkg/cli/admin/release/extract_tools.go (1)

215-216: Clarify the registry mirroring description.

The phrase "from a target registry to another" is awkward. Consider revising to "from one registry to another" or "from a source registry to a target registry" for clarity.

Apply this diff to improve clarity:

-	The oc-mirror tool assists with mirroring OpenShift release content from a target
-	registry to another for disconnected install scenarios.
+	The oc-mirror tool assists with mirroring OpenShift release content from one
+	registry to another for disconnected install scenarios.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between e6eeeb7 and 08da716.

📒 Files selected for processing (1)
  • pkg/cli/admin/release/extract_tools.go (2 hunks)
🔇 Additional comments (1)
pkg/cli/admin/release/extract_tools.go (1)

550-579: Good implementation of oc-mirror tool extraction.

The implementation correctly adds oc-mirror extraction support with proper version injection (InjectReleaseVersion: true), which fulfills the PR objective. The structure follows established patterns for similar tools like ccoctl, with appropriate README documentation and RHEL-specific variants.

This will allow oc-mirror to be injected with the OCP release version
it's a part of.
@r4f4 r4f4 force-pushed the ocpbugs-60903-output-ocp-release-oc-mirror branch from 08da716 to c1f8d9e Compare October 20, 2025 09:07
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: 0

🧹 Nitpick comments (1)
pkg/cli/admin/release/extract_tools.go (1)

643-643: LGTM! Error message updated correctly.

oc-mirror is properly added to the list of supported commands.

Minor pre-existing note: There's inconsistent quote usage in this error message (single quotes vs backticks around openshift-baremetal-install), but that's not introduced by this change.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 08da716 and c1f8d9e.

📒 Files selected for processing (1)
  • pkg/cli/admin/release/extract_tools.go (3 hunks)
🔇 Additional comments (2)
pkg/cli/admin/release/extract_tools.go (2)

212-231: LGTM! Readme follows the established pattern.

The readme content is well-structured and consistent with other tool readmes in the file. The description accurately explains oc-mirror's purpose for disconnected install scenarios.


550-581: LGTM! All three oc-mirror targets are correctly configured.

The implementation properly addresses previous review feedback:

  • NewArch: true is set on all three targets, ensuring graceful extraction failure on releases prior to 4.10 that don't include oc-mirror
  • TargetCommandName is correctly used only for the RHEL-specific variants, following the pattern established by ccoctl
  • InjectReleaseVersion: true enables version injection as described in the PR objectives

The structure and patterns match the ccoctl implementation (lines 518-549), maintaining consistency across the codebase.

@r4f4
Copy link
Author

r4f4 commented Oct 22, 2025

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

@r4f4: The following tests 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/e2e-aws-certrotation a90ea8e link false /test e2e-aws-certrotation
ci/prow/e2e-aws-ovn-serial-1of2 c1f8d9e link true /test e2e-aws-ovn-serial-1of2
ci/prow/okd-scos-e2e-aws-ovn c1f8d9e link false /test okd-scos-e2e-aws-ovn

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

3 participants