-
Notifications
You must be signed in to change notification settings - Fork 17
ci: Add support for bootc end-to-end validation tests #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR adds support for bootc end-to-end validation by upgrading the tox-lsr dependency across CI workflows, injecting a podman 5.x compatibility hack for bootc container builds, and extending the QEMU integration pipeline with a dedicated validation step that runs tests inside a QEMU VM using generated qcow2 images. Sequence Diagram for Bootc End-to-End Validation Test FlowsequenceDiagram
actor User/CI
participant WF as GitHub Actions Workflow
participant BuildahEnv as "Buildah Environment (Preparation)"
participant QEMU_VM as "QEMU VM (Validation)"
User/CI->>+WF: Trigger bootc E2E tests
WF->>+BuildahEnv: Start Preparation Phase
BuildahEnv->>BuildahEnv: Run bootc-buildah-qcow.sh / bootc-image-builder
Note over BuildahEnv: Builds container, applies Podman hack, generates qcow2
BuildahEnv-->>-WF: disk.qcow2 created
WF->>+QEMU_VM: Start Validation Phase (with disk.qcow2)
QEMU_VM->>QEMU_VM: Deploy qcow2 image to QEMU
QEMU_VM->>QEMU_VM: Boot VM
QEMU_VM->>QEMU_VM: Run validation tests (with __bootc_validation=true)
QEMU_VM-->>-WF: Test results
WF-->>-User/CI: Report status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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:
- The podman upgrade hack via sed and pinning Ubuntu codename is quite brittle—consider using an officially supported backport or updated base image instead.
- The skip-tags value uses
tests::bootc-e2ebut the description referencestests::bootc-e2—please ensure the tag names are consistent. - You install the same
tox-lsr@3.10.0line in multiple workflows—extract that into a shared variable or reusable action to DRY up the YAML.
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.
NOTE: This also requires upgrading to tox-lsr 3.10.0, and some hacks to workaround a podman issue in ubuntu. 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 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
NOTE: This also requires upgrading to tox-lsr 3.10.0, and some
hacks to workaround a podman issue in ubuntu.
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 ofhttps://github.com/osbuild/bootc-image-builder.
There are two possibilities:
Have separate bootc end-to-end tests. These are tagged with
tests::bootc-e2and 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/cleanupand role invocations in validation mode, i.e. when
__bootc_validationis true.In the container scenario, run the QEMU validation as a separate step in
the workflow.
See https://issues.redhat.com/browse/RHEL-88396