Skip to content

DNM Fix using a fully qualified ansible.builtin module after legacy module#78814

Closed
s-hertel wants to merge 7 commits intoansible:stable-2.18from
s-hertel:fix-plugin-obj-names
Closed

DNM Fix using a fully qualified ansible.builtin module after legacy module#78814
s-hertel wants to merge 7 commits intoansible:stable-2.18from
s-hertel:fix-plugin-obj-names

Conversation

@s-hertel
Copy link
Contributor

@s-hertel s-hertel commented Sep 20, 2022

SUMMARY

Fix legacy modules being cached and subsequently incorrectly used for fully qualified ansible.builtin modules.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugin/loader.py

@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.14 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. new_plugin This PR includes a new plugin. 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 Sep 20, 2022
@s-hertel s-hertel marked this pull request as ready for review September 20, 2022 14:12
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. labels Sep 20, 2022
@s-hertel s-hertel added the ci_verified Changes made in this PR are causing tests to fail. label Sep 20, 2022
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed ci_verified Changes made in this PR are causing tests to fail. core_review In order to be merged, this PR must follow the core review workflow. labels Sep 20, 2022
@s-hertel s-hertel marked this pull request as draft September 20, 2022 14:54
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Sep 20, 2022
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Sep 20, 2022
@ansibot

This comment was marked as resolved.

@s-hertel s-hertel force-pushed the fix-plugin-obj-names branch from 3c33654 to 2946d31 Compare September 22, 2022 15:04
@ansibot ansibot added the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. label Sep 22, 2022
@s-hertel s-hertel force-pushed the fix-plugin-obj-names branch from 2946d31 to 1531d0c Compare September 22, 2022 15:06
@ansibot ansibot removed the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. label Sep 22, 2022
@s-hertel s-hertel force-pushed the fix-plugin-obj-names branch from 12c8e45 to 1759964 Compare September 22, 2022 15:23
@webknjaz

This comment was marked as resolved.

@azure-pipelines

This comment was marked as resolved.

@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 Sep 30, 2022
@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 Jan 20, 2023
@s-hertel s-hertel force-pushed the fix-plugin-obj-names branch from 8f81e17 to 8886bb1 Compare January 20, 2023 21:49
@azure-pipelines

This comment was marked as resolved.

@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 May 2, 2024
@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 May 9, 2024
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Apr 1, 2025
@s-hertel s-hertel force-pushed the fix-plugin-obj-names branch from 71faa7a to 30c8ca1 Compare April 14, 2025 20:52
@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Apr 14, 2025
@ansibot

This comment was marked as resolved.

@ansibot ansibot removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 14, 2025
@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 28, 2025

lookup_path = os.path.join(C.DEFAULT_LOCAL_TMP, 'ansiballz_cache') # type: ignore[attr-defined]
cached_module_filename = os.path.join(lookup_path, "%s-%s" % (remote_module_fqn, module_compression))
cached_module_filename = os.path.join(lookup_path, "%s-%s-%s" % (module_name, remote_module_fqn, module_compression))
Copy link
Member

Choose a reason for hiding this comment

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

Is this change still needed? It seems that the tests pass even without this modification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks! My last commit on the branch before your review (670cd2d) broke the test case.

The test case appears to have been fixed by ff6998f, which is included in v2.19.0b3. I'm not sure yet whether there's a dedicated test for this, or if it was fixed as a side effect of something else.

Is any of that commit eligible to be backported to 2.18? I'm not sure this is the correct fix since it's been fixed somehow else, but for demonstration purposes, I've restored the test and changed it to target 2.18, and temporarily removed the bugfix so the failure is visible.

@s-hertel s-hertel changed the base branch from devel to stable-2.18 June 4, 2025 14:20
@s-hertel s-hertel force-pushed the fix-plugin-obj-names branch from 670cd2d to 2e0ef63 Compare June 4, 2025 14:20
@ansibot ansibot added the backport This PR does not target the devel branch. label Jun 4, 2025
@s-hertel s-hertel changed the title Fix using a fully qualified ansible.builtin module after legacy module DNM Fix using a fully qualified ansible.builtin module after legacy module Jun 4, 2025
@s-hertel s-hertel marked this pull request as draft June 4, 2025 14:22
@s-hertel s-hertel marked this pull request as ready for review June 4, 2025 14:23
@s-hertel s-hertel requested a review from mattclay June 4, 2025 14:27
@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 Jun 4, 2025
@sivel sivel marked this pull request as draft June 9, 2025 15:43
@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 16, 2025
@s-hertel s-hertel closed this Aug 18, 2025
@ansible ansible locked and limited conversation to collaborators Sep 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects_2.14 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. new_plugin This PR includes a new plugin. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. 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. test This PR relates to tests. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants