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-7570 | fix: Small bugfix for rosa describe machinepool #1967
Conversation
@@ -71,6 +71,7 @@ func DescribeMachinePoolRunner(userOptions DescribeMachinepoolUserOptions) rosa. | |||
userOptions.machinepool = argv[0] | |||
} else { | |||
err := cmd.ParseFlags(argv) | |||
userOptions.machinepool = cmd.Flag("machinepool").Value.String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hunterkepley Is userOptions.machinepool
not set at the entry to this function if you pass the --machinepool
argument to this command? It should be given the way you initialise the FlagSet
in the NewDescribeMachinePool
function. If it's not, then we need to come back to the pattern here as that's pretty fundamental.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not it seems, cannot run the command without this @robpblake
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1967 +/- ##
==========================================
+ Coverage 23.22% 23.24% +0.01%
==========================================
Files 136 136
Lines 21160 21161 +1
==========================================
+ Hits 4914 4918 +4
+ Misses 15879 15878 -1
+ Partials 367 365 -2 ☔ View full report in Codecov by Sentry. |
@@ -71,6 +71,7 @@ func DescribeMachinePoolRunner(userOptions DescribeMachinepoolUserOptions) rosa. | |||
userOptions.machinepool = argv[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hunterkepley I think you need to replace the cobra.NoArgs
on the cmd
definition with cobra.MaximumNArgs(1)
. That's what is was prior to your refactor and why passing the workers
name as an arg is being rejected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robpblake fixed
@@ -71,6 +71,7 @@ func DescribeMachinePoolRunner(userOptions DescribeMachinepoolUserOptions) rosa. | |||
userOptions.machinepool = argv[0] | |||
} else { | |||
err := cmd.ParseFlags(argv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hunterkepley I think we can drop this additional cmd.ParseFlags
call as it should already be done by this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robpblake was able to drop that, but not the line mentioned in the first comment you made
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't pass tests after removing
bbe2ce5
to
0d51f55
Compare
@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. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gdbranco, hunterkepley 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:
Approvers can indicate their approval by writing |
OCM-7570 describes a bug for
rosa describe machinepool
. This MR fixes that bug