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

Support multiple -v for verbosity #564

Merged
merged 2 commits into from
Jun 16, 2023
Merged

Support multiple -v for verbosity #564

merged 2 commits into from
Jun 16, 2023

Conversation

Shrews
Copy link
Contributor

@Shrews Shrews commented Jun 14, 2023

No description provided.

@Shrews Shrews force-pushed the verbosity branch 2 times, most recently from 4115bd6 to aa66bcc Compare June 15, 2023 17:09
@github-actions github-actions bot added the docs Changes to documentation label Jun 15, 2023
@Shrews Shrews marked this pull request as ready for review June 15, 2023 17:42
@Shrews Shrews requested a review from a team as a code owner June 15, 2023 17:42
Copy link
Member

@nitzmahone nitzmahone left a comment

Choose a reason for hiding this comment

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

Overall LGTM- I don't think you need to change anything for the stuff I pointed out, but something to think about, esp if we give runner the same treatment.

docs/usage.rst Show resolved Hide resolved
type=int,
choices=[0, 1, 2, 3],
action=CustomVerbosityAction,
nargs='?',
Copy link
Member

Choose a reason for hiding this comment

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

nargs='?' is potentially a big hammer here, since it can falsely trip when it's the last non-positional arg followed by a positional arg (and I can't recall offhand if you can "push" a token back for the next subparser). -- makes it work, but a lot of people don't understand that.

I think at least for builder, It's actually OK right now, since none of our existing command subparsers currently support trailing posargs, but just something to acknowledge (as well as perhaps a good reason to actually deprecate the numeric syntax?), and to make sure that an existing runner subparser doesn't have this problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be cool for now b/c we don't have positional args, but I did add deprecating the old style in a new deprecation tracking issue #565.

@nitzmahone
Copy link
Member

(and bee-tee-dubs, THANK YOU)

@Shrews Shrews merged commit b04ef6e into ansible:devel Jun 16, 2023
@Shrews Shrews deleted the verbosity branch June 16, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Changes to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants