Repository navigation
imgtestlib: add disk images to bootc testing matrix - #2742
Conversation
a7cf323 to
0ae360f
Compare
Extend dynamic bootc CI from ami-only to qcow2+ami on fedora-44/x86_64.
Extend dynamic bootc CI from qcow2+ami to testing all disk images on fedora-44/x86_64, namely: raw, gce, vhd, vmdk, ova.
Extend tests with vhd bootc tests. We run vhd in Azure, and for Azure, we need a derived image. Thus, for these tests, we use rhel10 and the image from our bootc-foundry repository. Add Quay authentication (QUAY_BOT_TOKEN) so CI can pull the private bootc-foundry image from redhat-services-prod.
Manifest generation and rhel-10 bootc build jobs need to pull the private bootc-foundry image from quay.io. Add download-quay-auth, which uses glab to fetch quay-auth.json from GitLab Secure Files, and set REGISTRY_AUTH_FILE so podman can authenticate during gen-manifests and image builds.
Adds vmdk and raw to CAN_BOOT_TEST, as well as support for vmdk in vm.py.
Change the test RNG seed to rebuild all images and test changes in tests.
achilleas-k
left a comment
There was a problem hiding this comment.
Nice work. A few comments below, but wont block.
But also, we should start pinning the bootc containers in our testing. I was doubting the validity of the cache checks because I ran the dynamic pipeline generator locally from this branch and it was all misses for Fedora. But that's more or less expected since the Fedora containers get updates regularly.
| - | | ||
| {bootc_pull_script} | ||
| - ./test/scripts/build-image "{distro}" "{image_type}" "{config}"{export_pipeline_flag} | ||
| {pull_image_steps} - ./test/scripts/build-image "{distro}" "{image_type}" "{config}"{export_pipeline_flag} |
| if bootc_source == "rhel-10": | ||
| pull_image_steps = ( | ||
| " - ./test/scripts/download-quay-auth\n" | ||
| f" - export REGISTRY_AUTH_FILE={testlib.bootcsource.BOOTC_QUAY_AUTH_PATH}\n" | ||
| ) | ||
| else: | ||
| pull_image_steps = f" - podman pull {bootc_ref}\n" |
There was a problem hiding this comment.
It might be cleaner to unconditionally add the auth file for quay for all bootc-based builds to be honest. It doesn't hurt, in fact it probably helps with potential rate limits, and the conditions spread out around the pipeline generator make things a bit messy and hard to follow.
| BOOTC_SOURCES = list(BOOTC_SOURCE_IMAGE_TYPES) | ||
| BOOTC_ARCHES = ["x86_64"] | ||
| BOOTC_IMAGE_TYPES = ["ami"] | ||
| BOOTC_CONFIGS = {"bootc-user"} |
There was a problem hiding this comment.
I noticed this while reviewing and it gave me pause. I saw that the dynamic pipeline generator was getting more cache misses on candidate configurations than it was adding to the build and realised this is the reason: We generate empty configs as well, but don't consider them for testing. This shouldn't be needed. If we don't plan to build test them, we should not have the configs in the config-list (it's kinda the point of the config-list, to list all the configs we want to test).
Alternatively, we could build the empty configs and not boot test them, which is something we do have a mechanism for and rely on heavily (can_boot_test()).
Extend dynamic bootc CI from ami-only to qcow2+ami+vhd+vmdk on fedora-44/x86_64 and rhel.