Skip to content

Conversation

@richm
Copy link
Contributor

@richm richm commented May 19, 2025

Add Fedora 42 to testing farm test matrix, drop Fedora 40

Use tox-lsr 3.9.0 for the --lsr-report-errors-url argument.

Add the argument --lsr-report-errors-url DEFAULT to the qemu test so that
the errors will be written to the output log. This uses the output callback
https://github.com/linux-system-roles/auto-maintenance/blob/main/callback_plugins/lsr_report_errors.py

Use the check_logs.py script
https://github.com/linux-system-roles/auto-maintenance/blob/main/check_logs.py
with the --github-action-format argument to format the errors
in a github action friendly manner.

Rename the log files -FAIL.log or -SUCCESS.log depending on status.
This is compatible with the way the testing farm log files are named, and
makes it easy to tell if a test passed or failed from the log file name.

Upload README.html as artifacts of the build_docs job for debugging

Signed-off-by: Rich Megginson rmeggins@redhat.com

Summary by Sourcery

Update CI to test Fedora-42 and bump tox-lsr to 3.9.0, and improve QEMU test logging and error reporting, uploading documentation artifacts.

Enhancements:

  • Add --lsr-report-errors-url DEFAULT to QEMU tests
  • Use check_logs.py with GitHub Action formatting to summarize test failures
  • Rename QEMU test logs with -SUCCESS/-FAIL suffix

CI:

  • Upgrade tox-lsr to v3.9.0 across all workflows
  • Add Fedora-42 and remove Fedora-40 in CI test matrices

Documentation:

  • Upload README.html as an artifact in the build_docs workflow

…tests

Add Fedora 42 to testing farm test matrix, drop Fedora 40

Use tox-lsr 3.9.0 for the `--lsr-report-errors-url` argument.

Add the argument `--lsr-report-errors-url DEFAULT` to the qemu test so that
the errors will be written to the output log.  This uses the output callback
https://github.com/linux-system-roles/auto-maintenance/blob/main/callback_plugins/lsr_report_errors.py

Use the check_logs.py script
https://github.com/linux-system-roles/auto-maintenance/blob/main/check_logs.py
with the `--github-action-format` argument to format the errors
in a github action friendly manner.

Rename the log files `-FAIL.log` or `-SUCCESS.log` depending on status.
This is compatible with the way the testing farm log files are named, and
makes it easy to tell if a test passed or failed from the log file name.

Upload README.html as artifacts of the build_docs job for debugging

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm requested a review from ueno as a code owner May 19, 2025 17:38
@richm richm self-assigned this May 19, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented May 19, 2025

Reviewer's Guide

This PR upgrades the tox-lsr dependency in CI workflows, expands the testing farm matrix by adding Fedora 42 (and dropping Fedora 40), enhances QEMU test logging and error reporting by adding lsr-report-errors-url, renaming logs, and using check_logs.py, and adds a README.html artifact upload step in the docs build job.

Sequence Diagram: Enhanced QEMU Test Error Reporting

sequenceDiagram
    participant GHA_Runner as GitHub Actions Runner
    participant QEMU_Test as QEMU Test
    participant LSR_Callback as lsr_report_errors.py (Callback)
    participant Log_Checker as check_logs.py (Script)
    participant Log_File as Log File

    GHA_Runner->>QEMU_Test: Execute with --lsr-report-errors-url DEFAULT
    activate QEMU_Test
    alt Errors Occur
        QEMU_Test->>LSR_Callback: Triggered by Ansible
        activate LSR_Callback
        LSR_Callback-->>Log_File: Write error details to output log
        deactivate LSR_Callback
    end
    deactivate QEMU_Test

    GHA_Runner->>Log_Checker: Execute with --github-action-format
    activate Log_Checker
    Log_Checker->>Log_File: Read log
    Log_Checker-->>Log_File: Rename log (e.g., -FAIL.log)
    Log_Checker-->>GHA_Runner: Output formatted errors for GitHub UI
    deactivate Log_Checker
Loading

File-Level Changes

Change Details Files
Bump tox-lsr to 3.9.0 across CI workflows
  • Updated pip install commands from tox-lsr@3.8.0 to tox-lsr@3.9.0
.github/workflows/qemu-kvm-integration-tests.yml
.github/workflows/ansible-lint.yml
.github/workflows/ansible-managed-var-comment.yml
.github/workflows/ansible-test.yml
.github/workflows/python-unit-test.yml
Enhance QEMU integration test logging and error reporting
  • Added --lsr-report-errors-url DEFAULT to tox-lsr invocation
  • Renamed test logs to *-SUCCESS.log or *-FAIL.log based on exit code
  • Integrated check_logs.py with --github-action-format to process failure logs
.github/workflows/qemu-kvm-integration-tests.yml
Update testing farm matrix for Fedora versions
  • Removed Fedora-40 and added Fedora-42 in supported_platforms logic
  • Updated matrix include to reflect Fedora-42
.github/workflows/tft.yml
Upload README.html as an artifact in docs build job
  • Introduced actions/upload-artifact step to persist README.html
.github/workflows/build_docs.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

@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 @richm - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

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 9376a53 into main May 19, 2025
34 checks passed
@richm richm deleted the changes-20250519 branch May 19, 2025 20:26
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.

2 participants