From 82495dee4cccdae7add540a6c16bc6ac4e0d957b Mon Sep 17 00:00:00 2001 From: CI Automation Date: Mon, 26 Aug 2024 13:12:20 +0200 Subject: [PATCH] feat(release-controller): use .zst images instead of .gz --- release-controller/reconciler.py | 8 ++++---- release-controller/test_reconciler.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/release-controller/reconciler.py b/release-controller/reconciler.py index d2e91691d..452b04f3d 100644 --- a/release-controller/reconciler.py +++ b/release-controller/reconciler.py @@ -134,8 +134,8 @@ def sha256sum(filename): def version_package_urls(version: str): return [ - f"https://download.dfinity.systems/ic/{version}/guest-os/update-img/update-img.tar.gz", - f"https://download.dfinity.network/ic/{version}/guest-os/update-img/update-img.tar.gz", + f"https://download.dfinity.systems/ic/{version}/guest-os/update-img/update-img.tar.zst", + f"https://download.dfinity.network/ic/{version}/guest-os/update-img/update-img.tar.zst", ] @@ -145,11 +145,11 @@ def version_package_checksum(version: str): f"https://download.dfinity.systems/ic/{version}/guest-os/update-img/SHA256SUMS", timeout=10 ) checksum = [ - line for line in response.content.decode("utf-8").splitlines() if line.strip().endswith("update-img.tar.gz") + line for line in response.content.decode("utf-8").splitlines() if line.strip().endswith("update-img.tar.zst") ][0].split(" ")[0] for i, u in enumerate(version_package_urls(version)): - image_file = str(pathlib.Path(d) / f"update-img-{i}.tar.gz") + image_file = str(pathlib.Path(d) / f"update-img-{i}.tar.zst") logging.debug("fetching package %s", u) with open(image_file, "wb") as file: response = requests.get(u, timeout=10) diff --git a/release-controller/test_reconciler.py b/release-controller/test_reconciler.py index 1f71ae031..587935374 100644 --- a/release-controller/test_reconciler.py +++ b/release-controller/test_reconciler.py @@ -260,10 +260,10 @@ def mock_download_files(url: str, timeout: int = 10): # pylint: disable=unused- content = """\ 556b26661590495016052a58d07886e8dcce48c77a5dfc458fbcc5f01a95b1b3 *update-img-test.tar.gz ed1ff4e1db979b0c89cf333c09777488a0c50a3ba74c0f9491d6ba153a8dbfdb *update-img-test.tar.zst -9ca7002a723b932c3fb25293fc541e0b156170ec1e9a2c6a83c9733995051187 *update-img.tar.gz -dff2072e34071110234b0cb169705efc13284e4a99b7795ef1951af1fe7b41ac *update-img.tar.zst +dff2072e34071110234b0cb169705efc13284e4a99b7795ef1951af1fe7b41ac *update-img.tar.gz +9ca7002a723b932c3fb25293fc541e0b156170ec1e9a2c6a83c9733995051187 *update-img.tar.zst """ - elif url.endswith(".tar.gz"): + elif url.endswith(".tar.zst"): content = "some bytes..." return SimpleNamespace(content=content.encode())