Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Resolve module to full qualified name #352

Merged
merged 3 commits into from
Jun 27, 2024

Conversation

cidrblock
Copy link
Contributor

@cidrblock cidrblock commented Jun 27, 2024

If the user provides ansible.module.ping we will now resolve the module to it's fully qualified name for the user.

This avoid a race condtion when building a Play() if no ansible collections are installed and therefore ansible_collection cannot be imported. (as seen here: https://github.com/ansible/pytest-ansible/actions/runs/9684380165/job/26722026516#step:8:21885)

  • Use the abstractmethod decorator to check for def in the subclass rather than the previous approach. This was necessary b/c the base class had no return for has_module but the inheriting class is returning a string.
  • Remove the ansible 2.12 files rather than refactor those.
  • Update type hints, docstring as encountered
  • inventory changes in the conftest as ansible, instread rely on ansible dynamic interpreter discovery
  • A couple class docstrings as required for the latest version of pydoclint

@cidrblock cidrblock requested a review from a team as a code owner June 27, 2024 16:52
@cidrblock cidrblock requested review from audgirka and alisonlhart and removed request for a team June 27, 2024 16:52
@github-actions github-actions bot added the bug label Jun 27, 2024
@cidrblock cidrblock merged commit c320ef1 into ansible:main Jun 27, 2024
16 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants