From 27b80c991b262109d97d12fc698d4a95d7b4f496 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Nov 15 2024 17:23:39 +0000 Subject: [PATCH 1/2] containers: Skip updates-testing images Short-term fix to stop pushing testing images to prod repos. We should have a repo for the updates-testing containers, though. --- diff --git a/fedora-image-uploader/fedora_image_uploader/handler.py b/fedora-image-uploader/fedora_image_uploader/handler.py index c725af1..8b82737 100644 --- a/fedora-image-uploader/fedora_image_uploader/handler.py +++ b/fedora-image-uploader/fedora_image_uploader/handler.py @@ -347,6 +347,10 @@ class Uploader: if not registries: # we can't do anything if no registries are configured return + if get_milestone(ffrel).endswith("-testing"): + # Short-term fix: skip updates-testing builds until we have a testing repo + _log.info("Skipping updates-testing image") + return if image["type"] not in ("docker", "ociarchive"): # not a known container image type return From ff8922d2b64e1ba71252f74d4c09b5a930ab69f6 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Nov 15 2024 17:27:08 +0000 Subject: [PATCH 2/2] containers: Skip Fedora 39 images These are of type "docker" and require a different manifest format. Rather than adding that and then removing it in 2 weeks when F39 goes EOL, we'll rely on the scripts to push F39 images for a couple weeks. --- diff --git a/fedora-image-uploader/fedora_image_uploader/handler.py b/fedora-image-uploader/fedora_image_uploader/handler.py index 8b82737..48d0ecf 100644 --- a/fedora-image-uploader/fedora_image_uploader/handler.py +++ b/fedora-image-uploader/fedora_image_uploader/handler.py @@ -351,6 +351,9 @@ class Uploader: # Short-term fix: skip updates-testing builds until we have a testing repo _log.info("Skipping updates-testing image") return + if ffrel.release.lower() != "eln" and ffrel.relnum < 40: + _log.info("Skipping Fedora 39 images as they are not supported") + return if image["type"] not in ("docker", "ociarchive"): # not a known container image type return @@ -364,15 +367,6 @@ class Uploader: if not repo: _log.info("Unknown subvariant %s", image["subvariant"]) return - if image["type"] == "docker" and ffrel.release.lower() != "eln" and ffrel.relnum < 40: - # these are actual docker archive images - imgformat = "docker-archive" - else: - # all others are OCI archives; F40+ .oci.tar.xz images - # with type "docker" are xz-compressed OCI archives, - # .ociarchive images with type "ociarchive" are non- - # compressed OCI archives - imgformat = "oci-archive" arch = image["arch"] if ffrel.release.lower() == "eln": tag = "latest" @@ -394,8 +388,12 @@ class Uploader: ] if cert_dir: args.append(f"--dest-cert-dir={cert_dir}") + # We only support OCI archives; F40+ .oci.tar.xz images + # with type "docker" are xz-compressed OCI archives, + # .ociarchive images with type "ociarchive" are non- + # compressed OCI archives args += [ - f"{imgformat}:{image_path}", + f"oci-archive:{image_path}", f"docker://{registry}/{repo}:{tag}-{arch}", ] _run(args)