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
Closed
DNM Fix using a fully qualified ansible.builtin module after legacy module#78814s-hertel wants to merge 7 commits intoansible:stable-2.18from
s-hertel wants to merge 7 commits intoansible:stable-2.18from
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
3c33654 to
2946d31
Compare
2946d31 to
1531d0c
Compare
12c8e45 to
1759964
Compare
s-hertel
commented
Sep 22, 2022
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
8f81e17 to
8886bb1
Compare
This comment was marked as resolved.
This comment was marked as resolved.
71faa7a to
30c8ca1
Compare
This comment was marked as resolved.
This comment was marked as resolved.
mattclay
reviewed
Jun 4, 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)) |
Member
There was a problem hiding this comment.
Is this change still needed? It seems that the tests pass even without this modification.
Contributor
Author
There was a problem hiding this comment.
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.
… same play by ensuring the cached filename includes the fully qualified name
…gacy module, that the builtin can no longer be used
670cd2d to
2e0ef63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Fix legacy modules being cached and subsequently incorrectly used for fully qualified ansible.builtin modules.
ISSUE TYPE
COMPONENT NAME
plugin/loader.py