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

Fix reading role skeleton path from config/env #22252

Closed
wants to merge 1 commit into from

Conversation

azenk
Copy link
Contributor

@azenk azenk commented Mar 3, 2017

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible-galaxy

ANSIBLE VERSION
ansible 2.3.0 (fix_skeleton_config 75ccfd23ed) last updated 2017/03/03 09:27:57 (GMT -500)
  config file = 
  configured module search path = Default w/o overrides
SUMMARY

CLI.get_opt() will only use the passed default value if an exception is raised
while trying to read the option value from the parsed values. As a
result, the C.GALAXY_ROLE_SKELETON value was never read. Instead of
relying on the default value, we explicitly check to see if
role_skeleton was set, and use C.GALAXY_ROLE_SKELETON if it isn't.

This is tested by patching C.GALAXY_ROLE_SKELETON to point to the role
skeleton in our test_data folder, and not supplying a role skeleton
argument.

CLI.get_opt() will only use the passed default value if an exception is raised
while trying to read the option value from the parsed values.  As a
result, the C.GALAXY_ROLE_SKELETON value was never read.  Instead of
relying on the default value, we explicitly check to see if
role_skeleton was set, and use C.GALAXY_ROLE_SKELETON if it isn't.

This is tested by patching C.GALAXY_ROLE_SKELETON to point to the role
skeleton in our test_data folder, and not supplying a role skeleton
argument.
@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 bugfix_pull_request c:cli/galaxy needs_triage Needs a first human triage before being processed. labels Mar 3, 2017
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Mar 3, 2017
@ansibot ansibot added the affects_2.4 This issue/PR affects Ansible v2.4 label Mar 23, 2017
@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 Apr 11, 2017
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jun 24, 2017
@azenk
Copy link
Contributor Author

azenk commented Jun 28, 2017

It looks like this is fixed by the refactor that extracted all the config from constants.py into a yml file. Closing this PR. If someone wants this rebased against stable-2.3 I'd be willing to do it and re-open.

@azenk azenk closed this Jun 28, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. c:cli/galaxy needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. 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.

None yet

3 participants