fix(uv): use astral urls for uv primary source, github as secondary#3746
fix(uv): use astral urls for uv primary source, github as secondary#3746rickeylev merged 2 commits intobazel-contrib:mainfrom
Conversation
For official releases, use the astral.sh mirror as the preferred url for binary downloads, with github.com as a fallback. For uv >= 0.11.0, read the checksums directly from the dist-manifest contents, so the only github.com SPOF is fetching the dist-manifest itself.
There was a problem hiding this comment.
Code Review
This pull request enhances uv download reliability by introducing the astral.sh mirror as a preferred download source for official releases and optimizing checksum retrieval for uv versions 0.11.0 and later by reading them directly from the manifest. A review comment identifies that the mirror fallback should also be applied when downloading checksum files for older uv versions to ensure consistent availability.
|
Thanks for this! TIL astral has mirrors. Overall LGTM, just some word smithing of the PR and and changelog text to make: replace "improve ..." with "make uv use astral urls as primary, github as backup"
omg, i know right? It's been so bad lately.
Absolutely, yes. |
|
Thanks! I'll open a tracking issue about the And lol, the windows CI build hit a github 5xx downloading a standalone cpython. Possibly those could use the astral mirror as well? I didn't look into that angle (and generally don't use those toolchains). |
|
We could write the dist manifest sha to the facts file. |
For official releases, use the astral.sh mirror as the preferred url for binary downloads, with github.com as a fallback.
For uv >= 0.11.0, read the checksums directly from the dist-manifest contents, so the only github.com SPOF is fetching the dist-manifest itself.
It is not infrequent for
github.comto give a 5xx error on one of the uv sha256 downloads, leading to a failed build. (The sha256 downloads cannot be cached by Bazel's repository cache, since we request them without a checksum.) See RobotLocomotion/drake#24140 for some examples, as well as bazelbuild/bazel-central-registry#8591 (comment) (log).This change limits github as a single point of failure.