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

fixes static 'roles:' with play context #80746

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented May 9, 2023

fixes #79373

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

core

@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.16 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. labels May 9, 2023
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label May 11, 2023
@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 May 19, 2023
@bcoca bcoca force-pushed the fix_pb_colleciton_context branch from 6a9dd46 to 3a19f90 Compare May 23, 2023 16:02
@bcoca bcoca marked this pull request as ready for review May 23, 2023 16:02
@ansibot ansibot removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels May 23, 2023
@bcoca bcoca force-pushed the fix_pb_colleciton_context branch from 4f73cce to 26fb731 Compare May 31, 2023 15:33
@nitzmahone
Copy link
Member

I haven't actually debugged through the reproducer, but at a glance this doesn't feel right. I suspect maybe this is running afoul of the "default collection" stuff that was added to make only the first playbook we run from inside a collection plug that collection into the collections short-name resolution path if it's not otherwise specified. I know we tested the behavior with multiple playbooks on the CLI, but I don't remember how much testing we did with various corner cases of import_playbook and that stuff. This predated the actual ability to run playbooks as a collection-addressable resource- it was mainly added as a workaround to having to rewrite all the integration tests for content that was pushed out to collections.

If it's the default collection stuff, we probably just need to resample that every time we start a new playbook- IIRC that would match the behavior of invoking multiple playbooks from the CLI when the first one lived under a collection.

@bcoca
Copy link
Member Author

bcoca commented Jun 1, 2023

not just a playbook, every time you reference a role from another collection, you end up with N contexts, playbook and role(s), imho the latest should have priority, but the former ones should be present also.

@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 Jun 9, 2023
@bcoca bcoca marked this pull request as draft July 5, 2023 17:37
@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. has_issue labels Jul 5, 2023
@bcoca bcoca force-pushed the fix_pb_colleciton_context branch from 9134252 to 5c18933 Compare August 8, 2023 15:34
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Aug 8, 2023
@IPvSean

This comment was marked as off-topic.

@bcoca

This comment was marked as off-topic.

@IPvSean

This comment was marked as off-topic.

@IPvSean

This comment was marked as off-topic.

@bcoca

This comment was marked as off-topic.

@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 Aug 17, 2023
@ansibot ansibot added the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. label Dec 4, 2024
@webknjaz
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ansibot ansibot removed the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. label Jan 21, 2025
@webknjaz
Copy link
Member

@mattclay @sivel this is an example PR that #84375 / #84402 would've helped with.

@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 Jan 21, 2025
@bcoca bcoca force-pushed the fix_pb_colleciton_context branch from 332f498 to 9456681 Compare January 21, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.16 bug This issue/PR relates to a bug. has_issue needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.
Projects
None yet
6 participants