ci: tox-lsr 3.17.1 - previous update broke container tests, this fixes them [citest_skip]#281
Merged
ci: tox-lsr 3.17.1 - previous update broke container tests, this fixes them [citest_skip]#281
Conversation
…s them [citest_skip] tox-lsr 3.17.1 has a fix for the broken container tests There was one shell function for both setting up the callback plugins and the connection plugin. When this function was skipped, the ANSIBLE_CONNECTION_PLUGINS environment variable was not set, so all subsequent tests failed. The connection plugin must be present and the env. var. must be set in order to run any container tests. The code was fixed to ensure that there is always a connection plugin installed in the correct location and that ANSIBLE_CONNECTION_PLUGINS is always set and contains this path. Also, setting up the callback plugins and the connection plugin is already idempotent, so no reason to skip them. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates CI workflows to use tox-lsr 3.17.1 and newer ansible-core container/qemu images, and adjusts container test execution so requirements (including connection plugins and environment variables) are always set up for at least the first run, fixing previously broken container tests. Sequence diagram for CI container test setup with tox_lsr_3_17_1sequenceDiagram
actor Developer
participant GitHubActionsRunner
participant ansible_test_workflow
participant tox_lsr_3_17_1
participant ContainerTestEnv
participant Ansible
Developer->>GitHubActionsRunner: Push code / open PR
GitHubActionsRunner->>ansible_test_workflow: Trigger workflow
ansible_test_workflow->>GitHubActionsRunner: Install tox_lsr_3_17_1 via pip
GitHubActionsRunner-->>tox_lsr_3_17_1: tox invocation for container tests
tox_lsr_3_17_1->>ContainerTestEnv: Install connection_plugin in required path
tox_lsr_3_17_1->>ContainerTestEnv: Set ANSIBLE_CONNECTION_PLUGINS env var
tox_lsr_3_17_1->>ContainerTestEnv: Install callback_plugins (idempotent)
tox_lsr_3_17_1-->>Ansible: Execute container tests with prepared env
Ansible-->>ansible_test_workflow: All container tests complete successfully
ansible_test_workflow-->>Developer: Report CI status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since the tox-lsr version is now referenced in multiple workflows, consider centralizing it (e.g., via a reusable workflow, action input, or shared environment variable) so future version bumps only require a single change.
- The new SKIP_REQUIREMENTS toggle relies on behavior in tox-lsr; it may be worth adding a brief comment indicating which tox-lsr feature/version this depends on, to make future changes to tox-lsr easier to reason about from the workflow.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since the tox-lsr version is now referenced in multiple workflows, consider centralizing it (e.g., via a reusable workflow, action input, or shared environment variable) so future version bumps only require a single change.
- The new SKIP_REQUIREMENTS toggle relies on behavior in tox-lsr; it may be worth adding a brief comment indicating which tox-lsr feature/version this depends on, to make future changes to tox-lsr easier to reason about from the workflow.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tox-lsr 3.17.1 has a fix for the broken container tests
There was one shell function for both setting up the callback plugins and the connection plugin.
When this function was skipped, the ANSIBLE_CONNECTION_PLUGINS environment variable was not
set, so all subsequent tests failed. The connection plugin must be present and the env. var.
must be set in order to run any container tests. The code was fixed to ensure that there is
always a connection plugin installed in the correct location and that ANSIBLE_CONNECTION_PLUGINS
is always set and contains this path.
Also, setting up the callback plugins and the connection plugin is already idempotent, so no
reason to skip them.
Signed-off-by: Rich Megginson rmeggins@redhat.com
Summary by Sourcery
Update CI workflows to use tox-lsr 3.17.1 and adjust container/qemu test configuration to restore working container tests.
CI: