Skip to content
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

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

felixfontein
Copy link
Contributor

SUMMARY

Make sure collection name is included in plugin deprecations from collections.

(One part of #73058.)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/plugins/loader.py

@ansibot ansibot added affects_2.11 botmeta This PR modifies the BOTMETA.yml and this requires special attention! bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. 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 Jan 14, 2021
@felixfontein
Copy link
Contributor Author

A test for this is contained in #73240.

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jan 14, 2021
@felixfontein
Copy link
Contributor Author

/rebuild_failed

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 15, 2021
@@ -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)
Copy link
Contributor Author

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).

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 17, 2021
@Shrews Shrews removed the needs_triage Needs a first human triage before being processed. label Jan 19, 2021
@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 Jan 27, 2021
@ansibot ansibot removed the support:community This issue/PR relates to code supported by the Ansible community. label Mar 8, 2021
@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 Nov 4, 2021
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 4, 2021
@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 Nov 16, 2021
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels May 5, 2022
@mattclay
Copy link
Member

@felixfontein Is this still something you're working on and would like to rebase?

@felixfontein
Copy link
Contributor Author

@mattclay if there is a chance that this will actually get reviewed and merged, I would like to rebase and update it.

@mattclay
Copy link
Member

@felixfontein Is there benefit to merging this without also having #73240?

@felixfontein
Copy link
Contributor Author

It doesn't really need #73240, but without a fix for #73051 this is probably only helpful in limited cases (maybe inventory or vars plugins - I'd have to test).

@mattclay
Copy link
Member

OK, perhaps we're better off waiting until #73051 is resolved then.

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jul 12, 2023
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. labels Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.15 botmeta This PR modifies the BOTMETA.yml and this requires special attention! bug This issue/PR relates to a bug. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html 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:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants