OCPBUGS-64640: skip unnecessary environment setup for version and lis…#1384
OCPBUGS-64640: skip unnecessary environment setup for version and lis…#1384dorzel wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@dorzel: This pull request references Jira Issue OCPBUGS-64640, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe change reorganizes the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dorzel 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 |
|
/retest |
|
@dorzel: all tests passed! 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. |
| log.Info(emoji.Gear+" environment version: %s", version.Get().GitVersion) | ||
|
|
||
| // Skip environment setup for subcommands that don't need it | ||
| if cmd.Name() == "version" || (cmd.Parent() != nil && cmd.Parent().Name() == "list") { |
There was a problem hiding this comment.
I think this condition won't include oc-mirror list --help
|
What is the benefit of doing this? |
…t subcommands
Description
Skip unnecessary environment setup (umask check, workspace validation, cache dir resolution) for
version,list operators, andlist releasessubcommands. Keep welcome message, log level configuration, and version output for all subcommandsGithub / Jira issue: https://redhat.atlassian.net/browse/OCPBUGS-64640
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
oc-mirror version --v2oc-mirror --v2 list releasesoc-mirror --v2 list operators --catalog=registry.redhat.io/redhat/redhat-operator-index:v4.21Expected Outcome
Output in question does not exist for version and list subcommands. Continues to exist for all other commands.