Skip to content

ci: Add Fedora 42; use tox-lsr 3.9.0; use lsr-report-errors for qemu tests#105

Merged
richm merged 1 commit intomainfrom
changes-20250519
May 19, 2025
Merged

ci: Add Fedora 42; use tox-lsr 3.9.0; use lsr-report-errors for qemu tests#105
richm merged 1 commit intomainfrom
changes-20250519

Conversation

@richm
Copy link
Copy Markdown
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 [email protected]

Summary by Sourcery

Update CI workflows to use tox-lsr 3.9.0 and extend Fedora coverage to Fedora 42 while dropping Fedora 40, enhance QEMU integration tests with improved error reporting and log naming, upload generated documentation artifacts, and add variable mapping files for AlmaLinux and Rocky Linux versions 9 and 10.

Enhancements:

  • Configure QEMU tests with --lsr-report-errors-url DEFAULT and integrate check_logs.py for GitHub Action–formatted error output
  • Rename test log files to include -SUCCESS.log or -FAIL.log based on test results
  • Add variable mapping files for AlmaLinux and Rocky Linux versions 9 and 10, and remove CentOS_10.yml

CI:

  • Upgrade tox-lsr to 3.9.0 across all GitHub workflows
  • Add Fedora 42 and remove Fedora 40 from the testing matrices
  • Upload README.html as an artifact in the build_docs job

…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 <[email protected]>
@richm richm requested a review from spetrosi as a code owner May 19, 2025 17:38
@richm richm self-assigned this May 19, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented May 19, 2025

Reviewer's Guide

This PR modernizes the CI by upgrading tox-lsr, enriching QEMU test logs with lsr-report-errors and GitHub-friendly formatting, revises the Fedora test matrix, adds a docs artifact step, and standardizes OS variable alias files.

Sequence Diagram: New QEMU Test Error Reporting Process

sequenceDiagram
    autonumber
    participant GHA_Workflow as GitHub Actions Workflow
    participant QEMU_Test_Runner as QEMU Test Runner
    participant Ansible_Callback as lsr_report_errors.py
    participant Test_Log as Test Output Log
    participant Check_Logs_Script as check_logs.py

    GHA_Workflow->>QEMU_Test_Runner: Run QEMU tests (with --lsr-report-errors-url DEFAULT)
    QEMU_Test_Runner->>Ansible_Callback: Test executes, Ansible callback activated on error/completion
    Ansible_Callback->>Test_Log: Writes error details
    GHA_Workflow->>Check_Logs_Script: Run check_logs.py (with --github-action-format)
    Check_Logs_Script->>Test_Log: Read error details from log
    Check_Logs_Script->>GHA_Workflow: Output formatted errors for GitHub UI
Loading

File-Level Changes

Change Details Files
Upgrade tox-lsr to version 3.9.0 across all workflows .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 test logging and error reporting
  • Add --lsr-report-errors-url DEFAULT to tox-lsr invocation
  • Rename test logs to •-SUCCESS.log/•-FAIL.log based on exit code
  • Fetch and run check_logs.py with --github-action-format for failed logs
.github/workflows/qemu-kvm-integration-tests.yml
Adjust Fedora entries in the CI test matrix
  • Remove Fedora-40 from supported_platforms and matrix include
  • Add Fedora-42 alongside Fedora-41 in both logic and matrix
.github/workflows/tft.yml
Publish generated README.html as a workflow artifact
  • Insert an actions/upload-artifact step to capture README.html output
.github/workflows/build_docs.yml
Standardize OS variable alias files
  • Delete CentOS_10.yml
  • Add AlmaLinux_10.yml, AlmaLinux_9.yml, CentOS_9.yml, Rocky_10.yml, and Rocky_9.yml pointing to RedHat versions
vars/CentOS_10.yml
vars/AlmaLinux_10.yml
vars/AlmaLinux_9.yml
vars/CentOS_9.yml
vars/Rocky_10.yml
vars/Rocky_9.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

@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 - here's some feedback:

  • Instead of fetching check_logs.py from refs/heads/main, pin it to a specific commit or vendor it in the repo to avoid CI breakage when upstream changes.
  • The repeated pip install of [email protected] across multiple workflows could be extracted into a reusable step or composite action to reduce duplication and simplify future upgrades.
  • With Fedora-42 added and Fedora-40 removed, double-check that all role metadata (e.g. galaxy_info tags) and inventory mappings in vars/ are updated accordingly so tests cover the new platform.
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 14b6c58 into main May 19, 2025
34 checks passed
@richm richm deleted the changes-20250519 branch May 19, 2025 20:27
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