-
Notifications
You must be signed in to change notification settings - Fork 208
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 | feat: Deprecate the region flag in commands which do not utilize it #1890
Conversation
maybe it's better to remove region flag in the overarching commands, and let the sub-command to add it if the flag required. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1890 +/- ##
==========================================
- Coverage 21.81% 21.75% -0.07%
==========================================
Files 117 118 +1
Lines 18929 19781 +852
==========================================
+ Hits 4130 4303 +173
- Misses 14488 15152 +664
- Partials 311 326 +15 ☔ View full report in Codecov by Sentry. |
@marcolan018 I wanted to do this originally, but it seems adding it to the overarching command is the 'norm' and it is done everywhere even when all subcommands do not use it. I think maybe there should be a wider discussion with @ciaranRoche and @robpblake about this, I am fine with either solution, just not sure what is 'best' here in terms of design/architecture |
@marcolan018 Thread on this here: https://redhat-internal.slack.com/archives/C04C3G5MDKN/p1711732133140609 |
I left a comment on the Slack thread. I agree with @marcolan018 in that I think its preferable to take the time to refactor this in such a way that commands that do support the Your solution works, but I don't think its solving our underlying problem which is that we have global flags being added when its not appropriate. I would vote to take slightly more time to solve this now, once, rather than working around the issue but still having the incorrect underlying behaviour. cheers, Rob |
@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. |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hunterkepley, robpblake 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 |
https://issues.redhat.com/browse/OCM-6391
We put the region flag in almost every overarching command (
create
,delete
,list
, etc) -- yet many of the subcommands do not use region. This can lead to confusion for users. As a solution, I have made a function in the same package following the same naming scheme as the function which adds the region flag. This way, we can disable using the region flag in any command we want with a single line.