8000 feat(release-controller): use .zst images instead of .gz by LittleChimera · Pull Request #797 · dfinity/dre · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(release-controller): use .zst images instead of .gz #797

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

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions release-controller/reconciler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]


Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions release-controller/test_reconciler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Loading
0