Skip to content

[cherry-pick][2.59.0][ci] Pin the uv installer version in release and CI image builds (#66068) - #66069

Merged
elliot-barn merged 1 commit into
releases/2.59.0from
pin-uv-release-images-2.59.0
Sep 11, 2026
Merged

elliot-barn merged 1 commit into
releases/2.59.0from
pin-uv-release-images-2.59.0

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

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

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]>
(cherry picked from commit 4f5f8bf)
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:54

@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 attempts to pin the uv installation version to 0.11.33 across several Dockerfiles and initialization scripts. However, the feedback correctly points out that simply changing the installer script URL does not pin the installed version, as the script will still fetch the latest release unless the UV_VERSION environment variable is explicitly provided. To ensure consistent and reproducible builds, you should pass UV_VERSION="0.11.33" to the installer script as suggested.


# Install uv
curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
curl -fsSL 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.

high

The install.sh script from Astral UV does not have the version hardcoded. If the UV_VERSION environment variable is not set, the script will query the GitHub API for the latest release and install that instead of the version from the URL. To correctly pin the uv version, you should pass UV_VERSION="0.11.33" as an environment variable to the installer script.

curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" UV_VERSION="0.11.33" sh


# Install uv
curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
curl -fsSL 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.

high

The install.sh script from Astral UV does not have the version hardcoded. If the UV_VERSION environment variable is not set, the script will query the GitHub API for the latest release and install that instead of the version from the URL. To correctly pin the uv version, you should pass UV_VERSION="0.11.33" as an environment variable to the installer script.

curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" UV_VERSION="0.11.33" sh


UV_PYTHON_VERSION=3.10
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf https://astral.sh/uv/0.11.33/install.sh | 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.

high

The install.sh script from Astral UV does not have the version hardcoded. If the UV_VERSION environment variable is not set, the script will query the GitHub API for the latest release and install that instead of the version from the URL. To correctly pin the uv version, you should pass UV_VERSION="0.11.33" as an environment variable to the installer script.

Suggested change
curl -LsSf https://astral.sh/uv/0.11.33/install.sh | sh
curl -LsSf https://astral.sh/uv/install.sh | UV_VERSION="0.11.33" sh

echo "build --remote_cache=${BUILDKITE_BAZEL_CACHE_URL}" >> /root/.bazelrc

curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
curl -fsSL 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.

high

The install.sh script from Astral UV does not have the version hardcoded. If the UV_VERSION environment variable is not set, the script will query the GitHub API for the latest release and install that instead of the version from the URL. To correctly pin the uv version, you should pass UV_VERSION="0.11.33" as an environment variable to the installer script.

curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" UV_VERSION="0.11.33" sh


# Install uv
curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
curl -fsSL 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.

high

The install.sh script from Astral UV does not have the version hardcoded. If the UV_VERSION environment variable is not set, the script will query the GitHub API for the latest release and install that instead of the version from the URL. To correctly pin the uv version, you should pass UV_VERSION="0.11.33" as an environment variable to the installer script.

curl -fsSL https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" UV_VERSION="0.11.33" sh


# Install uv
wget -qO- https://astral.sh/uv/install.sh | sudo -E env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
wget -qO- https://astral.sh/uv/0.11.33/install.sh | sudo -E 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.

high

The install.sh script from Astral UV does not have the version hardcoded. If the UV_VERSION environment variable is not set, the script will query the GitHub API for the latest release and install that instead of the version from the URL. To correctly pin the uv version, you should pass UV_VERSION="0.11.33" as an environment variable to the installer script.

wget -qO- https://astral.sh/uv/install.sh | sudo -E env UV_UNMANAGED_INSTALL="/usr/local/bin" UV_VERSION="0.11.33" sh


# 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.

high

The install.sh script from Astral UV does not have the version hardcoded. If the UV_VERSION environment variable is not set, the script will query the GitHub API for the latest release and install that instead of the version from the URL. To correctly pin the uv version, you should pass UV_VERSION="0.11.33" as an environment variable to the installer script.

curl -sSL -o- https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/local/bin" UV_VERSION="0.11.33" 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
@sai-miduthuri sai-miduthuri added the go add ONLY when ready to merge, run all tests label Sep 11, 2026
@elliot-barn
elliot-barn merged commit 150bc9b into releases/2.59.0 Sep 11, 2026
6 checks passed
@elliot-barn
elliot-barn deleted the pin-uv-release-images-2.59.0 branch September 11, 2026 05:14
sai-miduthuri added a commit that referenced this pull request Nov 10, 2026
… base-deps and base-slim (CVE-2026-111497) (#67596) (#68028)

## Description

Cherry-pick of #67596 (master commit
ed39c78) onto `releases/2.59.2`.

**Top of a 3-PR stack on `releases/2.59.2`:** #68027 (the #67789 pick),
then #68035 (the brotli bump for the `large_image_embedding` release
lock), then this PR. Merge the stack with `gh stack merge 68028`, which
lands all three in order.

This PR needs the lock files from #68027 and #68035. Several images
built on these bases install locks with pip or uv: the py3.10 `ray`,
`ray-gpu` and `ray-ml` test and release images, `ray-llm` on 3.11 and
3.12, and the `large_image_embedding` release-test image. On this branch
those locks pin `brotli==1.2.0`, or 1.1.0 for `large_image_embedding`.
Installing them would downgrade the 1.2.1 this PR puts in the base
image. On master, #67789 also merged before #67596.

CVE-2026-111497
([GHSA-9v8h-qqgm-4m35](GHSA-9v8h-qqgm-4m35))
is an out-of-bounds write in the Brotli decoder, fixed in 1.2.1, and it
is in CISA KEV. The Miniforge installer used by `docker/base-deps` and
`docker/base-slim` ships `brotli-python` 1.1.0 in its base environment,
and no pip lock manages it. So every image built on these bases (`ray`,
`ray-ml`, `ray-llm`) carries the vulnerable decoder.

#67596 does the following:
- On Python 3.11 and later, it adds `brotli-python>=1.2.1` to the
existing `conda install`.
- On Python 3.10, where conda-forge has no 1.2.1 build, it removes the
conda package and installs `Brotli==1.2.1` from PyPI.

## Related issues

Related to #67596. Depends on #68027, the #67789 pick, and on #68035.
Advisory: GHSA-9v8h-qqgm-4m35 / CVE-2026-111497. The same pick for
2.60.1 is #67997.

## Additional information

### Cherry-pick details

Applied cleanly with `git cherry-pick -x` on top of the #67789 pick. It
has the same 2 files, +20/-2, and the same `git patch-id --stable` as
the master commit.

No prerequisite commits are missing. After the pick, both Dockerfiles
are identical to master at ed39c78. The master commits that touched
them between the 2.59 cut and #67596 reached this branch through #66069
and #67487.

Not a duplicate: this branch doesn't contain #67596, and no PR against
`releases/2.59.2` references it. #67997 picks the same commit onto
`releases/2.60.1`.

### Testing

| Command | Result |
|---|---|
| `pre-commit run --files docker/base-deps/Dockerfile
docker/base-slim/Dockerfile` | Passed |
| With `Brotli==1.2.1` installed, `pip install -r` a file pinning
`brotli==1.2.0` | Uninstalls 1.2.1 and installs 1.2.0, which is why this
PR is stacked on #68027 and #68035 |

I didn't build the images locally. Both Dockerfiles are now
byte-identical to the ones #67596 built and checked on master, for
Python 3.10 to 3.14 on amd64 and arm64. CI builds the images on this PR.

AI assistance was used to prepare this cherry-pick.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Ronaldo Saheki <[email protected]>
Signed-off-by: Sai Miduthuri <[email protected]>
Co-authored-by: Ronaldo <[email protected]>
Co-authored-by: Claude Sonnet 5.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