Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCM-6391 | fix: Fixed bug where deprecation shows for parent cmd #1931

Merged
merged 1 commit into from Apr 15, 2024

Conversation

hunterkepley
Copy link
Contributor

@hunterkepley hunterkepley commented Apr 15, 2024

OCM-6391 is a previously finished ticket which had a small bug, it is now fixed. The deprecation msg was showing up in parent cmds, when it was only meant to show up in certain subcommands. This MR fixes that

@marcolan018
Copy link
Contributor

/lgtm

1 similar comment
@davidleerh
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. labels Apr 15, 2024
@hunterkepley
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 4ed3a62 and 2 for PR HEAD 6f16c85 in total

@hunterkepley
Copy link
Contributor Author

/retest

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2024
@hunterkepley
Copy link
Contributor Author

did not print deprecation msg on usage of cmds, added manually to each run command in the same func, now prints when running the deprecated cmds

Copy link
Contributor

openshift-ci bot commented Apr 15, 2024

@hunterkepley: all tests passed!

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/test-infra repository. I understand the commands that are listed here.

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 21.69%. Comparing base (2eaeea7) to head (541960a).
Report is 2 commits behind head on master.

Files Patch % Lines
pkg/arguments/arguments.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1931   +/-   ##
=======================================
  Coverage   21.69%   21.69%           
=======================================
  Files         118      118           
  Lines       19797    19804    +7     
=======================================
+ Hits         4294     4297    +3     
- Misses      15181    15186    +5     
+ Partials      322      321    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdbranco
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2024
Copy link
Contributor

openshift-ci bot commented Apr 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidleerh, gdbranco, hunterkepley, marcolan018

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [davidleerh,gdbranco]

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

@openshift-merge-bot openshift-merge-bot bot merged commit f79cc7b into openshift:master Apr 15, 2024
9 checks passed
@patjlm
Copy link

patjlm commented Apr 16, 2024

This change is breaking json outputs as the message is always printed:

$ rosa list clusters -o json
W: Region flag will be removed from this command in future versions
[]

command.Parent().HelpFunc()(command, strings)
})
currentRun := cmd.Run
cmd.Run = func(c *cobra.Command, args []string) {
_, _ = fmt.Fprintf(os.Stdout, "%s%s\n", "\u001B[0;33mW:\u001B[m ", regionDeprecationMessage)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can check if output flag is being requested before printing

Copy link

Choose a reason for hiding this comment

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

Yes, seems fixed in #1936 and #1937. Thanks!

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants