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

[module_utils.distro] Fall back to bundled #74229

Merged
merged 3 commits into from
Apr 13, 2021

Conversation

relrod
Copy link
Member

@relrod relrod commented Apr 11, 2021

SUMMARY

Change:

  • When a "distro" package exists in PYTHONPATH but isn't what we expect,
    fall back to our own vendored one and use it. This prevents a
    traceback if someone has some random thing that provides "distro" but
    isn't actually the "distro" library we need.

Test Plan:

  • new tests

Tickets:

Signed-off-by: Rick Elrod rick@elrod.me

ISSUE TYPE
  • Bugfix Pull Request
  • Test Pull Request
COMPONENT NAME

module_utils distro

Change:
- When a "distro" package exists in PYTHONPATH but isn't what we expect,
  fall back to our own vendored one and use it. This prevents a
  traceback if someone has some random thing that provides "distro" but
  isn't actually the "distro" library we need.

Test Plan:
- new tests

Tickets:
- Fixes ansible#74228

Signed-off-by: Rick Elrod <rick@elrod.me>
@ansibot ansibot added affects_2.12 bug This issue/PR relates to a bug. collection Related to Ansible Collections work collection:ktdreyer.errata_tool_ansible 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 Apr 11, 2021
Signed-off-by: Rick Elrod <rick@elrod.me>
@ansibot

This comment has been minimized.

@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 Apr 12, 2021
Signed-off-by: Rick Elrod <rick@elrod.me>
@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 Apr 12, 2021
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Apr 13, 2021
@samdoran samdoran merged commit fa0bccf into ansible:devel Apr 13, 2021
@ansible ansible locked and limited conversation to collaborators May 11, 2021
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. collection:ktdreyer.errata_tool_ansible collection Related to Ansible Collections work core_review In order to be merged, this PR must follow the core review workflow. 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.

AttributeError: module 'distro' has no attribute 'id' when using the group and user modules
3 participants