mssql icon indicating copy to clipboard operation
mssql copied to clipboard

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

Open richm opened this issue 7 months ago • 1 comments

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

Enhance CI workflows by adding Fedora 42, upgrading tox-lsr, improving test error reporting and log handling, and publishing README artifacts

CI:

  • Add Fedora 42 to the test matrix and remove Fedora 40 from supported platforms
  • Upgrade tox-lsr dependency to v3.9.0 across CI workflows
  • Pass --lsr-report-errors-url DEFAULT to QEMU integration tests for automated error reporting
  • Standardize test log filenames to -SUCCESS.log/-FAIL.log for clearer results
  • Integrate check_logs.py with --github-action-format to aggregate and format test failure logs
  • Upload generated README.html as an artifact in the documentation build job

richm avatar May 19 '25 17:05 richm

Reviewer's Guide

This PR enhances CI workflows by bumping tox-lsr to 3.9.0, improving qemu integration test error reporting and log handling, updating the testing farm matrix to include Fedora 42 (dropping Fedora 40), and uploading README.html as a build artifact.

Sequence Diagram: QEMU Test Enhanced Error Reporting

sequenceDiagram
    participant Job as GitHub Actions Job
    participant QEMUTest as QEMU Test Execution
    participant Callback as lsr_report_errors.py
    participant CheckLogs as check_logs.py
    participant LogOutput as Log Output/File

    Job->>QEMUTest: Run test (with --lsr-report-errors-url DEFAULT)
    alt Errors Occur during QEMU Test
        QEMUTest->>Callback: Error detected, trigger callback
        Callback->>LogOutput: Write error details to output log
    end
    Job->>CheckLogs: Execute check_logs.py --github-action-format
    CheckLogs->>LogOutput: Read log data
    CheckLogs->>Job: Return errors in GitHub Action friendly format
    Job->>LogOutput: Rename log file based on status (e.g., to *-FAIL.log or *-SUCCESS.log)

File-Level Changes

Change Details Files
Bump tox-lsr dependency to version 3.9.0 across CI workflows
  • Updated pip3 install URL to reference [email protected] instead of 3.8.0
  • Ensured consistency of tox-lsr version in qemu, lint, managed-var-comment, and test 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
Enhance qemu integration tests with detailed error reporting and renamed logs
  • Added --lsr-report-errors-url DEFAULT to tox invocation for qemu scenarios
  • Renamed test logs to *-SUCCESS.log or *-FAIL.log based on exit status
  • Integrated check_logs.py --github-action-format to aggregate and format failure logs
  • Refactored loop to preserve original test file paths for renaming
.github/workflows/qemu-kvm-integration-tests.yml
Update testing farm matrix to replace Fedora 40 with Fedora 42
  • Removed Fedora-40 entries from supported platforms and matrix include
  • Added Fedora-42 to supported_platforms logic and matrix include
.github/workflows/tft.yml
Upload documentation output as an artifact in build_docs job
  • Added step to upload README.html as a build artifact for debugging
.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

  • Contact our support team for questions or feedback.
  • Visit our documentation for detailed guides and information.
  • Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.

sourcery-ai[bot] avatar May 19 '25 17:05 sourcery-ai[bot]

This got superseded by #357

martinpitt avatar Jun 05 '25 06:06 martinpitt