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

make collection warning message clearer #74859

Merged
merged 3 commits into from
Apr 4, 2022

Conversation

fchyla
Copy link

@fchyla fchyla commented May 30, 2021

SUMMARY

Fix for #74767 collection warning message

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/cli

ADDITIONAL INFORMATION

Make the warning message state clearer and state that it will pick up a collection if it's within a playbook adjacent directory.

@ansibot ansibot added affects_2.12 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. new_contributor This PR is the first contribution by a new community member. small_patch 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 May 30, 2021
@eqrx eqrx linked an issue May 31, 2021 that may be closed by this pull request
1 task
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Jun 1, 2021
Comment on lines 1205 to 1206
"collections paths '%s'. The installed collection won't be picked up in an Ansible "
"run." % (to_text(path), to_text(":".join(collections_path))))
"run, unless within a playbook adjacent collections directory." % (to_text(path), to_text(":".join(collections_path))))
Copy link
Contributor

Choose a reason for hiding this comment

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

This wording doesn't really clarify the issue. It's probably easier to change the "won't" to "may".

Copy link
Author

@fchyla fchyla Jun 2, 2021

Choose a reason for hiding this comment

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

How does this sound?

The specified collections path '%s' is not part of the configured Ansible collections paths '%s'. The installed collection may not be picked up in an Ansible run, unless within a playbook adjacent collections directory.

Copy link
Contributor

Choose a reason for hiding this comment

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

The phrase "unless within a playbook adjacent collections directory" is a mouthful. It's also not immediately apparent what that means unless the reader is well versed in Ansible jargon.

The specified collections path '%s' is not part of the configured Ansible collections paths '%s'. The installed collection may not be picked up in an Ansible run.

If there is a strong desire to mention adjacency (I know this was explicitly requested in the related issue, but I don't think it's the clearest phrasing), then something like this is probably best:

The specified collections path '%s' is not part of the configured Ansible collections paths '%s'. The installed collection will not be picked up in an Ansible run unless adjacent to a playbook.

@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 Jun 2, 2021
@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 Jun 10, 2021
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
Copy link
Contributor

@samccann samccann left a comment

Choose a reason for hiding this comment

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

Added the changes from the comments. LGTM

@ansibot ansibot removed 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 31, 2022
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
@samccann samccann merged commit 3fe5f57 into ansible:devel Apr 4, 2022
@samccann
Copy link
Contributor

samccann commented Apr 4, 2022

Thanks @fchyla for the Ansible docs fix!

@ansible ansible locked and limited conversation to collaborators Apr 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.12 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. new_contributor This PR is the first contribution by a new community member. 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.

Clarify ansible-galaxy collection install warning message
4 participants