-
Notifications
You must be signed in to change notification settings - Fork 49
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
Test: rebuild disks from bootable containers when the BIB container changes #405
Conversation
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.
Yay!
d1a5e9e
to
1dee9db
Compare
Requested review from @mvo5 because tests ^_^ |
e13c028
to
5323a15
Compare
Okay, the bib test failed. This is good :) |
Current status: The image doesn't build with BIB since we switched to using bootupd. The metadata isn't part of our base image. This was expected (and the reason I added the test in the first place). Working on adding this now. |
1e18012
to
79cfb2d
Compare
Rebased. Should be good to go! |
skopeo_inspect_id() can inspect a container image (local or remote) and return the image ID for a given architecture. When inspecting local containers, it uses sudo to access the root container registry, which is what we use in tests for the bib container. The host_container_arch() function returns a string that matches the expected arch name for the host.
The tests check the manifest-list test container we keep in the gitlab registry for tests in osbuild-composer and in this repository. Test that: - Inspecting the manifest list at :latest returns the expected image ID. - Inspecting the manifest digest for a given architecture returns the expected image ID. - Pulling a container and inspecting the local storage for a given architecture returns the expected image ID. The local storage inspection will run 'skopeo inspect' with sudo, so the test only runs when sudo can be run non-interactively (sudo -n).
We will use this ID to retest bootable container images when the bib container changes to ensure we maintain compatibility.
If the container image ID changes, rebuilds and retest bootable container images.
The test fails in github actions but it's useful to keep until we fix it. Mark it as disabled and keep a comment to investigate.
79cfb2d
to
0dbe367
Compare
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.
Awesome! I think we can resolve my comment in a follow-up, the test is disabled nevertheless.
transport = "containers-storage:" | ||
image = "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/manifest-list-test:latest" | ||
with tempfile.TemporaryDirectory() as tmpdir: | ||
testlib.runcmd(["sudo", "podman", "pull", f"--arch={arch}", "--storage-driver=vfs", f"--root={tmpdir}", image]) |
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.
--storage-driver=vfs
is so we can run the test in a container, right? It might be worth leaving a small note about that here, it might not be obvious to future readers.
EDIT from future Ondrej who read all commits: So it apparently doesn't work in a container... weird...
Write the bootc-image-builder container ID that we used to build a disk image and boot test bootable containers. We use this ID to retest bootable container images when the bib container changes to ensure we maintain compatibility.