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

Use command path when registering flagsets #769

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

chancez
Copy link
Contributor

@chancez chancez commented Jul 29, 2022

Avoids conflicts when different sub-commands have the same command name.
(Eg: hubble status vs hubble foobar status).

Since commands paths rely on having parent-commands, we must initialize
the map containing the flagsets after all sub-commands have been added.

This was something I discovered after trying to add new sub-commands that have the same name as other sub-sub-commands.

@chancez chancez requested a review from a team as a code owner July 29, 2022 17:52
@chancez chancez requested review from michi-covalent and removed request for a team July 29, 2022 17:52
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label PR is blocked until the release note is set label Jul 29, 2022
@chancez chancez force-pushed the pr/chancez/command_flag_registration branch from d5a989e to 62374b1 Compare July 29, 2022 18:28
Avoids conflicts when different sub-commands have the same command name.
(Eg: hubble status vs hubble foobar status).

Since commands paths rely on having parent-commands, we must initialize
the map containing the flagsets after all sub-commands have been added.

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
@chancez chancez force-pushed the pr/chancez/command_flag_registration branch from 62374b1 to b18ccd4 Compare July 29, 2022 18:29
Copy link
Collaborator

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

let's also get @rolinh to review it

@rolinh rolinh added the release-note/misc This PR makes changes that have no direct user impact. label Aug 2, 2022
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label PR is blocked until the release note is set label Aug 2, 2022
Copy link
Member

@rolinh rolinh left a comment

Choose a reason for hiding this comment

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

lgtm

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 2, 2022
@rolinh rolinh merged commit a5e8697 into cilium:master Aug 2, 2022
@chancez chancez deleted the pr/chancez/command_flag_registration branch August 2, 2022 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants