Enable bootc-image-builder tests [HMS-10851]#2467
Draft
achilleas-k wants to merge 17 commits into
Draft
Conversation
683ef5e to
32f8c23
Compare
Member
Author
|
I expect these will still fail. I will separate the bootc-image-builder tests into their own workflow so we can treat them separately. |
d20ed51 to
abf0d09
Compare
8dbbbc8 to
c5d85d8
Compare
Create a new top-level directory called bootc-image-builder where we will put all data and configuration files related to the tool when possible. Move the Containerfile for bootc-image-builder there and rename it.
Move the bootc-image-builder tests under the new top-level directory for the tool and rename the files to enable the tests.
Add new test dependencies, pylint and flake8, required by the bib tests. Sort the package lists. Sorted lists are nicer.
Update the Containerfile path for the bootc-image-builder container fixture to the new location. Add cleanups to the container fixtures. Delete copies of the fixtures from test/conftest.py. These were copied from bootc-image-builder into image-builder-cli but now we have the bootc-image-builder tests entirely in this repository so they were duplicates.
Codestyle fixes: Run isort over all files in bootc-image-builder/test.
Copy the old bootc-image-builder README into the bootc-image-builder subdirectory. This will still be useful for as long as we produce the container. We might copy it to our online docs (osbuild.org) and also use it later to provide instructions for migrating builds to image-builder itself.
Let's integrate vmtest into imgtestlib. There's no need to have two separate modules for testing things. imgtestlib already imports vmtest and this makes things simpler.
Flatten the vm module (previously vmtest) under imgtestlib. All functions are available under imgtestlib.vm now. Move all vm tests (previously vmtest/test) to test_imgtestlib. Update import paths in the rest of the imgtestlib module to import the vm submodule.
Add the path to imgtestlib (parent) to the pytest config in pyproject.toml so that tests under bootc-image-builder/test can import it. Update import paths in the bootc-image-builder tests.
This was needed to make the vmtest module available in test environments. We don't need it any more. There are no installable python modules.
On Fedora 44, nc prints nc: cannot use -p and -l With the -l option, the -p is not necessary and the port must be specified after the -l.
Run pylint on the whole project. This commit also fixes or disables (mostly disables) all linting issues found. QEMUMonitorProtocol() is now used from the legacy submodule of qmp. Instead of installing qmp from pip, we install python3-qemu-qmp from the repos (using the install-dependencies script).
Run pytest only the tests under ./test as part of the main test workflow. The bootc-image-builder tests will be handled separately.
0afbbf2 to
289cc01
Compare
Add a new job in the tests GitHub workflow that runs the bootc-image-builder tests. This is based on the original tests workflow from github.com/osbuild/bootc-image-builder, but adapted to run on Fedora.
The bootc-image-builder tests call 'ip route list default' to connect to a local container registry for testing. Some environments (Fedora container on GitHub) don't include the tool by default. sshpass is used in vm boot tests.
When testing locally, many builds would fail with exit code 137 (sigkill, possibly OOM).
Disable bootc-image-builder boot tests temporarily. I'd like to set these up to run like the other boot tests on rhos, gcp, or the new aws runners with kvm [1]. The current setup on GitHub is having issues and is hard to debug. [1] osbuild/gitlab-ci-terraform#245
61df64e to
efa17bd
Compare
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.
Move bootc-image-builder related files, enable them, and clean up duplicate fixtures.
This PR creates a new top-level directory called
bootc-image-builderwhich holds anything related to the tool (whenever possible). It now contains the Containerfile, test scripts, and the old bootc-image-builder README.DRAFT: I'm having some random failures when running the tests locally. Some builds exit with non-zero exit codes even though the internal osbuild job succeeded. I'm opening this as draft to see how reproducible it is in GHA.