-
Notifications
You must be signed in to change notification settings - Fork 24k
Fix validating role params of dependencies that are used by ansible-galaxy #82182
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
base: devel
Are you sure you want to change the base?
Conversation
…alaxy Validate normally if these are documented by the role, but don't require documentation since the role may be unaware of these fields used by ansible-galaxy.
The test
|
# Since role runtime (with argument spec) requires all role params be documented, | ||
# add a supplemental spec so this isn't a failure by default for ansible-galaxy options. | ||
# If the role actually documents these options, they'll be validated normally. | ||
internal_galaxy_spec = {k: {} for k in VALID_SPEC_KEYS} |
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.
I would add warning/debug with the skipped keys, for those that are 'overloading' role params and expecting a variable to pass through.
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.
i just remembered, we did add that warning at one point .. .i'm just not sure where/at what 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.
I feel like we'd need to deprecate this dependencies syntax for ansible-galaxy if we want to issue a warning at runtime by default. I could add a debug message in addition to or instead of the vvv message in validate_argument_spec.
@s-hertel @bcoca checked changes with my error. (valid args) On branch from PR there is no log for (invalid args) If there is any error, it relates to previous role, not current's |
SUMMARY
Fixes #82154
Validate normally if these are documented by the role, but don't require documentation since the role may be unaware of these fields used by ansible-galaxy.
ISSUE TYPE
ADDITIONAL INFORMATION