Skip to content

ci: tox-lsr 3.17.1 - previous update broke container tests, this fixes them [citest_skip]#281

Merged
richm merged 1 commit intomainfrom
tox-lsr-3.17.1
Mar 13, 2026
Merged

ci: tox-lsr 3.17.1 - previous update broke container tests, this fixes them [citest_skip]#281
richm merged 1 commit intomainfrom
tox-lsr-3.17.1

Conversation

@richm
Copy link
Copy Markdown
Contributor

@richm richm commented Mar 13, 2026

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:

  • Bump tox-lsr used in GitHub Actions workflows from 3.16.0 to 3.17.1.
  • Update Fedora 43 matrix entries to use ansible-core 2.20 for both qemu and container scenarios.
  • Ensure container tests always run the initial requirements/setup step and only skip it on subsequent test runs.
  • Fix a minor indentation issue in the qemu-kvm integration test workflow script.

…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>
@richm richm self-assigned this Mar 13, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 13, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates 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_1

sequenceDiagram
    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
Loading

File-Level Changes

Change Details Files
Bump tox-lsr dependency to 3.17.1 across CI workflows to pick up fixes for container tests.
  • Update tox-lsr Git URL version from 3.16.0 to 3.17.1 in qemu-kvm integration workflow.
  • Update tox-lsr Git URL version from 3.16.0 to 3.17.1 in ansible-lint workflow.
  • Update tox-lsr Git URL version from 3.16.0 to 3.17.1 in ansible-managed-var-comment workflow.
  • Update tox-lsr Git URL version from 3.16.0 to 3.17.1 in ansible-test workflow.
.github/workflows/qemu-kvm-integration-tests.yml
.github/workflows/ansible-lint.yml
.github/workflows/ansible-managed-var-comment.yml
.github/workflows/ansible-test.yml
Align fedora-43 qemu and container scenarios with ansible-core 2.20 images.
  • Change fedora-43 qemu scenario env from qemu-ansible-core-2-19 to qemu-ansible-core-2-20.
  • Change fedora-43 container scenario env from container-ansible-core-2-19 to container-ansible-core-2-20.
  • Change fedora-43-bootc container scenario env from container-ansible-core-2-19 to container-ansible-core-2-20.
.github/workflows/qemu-kvm-integration-tests.yml
Ensure container tests always run at least once with requirements setup (including connection plugins), then allow skipping on subsequent test runs.
  • Set SKIP_REQUIREMENTS=false before the container test loop so the first tox invocation always performs requirements setup (including installing connection plugins and setting ANSIBLE_CONNECTION_PLUGINS).
  • Set SKIP_REQUIREMENTS=true at the end of each loop iteration so later test runs can skip requirement installation while reusing the already prepared environment.
  • Remove LSR_CONTAINER_PROFILE and LSR_CONTAINER_PRETTY overrides that previously disabled certain container test behaviors.
.github/workflows/qemu-kvm-integration-tests.yml
Minor workflow shell formatting fix in the qemu-kvm integration test matrix support check.
  • Indent the inner conditional checking for the containerbuild galaxy tag so it is properly nested under the outer image comparison condition.
.github/workflows/qemu-kvm-integration-tests.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@richm richm merged commit d702146 into main Mar 13, 2026
11 checks passed
@richm richm deleted the tox-lsr-3.17.1 branch March 13, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant