Hopefully fixes #33913 (intermittent download issues)
If not, the diff there to cache the bins can be considered.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33915.
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | enirox001, davidgumberg, TheCharlatan, janb84, achow101 |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
167@@ -168,7 +168,13 @@ def download_binary(tag, args) -> int:
168 download_from_url(archive_url, archive)
169 except Exception as e:
170 print(f"\nDownload failed: {e}", file=sys.stderr)
171- return 1
172+ print("Retrying download after failure ...", file=sys.stderr)
ACK fad06f3
This looks good to me. I tested locally by running the script with valid releases (v25.0, v24.0.1) and an invalid one (v0.1.0) to verify the retry logic works correctly. The retry mechanism should significantly reduce CI failures from transient network issues.
optional nit: Consider adding an explicit timeout to urlopen() (e.g., timeout=60) to fail faster in case of network hangs, rather than relying on OS socket defaults. This would make the script more predictable and potentially avoid wasting CI time on stuck connections.
Not blocking since the current retry logic should handle the immediate problem.
ACK https://github.com/bitcoin/bitcoin/pull/33915/commits/fad06f3bb436a97683e8248bfda1bd0d9998c899
Nice! I’ve also had issues with this locally, retrying once seems a good idea.
I verified the retry mechanism by testing both successful downloads (v25.0) and failure scenarios (invalid_version_123), the retry logic correctly activates on HTTP 404 errors and provides clear error message
Fetching: https://bitcoincore.org/bin/bitcoin-core-nvalid_version_123/bitcoin-nvalid_version_123-osx64.tar.gz
Download failed: HTTP Error 404: Not Found Retrying download after failure …
Download failed a second time: HTTP Error 404: Not Found
ACK fad06f3bb436a97683e8248bfda1bd0d9998c899
PR adds one retry to download a prev. release.
The single retry is somewhat crude solution but a good first step to solve the intermitted download issues, good KISS sollution. If this isn’t enough we can always fallback on more elegant solutions, but this also increases the complexity.