Repository navigation
[ci] Pin the uv installer version in release and CI image builds - #66068
Conversation
Seven image builds fetched https://astral.sh/uv/install.sh, which always resolves to the latest uv release, so the uv version baked into an image was whatever happened to be current on the day it was built. Two images rebuilt a week apart could ship different uv versions from identical source. Pin all seven to 0.11.33. No other behaviour changes: both release images use uv only as `uv pip install --system --no-deps -r <depset>.lock`, installing an already-resolved lock, so no resolver behaviour is in play. Note that astral publishes no series aliases -- https://astral.sh/uv/0.11/ redirects to a 404 -- so the pin has to name an exact patch version. Already-pinned call sites are left alone, since changing those is a version bump rather than a hardening change: ci/docker/manylinux.Dockerfile (0.8.17), ci/ray_ci/windows/build_base.sh (0.9.22), the dependabot workflow and WORKSPACE (0.9.26), and the uv PyPI package in requirements (0.8.9). Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request pins the installation of the uv tool to version 0.11.33 across multiple Dockerfiles and scripts to ensure reproducible builds. The feedback recommends adding the -f (or --fail) flag to the curl command in docker/base-slim/Dockerfile to prevent silent failures if the server returns an error, which also maintains consistency with the other Dockerfiles in the repository.
|
|
||
| # Install uv | ||
| curl -sSL -o- https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" sh | ||
| curl -sSL -o- https://astral.sh/uv/0.11.33/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" sh |
There was a problem hiding this comment.
Using curl without the -f/--fail flag means that if the server returns an HTTP error (such as 404 or 500), curl will still exit with status 0 and output the error page HTML to stdout. This HTML is then piped directly into sh, which can lead to unexpected behavior or silent failures. Adding -f ensures curl fails immediately on server errors, which also aligns with the curl -fsSL pattern used in the other Dockerfiles in this PR.
curl -fsSL https://astral.sh/uv/0.11.33/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
… CI image builds (#66068) (#66069) ## Description Cherry-pick of #66068 onto `releases/2.59.0`. Applied cleanly, no conflicts, identical 7-file diff. Seven image builds fetched `https://astral.sh/uv/install.sh`, which always resolves to the latest uv release, so the uv version baked into an image was whatever happened to be current on the day it was built. On a release branch that matters more than on master: a 2.59.0 patch image rebuilt weeks after the cut would pick up a different uv than the original. Pinned to **0.11.33**: | File | Builds | |---|---| | `docker/base-deps/Dockerfile` | release image chain root | | `docker/base-slim/Dockerfile` | slim image | | `ci/docker/forge.Dockerfile` | CI forge | | `ci/docker/base.gpu.Dockerfile` | CI GPU base | | `.buildkite/release-automation/forge_x86_64.Dockerfile` | release-automation forge | | `.buildkite/release-automation/forge_arm64.Dockerfile` | release-automation forge | | `.buildkite/release/custom-image-build-and-test-init.sh` | release custom-image build | `git grep astral.sh/uv/install.sh` returns nothing on this branch. ## Related issues Cherry-pick of #66068. ## Additional information **No behaviour change is expected.** Both release images use uv only as `uv pip install --system --no-cache-dir --no-deps --index-strategy unsafe-best-match -r <depset>.lock` — installing an already-resolved lock with `--no-deps`, so no resolver behaviour is in play. **Why an exact patch version:** astral publishes no series aliases. `https://astral.sh/uv/0.11/install.sh` 301-redirects to a 404, so a pin has to name a full version. 0.11.33 is the newest in the 0.11 series. Already-pinned call sites (`manylinux.Dockerfile` 0.8.17, `ci/ray_ci/windows/build_base.sh` 0.9.22, the dependabot workflow and `WORKSPACE` 0.9.26, `uv==0.8.9` in requirements) are deliberately untouched here, matching the master PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
…-project#66068) ## Description Seven image builds fetched `https://astral.sh/uv/install.sh`, which always resolves to the latest uv release. The uv version baked into an image was therefore whatever happened to be current on the day it was built, and two images rebuilt a week apart could ship different uv versions from identical source. This pins all seven to **0.11.33**: | File | Builds | |---|---| | `docker/base-deps/Dockerfile` | release image chain root | | `docker/base-slim/Dockerfile` | slim image | | `ci/docker/forge.Dockerfile` | CI forge | | `ci/docker/base.gpu.Dockerfile` | CI GPU base | | `.buildkite/release-automation/forge_x86_64.Dockerfile` | release-automation forge | | `.buildkite/release-automation/forge_arm64.Dockerfile` | release-automation forge | | `.buildkite/release/custom-image-build-and-test-init.sh` | release custom-image build | `git grep astral.sh/uv/install.sh` now returns nothing. ## Additional information **No behaviour change is expected.** Both release images use uv only as `uv pip install --system --no-cache-dir --no-deps --index-strategy unsafe-best-match -r <depset>.lock` (`base-deps:120`, `base-slim:126`) — installing an already-resolved lock with `--no-deps`, so no resolver behaviour is in play. **Why an exact patch version:** astral publishes no series aliases. `https://astral.sh/uv/0.11/install.sh` 301-redirects to `releases.astral.sh/github/uv/releases/download/0.11/uv-installer.sh`, which 404s, so a pin has to name a full version. 0.11.33 is the newest release in the 0.11 series. **Call sites deliberately left alone**, because changing them is a version bump rather than a hardening change and they feed wheel/bazel builds that deserve their own CI run: - `ci/docker/manylinux.Dockerfile:31` → 0.8.17 - `ci/ray_ci/windows/build_base.sh:9` → 0.9.22 (`install.ps1`) - `.github/workflows/dependabot_recompile_deps.yml:41` → 0.9.26 - `WORKSPACE:187,200` → 0.9.26 (`http_archive` of the uv binaries) - `python/requirements/test-requirements.txt:79` → `uv==0.8.9` (the PyPI package; a separate mechanism) Unifying all of these on one version is a sensible follow-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
…-project#66068) ## Description Seven image builds fetched `https://astral.sh/uv/install.sh`, which always resolves to the latest uv release. The uv version baked into an image was therefore whatever happened to be current on the day it was built, and two images rebuilt a week apart could ship different uv versions from identical source. This pins all seven to **0.11.33**: | File | Builds | |---|---| | `docker/base-deps/Dockerfile` | release image chain root | | `docker/base-slim/Dockerfile` | slim image | | `ci/docker/forge.Dockerfile` | CI forge | | `ci/docker/base.gpu.Dockerfile` | CI GPU base | | `.buildkite/release-automation/forge_x86_64.Dockerfile` | release-automation forge | | `.buildkite/release-automation/forge_arm64.Dockerfile` | release-automation forge | | `.buildkite/release/custom-image-build-and-test-init.sh` | release custom-image build | `git grep astral.sh/uv/install.sh` now returns nothing. ## Additional information **No behaviour change is expected.** Both release images use uv only as `uv pip install --system --no-cache-dir --no-deps --index-strategy unsafe-best-match -r <depset>.lock` (`base-deps:120`, `base-slim:126`) — installing an already-resolved lock with `--no-deps`, so no resolver behaviour is in play. **Why an exact patch version:** astral publishes no series aliases. `https://astral.sh/uv/0.11/install.sh` 301-redirects to `releases.astral.sh/github/uv/releases/download/0.11/uv-installer.sh`, which 404s, so a pin has to name a full version. 0.11.33 is the newest release in the 0.11 series. **Call sites deliberately left alone**, because changing them is a version bump rather than a hardening change and they feed wheel/bazel builds that deserve their own CI run: - `ci/docker/manylinux.Dockerfile:31` → 0.8.17 - `ci/ray_ci/windows/build_base.sh:9` → 0.9.22 (`install.ps1`) - `.github/workflows/dependabot_recompile_deps.yml:41` → 0.9.26 - `WORKSPACE:187,200` → 0.9.26 (`http_archive` of the uv binaries) - `python/requirements/test-requirements.txt:79` → `uv==0.8.9` (the PyPI package; a separate mechanism) Unifying all of these on one version is a sensible follow-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Description
Seven image builds fetched
https://astral.sh/uv/install.sh, which always resolves to the latest uv release. The uv version baked into an image was therefore whatever happened to be current on the day it was built, and two images rebuilt a week apart could ship different uv versions from identical source.This pins all seven to 0.11.33:
docker/base-deps/Dockerfiledocker/base-slim/Dockerfileci/docker/forge.Dockerfileci/docker/base.gpu.Dockerfile.buildkite/release-automation/forge_x86_64.Dockerfile.buildkite/release-automation/forge_arm64.Dockerfile.buildkite/release/custom-image-build-and-test-init.shgit grep astral.sh/uv/install.shnow returns nothing.Additional information
No behaviour change is expected. Both release images use uv only as
uv pip install --system --no-cache-dir --no-deps --index-strategy unsafe-best-match -r <depset>.lock(base-deps:120,base-slim:126) — installing an already-resolved lock with--no-deps, so no resolver behaviour is in play.Why an exact patch version: astral publishes no series aliases.
https://astral.sh/uv/0.11/install.sh301-redirects toreleases.astral.sh/github/uv/releases/download/0.11/uv-installer.sh, which 404s, so a pin has to name a full version. 0.11.33 is the newest release in the 0.11 series.Call sites deliberately left alone, because changing them is a version bump rather than a hardening change and they feed wheel/bazel builds that deserve their own CI run:
ci/docker/manylinux.Dockerfile:31→ 0.8.17ci/ray_ci/windows/build_base.sh:9→ 0.9.22 (install.ps1).github/workflows/dependabot_recompile_deps.yml:41→ 0.9.26WORKSPACE:187,200→ 0.9.26 (http_archiveof the uv binaries)python/requirements/test-requirements.txt:79→uv==0.8.9(the PyPI package; a separate mechanism)Unifying all of these on one version is a sensible follow-up.
🤖 Generated with Claude Code