tests: Update tests_zone to do bootc end-to-end validation#280
tests: Update tests_zone to do bootc end-to-end validation#280martinpitt merged 5 commits intolinux-system-roles:mainfrom
Conversation
Reviewer's GuideThis PR enhances CI workflows and test playbooks to perform bootc end-to-end validation: it bumps the tox-lsr dependency, injects a Podman-5 compatibility hack, adds a new QEMU-based validation step, and augments the existing tests_zone playbook with conditional logic and deployment support for bootc scenarios. Sequence Diagram: tests_zone.yml Execution in bootc ScenariosequenceDiagram
participant AC as Ansible Controller
participant TG as Target (bootc Environment)
AC->>+TG: Initiate tests_zone.yml playbook
TG-->>AC: Acknowledge
AC->>AC: Check if target is bootc environment
Note over AC: Conditional logic for bootc
AC->>+TG: Perform bootc-specific deployment steps
TG-->>AC: Deployment successful
AC->>+TG: Execute zone configuration tests
TG-->>AC: Test results
AC->>AC: Process validation results
Flow Diagram: Conditional Logic in tests_zone.yml for bootcgraph TD
Start((Start tests_zone.yml)) --> IsBootc{Is bootc environment?};
IsBootc -- Yes --> BootcDeployment[Perform bootc-specific<br/>deployment tasks];
IsBootc -- No --> StandardDeployment[Perform standard<br/>deployment tasks];
BootcDeployment --> CommonTests[Execute common zone tests];
StandardDeployment --> CommonTests;
CommonTests --> End((End playbook));
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #280 +/- ##
==========================================
- Coverage 61.09% 58.41% -2.69%
==========================================
Files 2 2
Lines 910 1188 +278
==========================================
+ Hits 556 694 +138
- Misses 354 494 +140
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey @martinpitt - I've reviewed your changes - here's some feedback:
- Consider extracting the repeated tox-lsr version bump into a shared variable or install script so you don’t have to update every workflow file whenever the version changes.
- The sed-based hack to pin and upgrade Podman to 5.x is fragile—see if you can use an official backport PPA or the upstream container tools package stream instead of rewriting sources.list in your CI.
- In the new QEMU bootc validation loop, guard the
ls tests/tmp/*/qcow2/disk.qcow2call (e.g. with|| continueor an existence check) to avoid failing the step when no images are found.
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
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
meh codespell, same issue as in sudo. I'll cherry-pick the same fix. |
|
F41 failure is due to osbuild/bootc-image-builder#949 , will be fixed tomorrow-ish when a new bootc base image picks up https://bodhi.fedoraproject.org/updates/FEDORA-2025-f68c3fced6 |
Ubuntu 24.04's podman 4.9.3 does not work with the bootc-image-builder container: Bind-mounting the container storage into it makes the container's podman 5 fail with a storage error. Thus install podman 5.4 from Ubuntu 25.04 to regain compatibility. This is rather hackish, but as that is a stable release, it should not break in the future (wrt. library dependencies and such). Ignore "passt" codespell complaint. This *is* the correct name for our test dependency.
These tests run the role during a bootc container image build, deploy the container into a QEMU VM, boot that, and validate the expected configuration there. They run in two different tox environments, and thus have to be run in two steps (preparation in buildah, validation in QEMU). The preparation is expected to output a qcow2 image in `tests/tmp/TESTNAME/qcow2/disk.qcow2`, i.e. the output structure of <https://github.com/osbuild/bootc-image-builder>. There are two possibilities: * Have separate bootc end-to-end tests. These are tagged with `tests::bootc-e2` and are skipped in the normal qemu-* scenarios. They run as part of the container-* ones. * Modify an existing test: These need to build a qcow2 image exactly *once* (via calling `bootc-buildah-qcow.sh`) and skip setup/cleanup and role invocations in validation mode, i.e. when `__bootc_validation` is true. In the container scenario, run the QEMU validation as a separate step in the workflow. See https://issues.redhat.com/browse/RHEL-88396
That test covers a lot of settings but only has one scenario, so it's fitting for end-to-end testing. See https://issues.redhat.com/browse/RHEL-78157
That test covers a lot of settings but only has one scenario, so it's
fitting for end-to-end testing.
See https://issues.redhat.com/browse/RHEL-78157
The other commits are identical to linux-system-roles/sudo#59 and linux-system-roles/.github#114
Summary by Sourcery
Implement end-to-end bootc validation for tests_zone, update QEMU integration and other CI workflows to support bootc scenarios, and bump tox-lsr to v3.10.0 across all pipelines
New Features:
Enhancements:
CI:
Tests: