Make sure collection name is included in plugin deprecations from collections - #73239
Make sure collection name is included in plugin deprecations from collections#73239felixfontein wants to merge 3 commits into
Conversation
3f622bc to
6355511
Compare
|
A test for this is contained in #73240. |
|
/rebuild_failed |
| 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.
@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. |
|
@felixfontein Is this PR still needed after the deprecation changes in 2.19? If so, can you provide some additional details on what this is fixing? |
|
I have no idea, I don't know the changes well enough to be able to say. |
|
@felixfontein Do you remember what issue this was meant to resolve? |
|
I think it was mainly to make sure that once #73051 was fixed, that the right collection name is shown next to a plugin-related deprecation ("... will be removed from foo.bar 2.0.0"). |
|
Closing this as per #73051 (comment) |
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