ci: Add support for bootc end-to-end validation tests#537
Merged
Conversation
Reviewer's GuideThis PR implements full bootc end-to-end validation by upgrading tox-lsr, injecting a Podman 5.x workaround for Ubuntu, fine-tuning tox invocation in the QEMU workflow, and adding a dedicated GH Actions step to run and log bootc validation inside a QEMU VM. Sequence Diagram for Bootc End-to-End Test ExecutionsequenceDiagram
participant GHA as GitHub Actions
participant ToxPrep as Tox (Prep Env)
participant Builder as bootc-image-builder/Buildah
participant Role as Ansible Role
participant ArtifactStore as Artifact (disk.qcow2)
participant ToxVal as Tox (Validate Env)
participant QEMU as QEMU VM
GHA->>ToxPrep: Start Preparation Stage
ToxPrep->>Builder: Run image build (with Ansible Role)
activate Builder
Builder->>Role: Execute Role during build
Role-->>Builder: Role applied
Builder-->>ArtifactStore: Produce disk.qcow2
deactivate Builder
ArtifactStore-->>ToxPrep: disk.qcow2 ready
ToxPrep-->>GHA: Preparation Complete
GHA->>ToxVal: Start Validation Stage
ToxVal->>ArtifactStore: Retrieve disk.qcow2
ArtifactStore-->>ToxVal: disk.qcow2
ToxVal->>QEMU: Deploy disk.qcow2 & Boot VM
activate QEMU
QEMU-->>ToxVal: VM Ready
ToxVal->>QEMU: Run validation checks (validates Role effects)
QEMU-->>ToxVal: Validation Results
deactivate QEMU
ToxVal-->>GHA: Validation Complete
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @richm - I've reviewed your changes - here's some feedback:
- The podman pinning hack is quite fragile—consider extracting it into a named reusable step or clearly document its removal condition to avoid future confusion.
- You’re skipping
tests::bootc-e2ein the QEMU run but your PR description calls the tagtests::bootc-e2—please verify the tag name is consistent everywhere. - You’ve duplicated the
pip3 install [email protected]update across multiple workflows—consider centralizing that step or using a reusable workflow to reduce repetition.
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 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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