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

…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 spetrosi 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 modernizes the CI pipelines by upgrading tox-lsr to 3.9.0, extending the test matrix to Fedora 42, improving QEMU test logging with lsr-report-errors and check_logs.py processing, and uploading README.html as a build artifact.

Sequence Diagram: QEMU Test Error Reporting and Processing

sequenceDiagram
    participant Job as "GitHub Actions Job (qemu-kvm-integration-tests.yml)"
    participant TestExecutor as "QEMU Test Executor"
    participant Callback as "lsr_report_errors.py (Callback)"
    participant LogFile as "Output Log File"
    participant CheckLogsScript as "check_logs.py"
    participant GH_UI as "GitHub Actions UI"

    Job->>TestExecutor: Start QEMU tests\n(with --lsr-report-errors-url DEFAULT)
    activate TestExecutor
    TestExecutor-->>Callback: Test progresses, errors occur
    activate Callback
    Callback->>LogFile: Write raw error data
    deactivate Callback
    TestExecutor->>Job: Tests completed
    deactivate TestExecutor

    Job->>CheckLogsScript: Run check_logs.py\n(--github-action-format)
    activate CheckLogsScript
    CheckLogsScript->>LogFile: Read raw error data
    CheckLogsScript->>GH_UI: Output GitHub Action formatted errors
    deactivate CheckLogsScript

    Job->>LogFile: Rename log file\n(e.g., test-FAIL.log or test-SUCCESS.log)
Loading

Flow Diagram: README.html Artifact Upload in build_docs Workflow

flowchart TD
    Start["build_docs.yml Job"] --> GenerateDocs["Generate Documentation (including ${RELEASE_VERSION}/README.html)"]
    GenerateDocs --> ConditionalCopy{If env.RELEASE_VERSION == 'latest'}
    ConditionalCopy -- Yes --> CopyToIndex["Copy ${RELEASE_VERSION}/README.html to docs/index.html"]
    ConditionalCopy -- No --> AfterConditionalCopy["Skip copying to index.html"]
    CopyToIndex --> AfterConditionalCopyPathDone
    AfterConditionalCopy --> AfterConditionalCopyPathDone
    AfterConditionalCopyPathDone["Path after conditional copy"] --> UploadArtifact["Upload ${RELEASE_VERSION}/README.html as 'README.html' artifact"]
    UploadArtifact --> CommitChanges["Commit changes (if any)"]
Loading

File-Level Changes

Change Details Files
Upgrade tox-lsr to 3.9.0 in CI workflows
  • Bump pip3 install version from 3.8.0 to 3.9.0
  • Ensure all relevant workflows use the new tox-lsr release
.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 test logging and error reporting
  • Add --lsr-report-errors-url DEFAULT to tox command
  • Rename test output logs to -SUCCESS.log or -FAIL.log
  • Fetch and invoke check_logs.py with --github-action-format to summarize failures
.github/workflows/qemu-kvm-integration-tests.yml
Update testing matrix to include Fedora 42 and drop Fedora 40
  • Remove Fedora-40 entries
  • Add Fedora-42 to supported_platforms and matrix include
.github/workflows/tft.yml
Publish HTML documentation as a CI artifact
  • Upload README.html from build_docs job
  • Configure actions/upload-artifact step 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

@richm richm merged commit 529aeef into main May 19, 2025
19 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