Merge pull request #90 from NixOS/joerg-ci

increase exponential backoff when trying to fetch github releases
This commit is contained in:
Jörg Thalheim 2024-06-06 11:28:06 +02:00 committed by GitHub
commit c92c80499f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,7 @@ def mirror_extension(extension_name: str, mediawiki_version: str) -> Extension:
with TemporaryDirectory() as tmpdir: with TemporaryDirectory() as tmpdir:
download_file(download_url.geturl(), f"{tmpdir}/{base_name}") download_file(download_url.geturl(), f"{tmpdir}/{base_name}")
run(["gh", "release", "upload", base_name, f"{tmpdir}/{base_name}"]) run(["gh", "release", "upload", base_name, f"{tmpdir}/{base_name}"])
for i in range(3): for i in range(30):
try: try:
hash = run(["nix-prefetch-url", "--unpack", mirror_url], stdout=subprocess.PIPE).stdout.strip() hash = run(["nix-prefetch-url", "--unpack", mirror_url], stdout=subprocess.PIPE).stdout.strip()
except subprocess.CalledProcessError: except subprocess.CalledProcessError: