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

plugin signature based on options #69947

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

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Jun 8, 2020

Allow same plugin class with same options to be 'the same'

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins

@ansibot ansibot added affects_2.10 core_review feature needs_triage support:core needs_revision and removed core_review labels Jun 8, 2020
@samdoran samdoran added the ci_verified label Jun 8, 2020
@ansibot ansibot removed the ci_verified label Jun 8, 2020
@samdoran samdoran removed the needs_triage label Jun 9, 2020
@samdoran samdoran changed the title hash plugins based on options [WIP] hash plugins based on options Jun 9, 2020
@ansibot ansibot added the WIP label Jun 9, 2020
@ansibot ansibot added the stale_ci label Jun 19, 2020
@ansibot ansibot added pre_azp and removed stale_ci labels Dec 5, 2020
@ansibot ansibot removed the pre_azp label Apr 29, 2021
@bcoca bcoca changed the title [WIP] hash plugins based on options plugin signature based on options Apr 29, 2021
@ansibot ansibot added core_review ci_verified needs_revision and removed WIP needs_revision core_review labels Apr 29, 2021
@ansible ansible deleted a comment from ansibot Apr 29, 2021
@ansibot ansibot added core_review needs_revision and removed ci_verified needs_revision core_review labels Apr 29, 2021
@ansibot ansibot removed the stale_ci label Apr 27, 2022
@ansibot ansibot added the stale_ci label May 5, 2022
@mattclay
Copy link
Member

mattclay commented May 6, 2022

/azp run

@azure-pipelines
Copy link

azure-pipelines bot commented May 6, 2022

Azure Pipelines successfully started running 1 pipeline(s).

@ansibot ansibot removed the stale_ci label May 6, 2022
@ansibot ansibot added needs_ci needs_revision core_review and removed core_review needs_ci needs_revision labels May 11, 2022
@ansibot
Copy link
Contributor

ansibot commented May 11, 2022

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/plugins/connection/__init__.py:106:5: E303: too many blank lines (2)

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/plugins/__init__.py:66:59: undefined-variable: Undefined variable 'variables'

click here for bot help

@ansibot ansibot added needs_revision and removed core_review labels May 11, 2022
lib/ansible/plugins/__init__.py Show resolved Hide resolved

def _gen_signature(self):
# create immutable
s_options = pickle.dumps(self.get_options(hostvars=variables))
Copy link
Contributor

@s-hertel s-hertel May 11, 2022

Choose a reason for hiding this comment

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

If I copy an inventory config file and use both, should the plugin have the same hash, or be unique per source? The latter happens now with pickle.dumps.

Copy link
Member Author

@bcoca bcoca May 11, 2022

Choose a reason for hiding this comment

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

would need the same as connections it's own _gen_signature to include 'source path'

Copy link
Contributor

@s-hertel s-hertel May 11, 2022

Choose a reason for hiding this comment

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

Yeah, that would make sense. It seems like it includes source path now (implicitly) since the hashes are different, but I'm not sure exactly what's happening.

@mattclay mattclay added the ci_verified label May 16, 2022
@ansibot ansibot added the stale_ci label May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 ci_verified feature has_issue needs_revision stale_ci support:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants