Skip to content

fixes static 'roles:' with play context#80746

Draft
bcoca wants to merge 4 commits into
ansible:develfrom
bcoca:fix_pb_colleciton_context
Draft

fixes static 'roles:' with play context#80746
bcoca wants to merge 4 commits into
ansible:develfrom
bcoca:fix_pb_colleciton_context

Conversation

@bcoca

@bcoca bcoca commented May 9, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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

bcoca commented Jun 1, 2023

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
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
Copy Markdown
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
@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 Feb 4, 2025
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Apr 15, 2025
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jan 29, 2026
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_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. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_pr This PR has not been pushed to for more than one year. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import_playbook in a collection change role search path for the rest of the playbook, breaking current collection search path

6 participants