Skip to content

role argument spec - only validate documented role params - #82182

Open
s-hertel wants to merge 1 commit into
ansible:develfrom
s-hertel:fix-internal-galaxy-role-spec
Open

s-hertel wants to merge 1 commit into
ansible:develfrom
s-hertel:fix-internal-galaxy-role-spec

Conversation

@s-hertel

@s-hertel s-hertel commented Nov 9, 2023

Copy link
Copy Markdown
Contributor
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
  • Bugfix Pull Request
ADDITIONAL INFORMATION

@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. has_issue ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 9, 2023
@ansibot

ansibot commented Nov 9, 2023

Copy link
Copy Markdown
Contributor

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/galaxy/role.py:85:12: pointless-exception-statement: Exception statement has no effect

click here for bot help

@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Nov 9, 2023
Comment thread lib/ansible/galaxy/role.py Outdated
Comment thread lib/ansible/cli/galaxy.py
Comment thread lib/ansible/cli/galaxy.py Outdated
Comment thread lib/ansible/playbook/role/metadata.py Outdated
Comment thread lib/ansible/cli/galaxy.py Outdated
Comment thread lib/ansible/galaxy/role.py Outdated
Comment thread lib/ansible/galaxy/role.py Outdated
@ansibot ansibot removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. ci_verified Changes made in this PR are causing tests to fail. labels Nov 10, 2023
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 22, 2023
@VorobevPavel-dev

VorobevPavel-dev commented Dec 8, 2023

Copy link
Copy Markdown

@s-hertel @bcoca checked changes with my error.

(valid args) On branch from PR there is no log for argument_spec task (seems like it runs check but with name from previous task): https://pastebin.com/pHw9zMK5

(invalid args) If there is any error, it relates to previous role, not current's argument_spec task: https://pastebin.com/9wTESW6Y

@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jan 28, 2025
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Apr 15, 2025
@s-hertel
s-hertel force-pushed the fix-internal-galaxy-role-spec branch from 738d0b8 to 011f605 Compare August 28, 2025 19:15
@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_pr This PR has not been pushed to for more than one year. labels Aug 28, 2025
@s-hertel
s-hertel force-pushed the fix-internal-galaxy-role-spec branch from 011f605 to 8da8abb Compare August 28, 2025 19:18
@s-hertel s-hertel changed the title Fix validating role params of dependencies that are used by ansible-galaxy role argument spec - only validate documented role params Aug 28, 2025
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Aug 28, 2025
@s-hertel
s-hertel force-pushed the fix-internal-galaxy-role-spec branch 2 times, most recently from 42bbb93 to 71d4e18 Compare August 28, 2025 20:13
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Aug 28, 2025
@s-hertel
s-hertel requested review from Shrews and bcoca August 28, 2025 21:01
Shrews
Shrews previously approved these changes Aug 29, 2025

@Shrews Shrews left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the life of me, I cannot remember why role params were included.

Comment thread test/integration/targets/roles_arg_spec/test.yml
@s-hertel
s-hertel marked this pull request as ready for review August 29, 2025 15:52
@ansibot ansibot added stale_review Updates were made after the last review and the last review is more than 7 days old. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 29, 2025
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Sep 12, 2025
@s-hertel

This comment was marked as resolved.

@azure-pipelines

This comment was marked as resolved.

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Sep 15, 2025
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Sep 30, 2025
@s-hertel

This comment was marked as resolved.

@azure-pipelines

This comment was marked as resolved.

@ansibot ansibot added pending_ci and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. pending_ci labels Mar 5, 2026
…ams will be validated

Validate the expected error message
@s-hertel
s-hertel force-pushed the fix-internal-galaxy-role-spec branch from aa023fb to 3fe64ea Compare March 16, 2026 15:33
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 25, 2026
@ansibot ansibot removed the stale_review Updates were made after the last review and the last review is more than 7 days old. label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue/PR relates to a bug. has_issue stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected role argument spec behavior with transitive dependencies

5 participants