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 sure collection name is included in plugin deprecations from collections #73239
base: devel
Are you sure you want to change the base?
Make sure collection name is included in plugin deprecations from collections #73239
Conversation
3f622bc
to
6355511
Compare
A test for this is contained in #73240. |
/rebuild_failed |
@@ -799,7 +801,8 @@ def get_with_context(self, name, *args, **kwargs): | |||
|
|||
if path not in self._module_cache: | |||
self._module_cache[path] = self._load_module_source(name, path) | |||
self._load_config_defs(name, self._module_cache[path], path) | |||
self._load_config_defs( | |||
name, self._module_cache[path], path, collection_name=plugin_load_context.plugin_resolved_collection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bcoca including the collection name in name
isn't trivial, since sometimes name
is not a short name, but something else; for example I saw ansible_collections.ansible.builtin.plugins.lookup.file
when running the following playbook:
- hosts: localhost
tasks:
- debug:
msg: "{{ lookup('ansible.builtin.file', 'asdf') }}"
I guess that this shouldn't happen and should be fixed, but without that fixed I don't see how to combine name + collection name into one parameter without introducing a new syntax (that uses another separator).
b61a863
to
f9f1876
Compare
@felixfontein Is this still something you're working on and would like to rebase? |
@mattclay if there is a chance that this will actually get reviewed and merged, I would like to rebase and update it. |
@felixfontein Is there benefit to merging this without also having #73240? |
OK, perhaps we're better off waiting until #73051 is resolved then. |
SUMMARY
Make sure collection name is included in plugin deprecations from collections.
(One part of #73058.)
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/loader.py