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

ansible-galaxy tidy up arg parse with better validation #59957

Merged
merged 3 commits into from Aug 13, 2019

Conversation

jborean93
Copy link
Contributor

@jborean93 jborean93 commented Aug 1, 2019

SUMMARY

Tidies up the argument spec for ansible-galaxy to make it cleaner and easier to see what actions belong to a specific type. Also;

  • Adds validation for ansible-galaxy collection install to validate the collection name
  • Respects the verbosity option if set at the root parser

Fixes #59202
Fixes #59584

Unfortunately verbosity can only be set at 1 level, it is recommened by @sivel to keep this at the root parser ansible-galaxy -v collection .... instead of per action. This is a regression from the move to argparse in 2.9 and I haven't been able to find a way to keep both locations preserved. Link to agenda comment ansible/community#482 - PR now preserves the -v option if it comes before the sub parser but this behaviour is deprecated due to the extra manual work that is required.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible-galaxy

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. has_issue needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Aug 1, 2019
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Aug 6, 2019
@jborean93 jborean93 added the ci_verified Changes made in this PR are causing tests to fail. label Aug 7, 2019
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Aug 7, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 11, 2019
@ansibot ansibot added the support:community This issue/PR relates to code supported by the Ansible community. label Aug 13, 2019
@jborean93
Copy link
Contributor Author

The unstable test is unrelated (docker_swarm) failure.

@jborean93 jborean93 merged commit 14a7722 into ansible:devel Aug 13, 2019
@jborean93 jborean93 deleted the galaxy-argspec branch August 13, 2019 20:36
@ansible ansible locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. has_issue support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
3 participants