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 - fix role list bug #67391

Merged

Conversation

samdoran
Copy link
Contributor

@samdoran samdoran commented Feb 13, 2020

SUMMARY

Properly list roles even when the role name is the same or a substring of the path to the role.

When the role name is a subset of the role path, the full path to the role would be improperly constructed. This resulted in a failure to find the meta/main.yml file for the role, resulting in the role not being listed.

Fixes #67365

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/galaxy/role.py

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. 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. labels Feb 13, 2020
@ansibot ansibot added 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 Feb 13, 2020
Properly list roles even when the role name is the same or a substring of the
path to the role.
@samdoran samdoran force-pushed the issue/67365-role-name-in-roles-path branch from 4dd736a to 80dce2a Compare February 17, 2020 18:11
lib/ansible/galaxy/role.py Show resolved Hide resolved
@s-hertel s-hertel merged commit c64202a into ansible:devel Feb 17, 2020
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Feb 17, 2020
@samdoran samdoran deleted the issue/67365-role-name-in-roles-path branch February 17, 2020 21:19
samdoran added a commit to samdoran/ansible that referenced this pull request Feb 20, 2020
Properly list roles even when the role name is the same or a substring of the
path to the role..
(cherry picked from commit c64202a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
samdoran added a commit to samdoran/ansible that referenced this pull request Mar 2, 2020
Properly list roles even when the role name is the same or a substring of the
path to the role.

(cherry picked from commit c64202a)
samdoran added a commit to samdoran/ansible that referenced this pull request Mar 2, 2020
Properly list roles even when the role name is the same or a substring of the
path to the role.

(cherry picked from commit c64202a)
mattclay pushed a commit that referenced this pull request Mar 3, 2020
Properly list roles even when the role name is the same or a substring of the
path to the role.

(cherry picked from commit c64202a)
@ansible ansible locked and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. 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
Development

Successfully merging this pull request may close these issues.

ansible-galaxy list is not listing certain valid roles
5 participants