Skip to content

[ci] Pin the uv installer version in release and CI image builds - #66068

Merged
elliot-barn merged 1 commit into
masterfrom
pin-uv-release-images
Sep 11, 2026
Merged

elliot-barn merged 1 commit into
masterfrom
pin-uv-release-images

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

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

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]>
@elliot-barn
elliot-barn requested a review from a team as a code owner September 11, 2026 00:51

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core devprod release-test release test labels Sep 11, 2026
elliot-barn added a commit that referenced this pull request Sep 11, 2026
… 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]>
@elliot-barn
elliot-barn merged commit c8466ab into master Sep 11, 2026
6 checks passed
@elliot-barn
elliot-barn deleted the pin-uv-release-images branch September 11, 2026 05:15
NightWing1998 pushed a commit to NightWing1998/ray that referenced this pull request Sep 11, 2026
…-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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…-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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod go add ONLY when ready to merge, run all tests release-test release test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants