ci: tox-lsr 3.17.1 - previous update broke container tests, this fixes them [citest_skip]#134
Merged
ci: tox-lsr 3.17.1 - previous update broke container tests, this fixes them [citest_skip]#134
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>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates GitHub workflows to use tox-lsr 3.17.1 (which fixes container connection plugin handling) and adjusts the qemu-kvm integration test loop so callback/connection plugin setup is never skipped, resolving broken container tests. Sequence diagram for container test execution in CI using tox_lsr_3_17_1sequenceDiagram
actor Developer
participant GitHubActions as GitHub_Actions_Workflow
participant Runner as GHA_Runner
participant ToxLSR as tox_lsr_3_17_1
participant Ansible as Ansible_Tests
Developer->>GitHubActions: Push_commit_or_open_PR
GitHubActions->>Runner: Start_ansible_test_job
Runner->>Runner: pip_install_tox_lsr_3_17_1
Runner->>ToxLSR: Run_tox_with_container_env
ToxLSR->>ToxLSR: Setup_callback_plugins_idempotent
ToxLSR->>ToxLSR: Setup_connection_plugin_idempotent
ToxLSR->>Runner: Set_ANSIBLE_CONNECTION_PLUGINS_env
Runner->>Ansible: Invoke_container_tests
Ansible->>Runner: Use_connection_plugin_from_ANSIBLE_CONNECTION_PLUGINS
Ansible-->>GitHubActions: Report_test_results
Flow diagram for plugin setup logic before and after tox_lsr_3_17_1_fixflowchart TD
subgraph Before_tox_lsr_3_17_1
B_start(["Start_container_test_env"])
B_start --> B_check_skip["Was_plugin_setup_function_skipped?"]
B_check_skip -->|"Yes"| B_no_conn["No_connection_plugin_installed"]
B_no_conn --> B_no_env["ANSIBLE_CONNECTION_PLUGINS_not_set"]
B_no_env --> B_fail["Container_tests_fail"]
B_check_skip -->|"No"| B_setup_both["Setup_callback_and_connection_plugins"]
B_setup_both --> B_set_env["Set_ANSIBLE_CONNECTION_PLUGINS"]
B_set_env --> B_tests_ok["Container_tests_can_run"]
end
subgraph After_tox_lsr_3_17_1
A_start(["Start_container_test_env"])
A_start --> A_setup_callbacks["Setup_callback_plugins_idempotent"]
A_setup_callbacks --> A_setup_conn["Setup_connection_plugin_idempotent"]
A_setup_conn --> A_set_env["Always_set_ANSIBLE_CONNECTION_PLUGINS"]
A_set_env --> A_tests_ok["Container_tests_always_have_connection_plugin"]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The tox-lsr version is hard-coded in several workflow files; consider centralizing this (e.g., via a reusable workflow or shared env var) so future version bumps only require a single change.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The tox-lsr version is hard-coded in several workflow files; consider centralizing this (e.g., via a reusable workflow or shared env var) so future version bumps only require a single change.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 test setup flags to ensure connection plugins are always configured.
Bug Fixes:
CI: