Repository navigation
[ci] Cap conda certifi when downgrading Miniforge python to 3.10 - #67256
Conversation
conda-forge certifi builds uploaded from 2026-10-19 on (2026.10.18, 2026.10.19 and a re-upload of 2026.7.22) require python>=3.11. The base-deps and base-slim images install Miniforge 24.11.3 (python 3.12) and then `conda install python=3.10`; with no certifi that supports 3.10 the solver drops certifi, requests and conda, and the transaction fails with "RemoveError: This operation will remove conda without replacing it". Cap certifi<2026 for the 3.10 install only. Other python versions keep the latest certifi. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request adds a workaround for Python 3.10 environments by capping the certifi package version to <2026 during conda installation, preventing dependency resolution failures. The review feedback points out that referencing an empty array '${CONDA_PYTHON_EXTRA_SPECS[@]}' under 'set -u' can trigger an 'unbound variable' error in Bash versions prior to 4.4. It is recommended to use a standard string variable with the '${VAR:+"$VAR"}' expansion instead to ensure compatibility.
| CONDA_PYTHON_EXTRA_SPECS=() | ||
| if [[ "${PYTHON_VERSION}" == "3.10" ]]; then | ||
| CONDA_PYTHON_EXTRA_SPECS=("certifi<2026") | ||
| fi | ||
| $HOME/anaconda3/bin/conda install -y libgcc-ng python=$PYTHON_VERSION "libffi>=3.4.6" "${CONDA_PYTHON_EXTRA_SPECS[@]}" |
There was a problem hiding this comment.
Under set -u (enabled via set -euo pipefail on line 81), referencing an empty array like "${CONDA_PYTHON_EXTRA_SPECS[@]}" can trigger an "unbound variable" error in Bash versions prior to 4.4.
Since CONDA_PYTHON_EXTRA_SPECS is empty for all Python versions other than 3.10, this will cause build failures on environments or base images using older Bash versions.
Using a standard string variable with the ${VAR:+"$VAR"} expansion syntax is a safer, more compatible, and cleaner alternative that avoids this issue entirely.
CONDA_PYTHON_EXTRA_SPECS=""
if [[ "${PYTHON_VERSION}" == "3.10" ]]; then
CONDA_PYTHON_EXTRA_SPECS="certifi<2026"
fi
$HOME/anaconda3/bin/conda install -y libgcc-ng python=$PYTHON_VERSION "libffi>=3.4.6" ${CONDA_PYTHON_EXTRA_SPECS:+"$CONDA_PYTHON_EXTRA_SPECS"}
There was a problem hiding this comment.
Not an issue here: every image built from these Dockerfiles is based on Ubuntu 22.04 (ubuntu:22.04 and nvidia/cuda:*-ubuntu22.04 in the wanda configs), which ships bash 5.1. Empty-array expansion under set -u only errors before bash 4.4. I checked set -u; a=(); echo "${a[@]}" in ubuntu:22.04 and it runs cleanly, and the py3.11 builds (empty array) pass under set -euo pipefail.
| CONDA_PYTHON_EXTRA_SPECS=() | ||
| if [[ "${PYTHON_VERSION}" == "3.10" ]]; then | ||
| CONDA_PYTHON_EXTRA_SPECS=("certifi<2026") | ||
| fi | ||
| /home/ray/anaconda3/bin/conda install -y "python=${PYTHON_VERSION}" "${CONDA_PYTHON_EXTRA_SPECS[@]}" |
There was a problem hiding this comment.
Under set -u (enabled via set -euo pipefail on line 109), referencing an empty array like "${CONDA_PYTHON_EXTRA_SPECS[@]}" can trigger an "unbound variable" error in Bash versions prior to 4.4.
Since CONDA_PYTHON_EXTRA_SPECS is empty for all Python versions other than 3.10, this will cause build failures on environments or base images using older Bash versions.
Using a standard string variable with the ${VAR:+"$VAR"} expansion syntax is a safer, more compatible, and cleaner alternative that avoids this issue entirely.
CONDA_PYTHON_EXTRA_SPECS=""
if [[ "${PYTHON_VERSION}" == "3.10" ]]; then
CONDA_PYTHON_EXTRA_SPECS="certifi<2026"
fi
/home/ray/anaconda3/bin/conda install -y "python=${PYTHON_VERSION}" ${CONDA_PYTHON_EXTRA_SPECS:+"$CONDA_PYTHON_EXTRA_SPECS"}
There was a problem hiding this comment.
Not an issue here: every image built from these Dockerfiles is based on Ubuntu 22.04 (ubuntu:22.04 and nvidia/cuda:*-ubuntu22.04 in the wanda configs), which ships bash 5.1. Empty-array expansion under set -u only errors before bash 4.4. I checked set -u; a=(); echo "${a[@]}" in ubuntu:22.04 and it runs cleanly, and the py3.11 builds (empty array) pass under set -euo pipefail.
…CA compromise (#67295) ## Why The private keys of eight eMudhra intermediate CAs were compromised (https://emudhra.we-have-a-problem.com/). The published Ray images still trust them: | In `rayproject/ray:nightly-py312-cpu` | Version | Source | |---|---|---| | `pip` | 24.3.1 (vendors a 2024 certifi) | Miniforge 24.11.3 installer; nothing upgrades it | | `certifi` in site-packages (used by `requests`) | 2026.4.22 | base lock; overwrites conda's certifi | | `uv` binary | 0.11.33 | base-deps / base-slim Dockerfiles | Checked with Python's `ssl` against the disclosure site's test host `dv-g3b-emudhra.we-have-a-problem.com`: certifi 2025.11.12 and 2026.4.22 **trust** it, 2026.10.19 rejects it (it drops `emSign ECC Root CA - G3`). pip ignores site-packages certifi: it trusts its own vendored certifi **and** the system store. Tested against the same host with certifi 2026.10.19 installed: pip 24.3.1 connects even with a patched system store; pip 26.2.2 rejects it when the system store (conda's `ca-certificates`, already 2026.10.19 on fresh builds) is patched. ## What - **pip 26.2.2** in `docker/base-deps` and `docker/base-slim`. All downstream images (ray, ray-ml, ray-llm, ray-torch, base-extra) build on these two. - 3.11–3.14: `pip=26.2.2` is added to the existing `conda install python=...` call. - 3.10: conda-forge pip 26.2.2 builds require python>=3.11, but the PyPI release supports 3.10, so it is installed with `uv pip install --system pip==26.2.2` after the conda step. Tested in `condaforge/miniforge3:24.11.3-0`: pip 24.3.1 is replaced by 26.2.2 (vendored certifi 2026.10.19). The `menuinst` entry-point warning from conda 23.9 is pre-existing (#67256). - **certifi** 2026.10.19 in `requirements_compiled*.txt` and every lock file (113 files, certifi lines only). The image-related configs (`rayimg`, `ray_torch`, `release_gpu_cu130`, `release_ml_torchft_tests`, `release_multimodal_inference_benchmarks_tests`) were regenerated with raydepsets and uv 0.9.26 (the `WORKSPACE` version); the only package change is certifi. - **uv binary** 0.11.33 → 0.13.4 in the two base Dockerfiles. ## Not covered - CI tooling (pip-tools, Bazel's pip, CI Dockerfiles' uv, uv python package) stays in #67203. - runtime_env virtualenvs use virtualenv's bundled pip; virtualenv 21.14.12 (bundles pip 26.2.2) is a separate bump. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Stacked on #67295 (base branch `elliot-barn/emudhra-image-fix`); retarget to `master` once #67295 merges. ## Why certifi 2026.10.19 is the fixed version for the eMudhra intermediate CA compromise (https://emudhra.we-have-a-problem.com/): it drops `emSign ECC Root CA - G3`, the root the compromised intermediates chain to. Python's `ssl` with certifi 2026.4.22 still trusts the disclosure site's test host; 2026.10.19 rejects it. #67295 already pins `certifi==2026.10.19` in `requirements_compiled.txt`, `requirements_compiled_py3.14.txt` and every lock file. This PR raises the **floors** in the input files those are compiled from, so no future recompile can resolve an affected certifi. ## What | File | Before | After | Compiled into | |---|---|---|---| | `python/requirements/security-requirements.txt` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `requirements_compiled*.txt` (`ci/ci.sh compile_pip_dependencies` / `_py314`) | | `python/requirements/cloud-requirements.txt` | `certifi>=2024.8.30` | `certifi>=2026.10.19` | `requirements_compiled*.txt` | | `release/requirements_py310.in` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `release/requirements_py310.txt` (`//release:requirements_py310`) | | `release/requirements_windows.in` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `python/deplocks/ci/ci_windows_depset.lock` (py3.8; certifi 2026.10.19 supports `>=3.7`) | Every compiled output already pins `certifi==2026.10.19` (from #67295), so no compiled or lock file changes. After this PR no certifi pin or floor under `python/`, `release/` or `ci/` is below 2026.10.19. ## Intentionally unchanged - `docker/base-deps` / `docker/base-slim` `certifi<2026` for Python 3.10: caps **conda's** certifi, because every conda-forge certifi build from 2026 requires Python >= 3.11 (#67256). The image's effective certifi is the PyPI 2026.10.19 the lock installs over it. - `doc/source/ray-overview/pip_freeze_ray-py310-cpu.txt` (`certifi==2026.4.22`): a record of a published image's `pip freeze`, regenerated by the release docs step. - `ci/ray_ci/windows/build_base.sh` already runs `conda update ... certifi` to the latest at build time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…ry Python (#67350) ## Why #67256 capped conda's certifi at `<2026` for Python 3.10 in `docker/base-deps` and `docker/base-slim`, because every conda-forge certifi from 2026 on required `python>=3.11` and the 3.10 downgrade failed with `RemoveError`. That cap makes conda install **certifi 2025.11.12**, which still trusts the compromised eMudhra roots. The py3.10 images only end up patched because the lock install (`certifi==2026.10.19`) overwrites it afterwards. That leaves stale records behind in `rayproject/ray:nightly-py310-cpu`: - `conda-meta/certifi-2025.11.12-pyhd8ed1ab_0.json` - `pkgs/certifi-2025.11.12-.../certifi/cacert.pem` Scanners can flag those, and a later `conda` operation could re-link the old bundle. Since then, conda-forge has patched certifi **2026.10.19** to allow Python 3.10 (conda-forge/conda-forge-repodata-patches-feedstock@d7dcb640, 2026-10-21). It is the only patched build: 2026.10.18 and 2026.10.23 still require 3.11. ## What In both Dockerfiles, pin `certifi=2026.10.19` in the conda step for **every** Python version, matching the lock files. The lock install then finds conda's certifi already correct and leaves it alone, so `conda-meta` and the package cache match what is installed. ```bash CONDA_PIP_SPEC=("pip=26.2.2") if [[ "${PYTHON_VERSION}" == "3.10" ]]; then # conda-forge pip 26.2.2 requires python>=3.11; 3.10 installs it from PyPI below. CONDA_PIP_SPEC=() fi conda install -y ... "certifi=2026.10.19" "${CONDA_PIP_SPEC[@]}" ``` certifi is pinned inline for every version; the 3.10 branch is only about pip. conda-forge pip 26.2.2 still requires `python>=3.11`, with no repodata patch, so 3.10 keeps installing pip 26.2.2 from PyPI after the conda step, as before. ## Testing The test runs in `condaforge/miniforge3:24.11.3-0` (the Dockerfiles' Miniforge). For each Dockerfile, it extracts the edited spec block and `conda install` line, runs them, then runs the 3.10 PyPI pip step and the `certifi` line of that version's `ray_base_deps_py<ver>.lock` with `uv pip install --no-deps`. | | 3.10 | 3.11 | 3.12 | 3.13 | 3.14 | |---|---|---|---|---|---| | base-deps | ✅ | ✅ | ✅ | ✅ | ✅ | | base-slim | ✅ | ✅ | ✅ | ✅ | ✅ | Results for every cell: - `certifi` is 2026.10.19, and `conda-meta` has 2026.10.19. - The lock certifi install is a no-op ("Checked 1 package"). - `pip` is 26.2.2. - conda is 26.7.1 on 3.10 (previously 23.9.0 under the cap), 24.11.3 on 3.12 (unchanged), and 26.9.4 on 3.11/3.13/3.14. On 3.10, conda's pip record stays at 24.3.1 because pip still comes from PyPI there, which is unchanged. The four 3.10–3.12 runs that failed when all ten ran in parallel passed when rerun one at a time, so those failures came from the concurrent solves. This changes the base image inputs, so premerge rebuilds every base image from scratch, which also exercises the change on every Python version. Related: the 2.60 cherry-pick of #67256 (#67320) carries the old `certifi<2026` cap; this change should replace it there. ## Additional information Not a duplicate: open PRs touching certifi/conda are only the 2.60 cherry-picks (#67320, #67322, #67346). AI assistance (Claude Code) was used for this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…CA compromise (#67295) The private keys of eight eMudhra intermediate CAs were compromised (https://emudhra.we-have-a-problem.com/). The published Ray images still trust them: | In `rayproject/ray:nightly-py312-cpu` | Version | Source | |---|---|---| | `pip` | 24.3.1 (vendors a 2024 certifi) | Miniforge 24.11.3 installer; nothing upgrades it | | `certifi` in site-packages (used by `requests`) | 2026.4.22 | base lock; overwrites conda's certifi | | `uv` binary | 0.11.33 | base-deps / base-slim Dockerfiles | Checked with Python's `ssl` against the disclosure site's test host `dv-g3b-emudhra.we-have-a-problem.com`: certifi 2025.11.12 and 2026.4.22 **trust** it, 2026.10.19 rejects it (it drops `emSign ECC Root CA - G3`). pip ignores site-packages certifi: it trusts its own vendored certifi **and** the system store. Tested against the same host with certifi 2026.10.19 installed: pip 24.3.1 connects even with a patched system store; pip 26.2.2 rejects it when the system store (conda's `ca-certificates`, already 2026.10.19 on fresh builds) is patched. - **pip 26.2.2** in `docker/base-deps` and `docker/base-slim`. All downstream images (ray, ray-ml, ray-llm, ray-torch, base-extra) build on these two. - 3.11–3.14: `pip=26.2.2` is added to the existing `conda install python=...` call. - 3.10: conda-forge pip 26.2.2 builds require python>=3.11, but the PyPI release supports 3.10, so it is installed with `uv pip install --system pip==26.2.2` after the conda step. Tested in `condaforge/miniforge3:24.11.3-0`: pip 24.3.1 is replaced by 26.2.2 (vendored certifi 2026.10.19). The `menuinst` entry-point warning from conda 23.9 is pre-existing (#67256). - **certifi** 2026.10.19 in `requirements_compiled*.txt` and every lock file (113 files, certifi lines only). The image-related configs (`rayimg`, `ray_torch`, `release_gpu_cu130`, `release_ml_torchft_tests`, `release_multimodal_inference_benchmarks_tests`) were regenerated with raydepsets and uv 0.9.26 (the `WORKSPACE` version); the only package change is certifi. - **uv binary** 0.11.33 → 0.13.4 in the two base Dockerfiles. - CI tooling (pip-tools, Bazel's pip, CI Dockerfiles' uv, uv python package) stays in #67203. - runtime_env virtualenvs use virtualenv's bundled pip; virtualenv 21.14.12 (bundles pip 26.2.2) is a separate bump. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit 79dcc96) Signed-off-by: Sai Miduthuri <[email protected]>
Stacked on #67295 (base branch `elliot-barn/emudhra-image-fix`); retarget to `master` once #67295 merges. ## Why certifi 2026.10.19 is the fixed version for the eMudhra intermediate CA compromise (https://emudhra.we-have-a-problem.com/): it drops `emSign ECC Root CA - G3`, the root the compromised intermediates chain to. Python's `ssl` with certifi 2026.4.22 still trusts the disclosure site's test host; 2026.10.19 rejects it. #67295 already pins `certifi==2026.10.19` in `requirements_compiled.txt`, `requirements_compiled_py3.14.txt` and every lock file. This PR raises the **floors** in the input files those are compiled from, so no future recompile can resolve an affected certifi. ## What | File | Before | After | Compiled into | |---|---|---|---| | `python/requirements/security-requirements.txt` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `requirements_compiled*.txt` (`ci/ci.sh compile_pip_dependencies` / `_py314`) | | `python/requirements/cloud-requirements.txt` | `certifi>=2024.8.30` | `certifi>=2026.10.19` | `requirements_compiled*.txt` | | `release/requirements_py310.in` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `release/requirements_py310.txt` (`//release:requirements_py310`) | | `release/requirements_windows.in` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `python/deplocks/ci/ci_windows_depset.lock` (py3.8; certifi 2026.10.19 supports `>=3.7`) | Every compiled output already pins `certifi==2026.10.19` (from #67295), so no compiled or lock file changes. After this PR no certifi pin or floor under `python/`, `release/` or `ci/` is below 2026.10.19. ## Intentionally unchanged - `docker/base-deps` / `docker/base-slim` `certifi<2026` for Python 3.10: caps **conda's** certifi, because every conda-forge certifi build from 2026 requires Python >= 3.11 (#67256). The image's effective certifi is the PyPI 2026.10.19 the lock installs over it. - `doc/source/ray-overview/pip_freeze_ray-py310-cpu.txt` (`certifi==2026.4.22`): a record of a published image's `pip freeze`, regenerated by the release docs step. - `ci/ray_ci/windows/build_base.sh` already runs `conda update ... certifi` to the latest at build time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit aab6295) Signed-off-by: Sai Miduthuri <[email protected]>
) ## Why Any py3.10 base image built without a cache hit currently fails: ``` Verifying transaction: / failed RemoveError: This operation will remove conda without replacing it with another version of conda. ``` `docker/base-deps` and `docker/base-slim` install Miniforge 24.11.3, which ships Python 3.12, and then run `conda install python=3.10`. conda-forge `certifi` builds uploaded from 2026-10-19 on require `python >=3.11`. That includes 2026.10.18, 2026.10.19 and a re-upload of 2026.7.22. With no certifi left that supports 3.10, the solver drops `certifi`, `requests` and `conda`, and conda refuses the transaction. Cached images still pass, so this only shows up on a cache miss: - New platforms, e.g. `ray-py3.10-cu13.3.1-cudnn-base` in #66547 (premerge build 75291). - Any change to base-deps inputs, e.g. premerge build 75286. - `smoke test build-docker.sh`, which always builds base-deps from scratch. It has failed on master postmerge since build 20426 (2026-10-21 16:05 UTC); build 20420 earlier that day passed. ## Change Add `certifi<2026` to the `conda install python=...` call in both Dockerfiles, for Python 3.10 only. Other Python versions are unchanged and keep the latest certifi. With the cap, the py3.10 solve settles on certifi 2025.11.12 and conda 23.9.0. That conda version is the newest the solver can pair with Python 3.10 under the cap. Pinning `conda>=24.11` as well made the libmamba solver segfault locally. Python packages that Ray installs with pip/uv afterwards are unaffected; they come from the lock files. ## Duplicate check I searched open PRs for `certifi` and `conda`. #67203 bumps pip's certifi pin, which is unrelated (and closed); nothing else touches this. ## Testing Locally, in `condaforge/miniforge3:24.11.3-0` (the same Miniforge as the Dockerfiles), I ran the exact install and clean commands from each Dockerfile: - base-deps, py3.10: passes (Python 3.10.22, conda 23.9.0, certifi 2025.11.12). - base-slim, py3.10: passes (same versions). - base-deps and base-slim, py3.11: pass. The cap isn't applied (conda 26.9.4, certifi 2026.10.19). - Without the cap, py3.10 fails with the `RemoveError` above. This PR changes the base image inputs, so premerge rebuilds every base image from scratch, which also exercises the change on every Python version. AI assistance (Claude Code) was used to investigate and write this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit dc5d25c) Signed-off-by: Sai Miduthuri <[email protected]>
…CA compromise (#67295) The private keys of eight eMudhra intermediate CAs were compromised (https://emudhra.we-have-a-problem.com/). The published Ray images still trust them: | In `rayproject/ray:nightly-py312-cpu` | Version | Source | |---|---|---| | `pip` | 24.3.1 (vendors a 2024 certifi) | Miniforge 24.11.3 installer; nothing upgrades it | | `certifi` in site-packages (used by `requests`) | 2026.4.22 | base lock; overwrites conda's certifi | | `uv` binary | 0.11.33 | base-deps / base-slim Dockerfiles | Checked with Python's `ssl` against the disclosure site's test host `dv-g3b-emudhra.we-have-a-problem.com`: certifi 2025.11.12 and 2026.4.22 **trust** it, 2026.10.19 rejects it (it drops `emSign ECC Root CA - G3`). pip ignores site-packages certifi: it trusts its own vendored certifi **and** the system store. Tested against the same host with certifi 2026.10.19 installed: pip 24.3.1 connects even with a patched system store; pip 26.2.2 rejects it when the system store (conda's `ca-certificates`, already 2026.10.19 on fresh builds) is patched. - **pip 26.2.2** in `docker/base-deps` and `docker/base-slim`. All downstream images (ray, ray-ml, ray-llm, ray-torch, base-extra) build on these two. - 3.11–3.14: `pip=26.2.2` is added to the existing `conda install python=...` call. - 3.10: conda-forge pip 26.2.2 builds require python>=3.11, but the PyPI release supports 3.10, so it is installed with `uv pip install --system pip==26.2.2` after the conda step. Tested in `condaforge/miniforge3:24.11.3-0`: pip 24.3.1 is replaced by 26.2.2 (vendored certifi 2026.10.19). The `menuinst` entry-point warning from conda 23.9 is pre-existing (#67256). - **certifi** 2026.10.19 in `requirements_compiled*.txt` and every lock file (113 files, certifi lines only). The image-related configs (`rayimg`, `ray_torch`, `release_gpu_cu130`, `release_ml_torchft_tests`, `release_multimodal_inference_benchmarks_tests`) were regenerated with raydepsets and uv 0.9.26 (the `WORKSPACE` version); the only package change is certifi. - **uv binary** 0.11.33 → 0.13.4 in the two base Dockerfiles. - CI tooling (pip-tools, Bazel's pip, CI Dockerfiles' uv, uv python package) stays in #67203. - runtime_env virtualenvs use virtualenv's bundled pip; virtualenv 21.14.12 (bundles pip 26.2.2) is a separate bump. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit 79dcc96) Signed-off-by: Sai Miduthuri <[email protected]>
Stacked on #67295 (base branch `elliot-barn/emudhra-image-fix`); retarget to `master` once #67295 merges. ## Why certifi 2026.10.19 is the fixed version for the eMudhra intermediate CA compromise (https://emudhra.we-have-a-problem.com/): it drops `emSign ECC Root CA - G3`, the root the compromised intermediates chain to. Python's `ssl` with certifi 2026.4.22 still trusts the disclosure site's test host; 2026.10.19 rejects it. #67295 already pins `certifi==2026.10.19` in `requirements_compiled.txt`, `requirements_compiled_py3.14.txt` and every lock file. This PR raises the **floors** in the input files those are compiled from, so no future recompile can resolve an affected certifi. ## What | File | Before | After | Compiled into | |---|---|---|---| | `python/requirements/security-requirements.txt` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `requirements_compiled*.txt` (`ci/ci.sh compile_pip_dependencies` / `_py314`) | | `python/requirements/cloud-requirements.txt` | `certifi>=2024.8.30` | `certifi>=2026.10.19` | `requirements_compiled*.txt` | | `release/requirements_py310.in` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `release/requirements_py310.txt` (`//release:requirements_py310`) | | `release/requirements_windows.in` | `certifi>=2025.1.31` | `certifi>=2026.10.19` | `python/deplocks/ci/ci_windows_depset.lock` (py3.8; certifi 2026.10.19 supports `>=3.7`) | Every compiled output already pins `certifi==2026.10.19` (from #67295), so no compiled or lock file changes. After this PR no certifi pin or floor under `python/`, `release/` or `ci/` is below 2026.10.19. ## Intentionally unchanged - `docker/base-deps` / `docker/base-slim` `certifi<2026` for Python 3.10: caps **conda's** certifi, because every conda-forge certifi build from 2026 requires Python >= 3.11 (#67256). The image's effective certifi is the PyPI 2026.10.19 the lock installs over it. - `doc/source/ray-overview/pip_freeze_ray-py310-cpu.txt` (`certifi==2026.4.22`): a record of a published image's `pip freeze`, regenerated by the release docs step. - `ci/ray_ci/windows/build_base.sh` already runs `conda update ... certifi` to the latest at build time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit aab6295) Signed-off-by: Sai Miduthuri <[email protected]>
…ry Python (#67350) ## Why #67256 capped conda's certifi at `<2026` for Python 3.10 in `docker/base-deps` and `docker/base-slim`, because every conda-forge certifi from 2026 on required `python>=3.11` and the 3.10 downgrade failed with `RemoveError`. That cap makes conda install **certifi 2025.11.12**, which still trusts the compromised eMudhra roots. The py3.10 images only end up patched because the lock install (`certifi==2026.10.19`) overwrites it afterwards. That leaves stale records behind in `rayproject/ray:nightly-py310-cpu`: - `conda-meta/certifi-2025.11.12-pyhd8ed1ab_0.json` - `pkgs/certifi-2025.11.12-.../certifi/cacert.pem` Scanners can flag those, and a later `conda` operation could re-link the old bundle. Since then, conda-forge has patched certifi **2026.10.19** to allow Python 3.10 (conda-forge/conda-forge-repodata-patches-feedstock@d7dcb640, 2026-10-21). It is the only patched build: 2026.10.18 and 2026.10.23 still require 3.11. ## What In both Dockerfiles, pin `certifi=2026.10.19` in the conda step for **every** Python version, matching the lock files. The lock install then finds conda's certifi already correct and leaves it alone, so `conda-meta` and the package cache match what is installed. ```bash CONDA_PIP_SPEC=("pip=26.2.2") if [[ "${PYTHON_VERSION}" == "3.10" ]]; then # conda-forge pip 26.2.2 requires python>=3.11; 3.10 installs it from PyPI below. CONDA_PIP_SPEC=() fi conda install -y ... "certifi=2026.10.19" "${CONDA_PIP_SPEC[@]}" ``` certifi is pinned inline for every version; the 3.10 branch is only about pip. conda-forge pip 26.2.2 still requires `python>=3.11`, with no repodata patch, so 3.10 keeps installing pip 26.2.2 from PyPI after the conda step, as before. ## Testing The test runs in `condaforge/miniforge3:24.11.3-0` (the Dockerfiles' Miniforge). For each Dockerfile, it extracts the edited spec block and `conda install` line, runs them, then runs the 3.10 PyPI pip step and the `certifi` line of that version's `ray_base_deps_py<ver>.lock` with `uv pip install --no-deps`. | | 3.10 | 3.11 | 3.12 | 3.13 | 3.14 | |---|---|---|---|---|---| | base-deps | ✅ | ✅ | ✅ | ✅ | ✅ | | base-slim | ✅ | ✅ | ✅ | ✅ | ✅ | Results for every cell: - `certifi` is 2026.10.19, and `conda-meta` has 2026.10.19. - The lock certifi install is a no-op ("Checked 1 package"). - `pip` is 26.2.2. - conda is 26.7.1 on 3.10 (previously 23.9.0 under the cap), 24.11.3 on 3.12 (unchanged), and 26.9.4 on 3.11/3.13/3.14. On 3.10, conda's pip record stays at 24.3.1 because pip still comes from PyPI there, which is unchanged. The four 3.10–3.12 runs that failed when all ten ran in parallel passed when rerun one at a time, so those failures came from the concurrent solves. This changes the base image inputs, so premerge rebuilds every base image from scratch, which also exercises the change on every Python version. Related: the 2.60 cherry-pick of #67256 (#67320) carries the old `certifi<2026` cap; this change should replace it there. ## Additional information Not a duplicate: open PRs touching certifi/conda are only the 2.60 cherry-picks (#67320, #67322, #67346). AI assistance (Claude Code) was used for this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 9a44846) Signed-off-by: Sai Miduthuri <[email protected]>
…e python to 3.10 (#67256) (#67320) Cherry-pick of #67256 (master commit dc5d25c) onto `releases/2.60.0`. ## Why On this branch, every Python 3.10 base image that misses the wanda cache fails to build. In postmerge build 20439, that was: - All 11 `ray-slim` py3.10 base images. - 3 aarch64 py3.10 CUDA base images. - `smoke test build-docker.sh`, which always builds `base-deps` from scratch. Each one fails in its `conda install python=3.10` step: ``` RemoveError: This operation will remove conda without replacing it with another version of conda. ``` conda-forge `certifi` builds uploaded since 2026-10-19 require `python>=3.11`, so the py3.10 solve drops `certifi`, `requests` and `conda`. #67256 caps `certifi<2026` for Python 3.10 only, in `docker/base-deps/Dockerfile` and `docker/base-slim/Dockerfile`. On master, the smoke test failed in postmerge builds 20426 and 20436. It has passed in every build since 20445, the first to include #67256. ## Cherry-pick details Applied cleanly with `git cherry-pick -x`. The change is identical to the master commit: the same 2 files, 19 insertions and 2 deletions, and the same `git patch-id --stable`. No prerequisite commits are missing. Both Dockerfiles on this branch were identical to #67256's parent, so after the pick they match master at dc5d25c. This PR is the bottom of stack #67354, in master's order. Above it are the picks of #67011 (#67321), #67295 (#67322), #67305 (#67342), #67301 (#67343), #67304 (#67344) and #67350 (#67352). #67011 and #67295 change base image inputs, so their image builds need this fix. At the top of the stack, the pick of #67350 replaces this cap with a `certifi=2026.10.19` pin, as on master. Not a duplicate: this branch doesn't contain #67256, and no PR against `releases/2.60.0` references it. ## Testing | Command | Result | |---|---| | `pre-commit run --files docker/base-deps/Dockerfile docker/base-slim/Dockerfile` | Passed (trailing whitespace, end of file, large files) | This PR changes the base image inputs, so CI rebuilds the base images, including the py3.10 ones, instead of taking them from the cache. I didn't build the images locally. AI assistance was used to prepare this cherry-pick. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Sai Miduthuri <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…26.110 (#67011) (#67321) Cherry-pick of #67011 (master commit bca4e8f) onto `releases/2.60.0`. ## Why The Ray images built from this branch install the `anyscale` CLI from the image lock files. Those locks pin `anyscale` 0.26.105, or 0.26.106 and 0.26.108 in the two `ray-torch` locks. #67011 raises the floor to `>=0.26.110` in `docker/base-extra/requirements.in` and `docker/base-slim/requirements.in`, and moves the 34 image and BYOD locks to 0.26.110. ## Cherry-pick details Applied cleanly with `git cherry-pick -x`. The change is identical to the master commit: - The same 36 files, 104 insertions and 104 deletions, and the same `git patch-id --stable`. - In every file, the added and removed lines are identical to the master commit. 28 of the lock files differ from master's elsewhere, in other packages, but `anyscale` is still the only pin that moves in each. - As on master, `ci_windows_depset.lock` keeps its own `anyscale` pin. This PR is stacked on the pick of #67256 (#67320). It changes the `base-slim` lock files, so CI rebuilds the `base-slim` images, and their py3.10 builds fail without #67256's conda fix. Not a duplicate: this branch doesn't contain #67011, and no PR against `releases/2.60.0` references it. ## Testing | Command | Result | |---|---| | `pre-commit run --files <the 36 changed files>` | Passed (trailing whitespace, end of file, large files) | I didn't run the dependency check locally. CI's `:tapioca: build: raydepsets: compile all dependencies` job runs `raydepsets build --all-configs --check` on this PR, which checks that the locks are consistent with this branch's requirements. AI assistance was used to prepare this cherry-pick. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Sai Miduthuri <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…n images for eMudhra CA compromise (#67295) (#67322) Cherry-pick of #67295 (master commit 79dcc96) onto `releases/2.60.0`. ## Why The private keys of eight eMudhra intermediate CAs were compromised, and images built from this branch still trust them. They ship pip 24.3.1, which trusts its own vendored `certifi`, and an older `certifi` pin in the lock files. #67295 changes three things: - It installs pip 26.2.2 in `docker/base-deps` and `docker/base-slim`. Python 3.10 gets pip from PyPI with `uv`, because conda-forge's pip 26.2.2 requires Python 3.11 or newer. - It moves the `uv` binary to 0.13.4. - It pins `certifi` 2026.10.19 in `requirements_compiled*.txt` and the lock files. #67295 has the full analysis. ## Cherry-pick details Applied with `git cherry-pick -x`. Git merged 112 of the 113 files without conflicts, and in those files the added and removed lines are identical to the master commit. "Deviations from #67295" below covers the other files. After the pick: - `docker/base-deps/Dockerfile` and `docker/base-slim/Dockerfile` match master at 79dcc96. - Every `certifi` pin in `python/deplocks/`, `python/requirements_compiled*.txt` and `release/ray_release/byod/` is 2026.10.19, as on master. This PR is stacked on the picks of #67256 (#67320) and #67011 (#67321). Its Dockerfile changes edit lines that #67256 adds, and #67011 sits below it to keep master's order. The picks of #67305 (#67342), #67301 (#67343), #67304 (#67344) and #67350 (#67352) sit on top of it. Not a duplicate: this branch doesn't contain #67295, and no PR against `releases/2.60.0` references it. ## Deviations from #67295 - **`python/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lock`:** this branch compiles that lock without the `requirements_compiled_py3.14.txt` constraint, so its `certifi` pin was 2026.5.20 rather than master's 2026.4.22, and its `# via` lines differ. This PR replaces its `certifi` entry with #67295's `certifi==2026.10.19` and hashes, and keeps the branch's `# via` lines. - **Left out `python/deplocks/docs/docstring_examples_base_depset_py3.10.lock` and `docstring_examples_depset_py3.10.lock`:** these depsets don't exist on this branch. ## Testing | Command | Result | |---|---| | `pre-commit run --files <the 113 changed files>` | Passed (trailing whitespace, end of file, large files) | I didn't run the dependency check or build the images locally. On this PR, CI's `:tapioca: build: raydepsets: compile all dependencies` job runs `raydepsets build --all-configs --check`, and the image jobs rebuild the base images with pip 26.2.2 and the new locks. AI assistance was used to prepare this cherry-pick. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Sai Miduthuri <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…a fix releases on every Python (#67350) (#67352) Cherry-pick of #67350 (master commit 9a44846) onto `releases/2.60.0`. ## Why #67256, picked in #67320 at the bottom of this stack, avoids the py3.10 `RemoveError` by capping conda's `certifi` at `<2026` for Python 3.10. With that cap, conda installs `certifi` 2025.11.12, which still trusts the compromised eMudhra roots. The py3.10 images end up patched only because the lock install overwrites it with `certifi` 2026.10.19, which leaves stale `conda-meta` and package-cache records behind. conda-forge has since patched `certifi` 2026.10.19 to allow Python 3.10. #67350 pins `certifi=2026.10.19` in the conda step for every Python version, matching the lock files, and removes the py3.10-only cap. pip 26.2.2 still comes from PyPI on Python 3.10. ## Cherry-pick details Applied cleanly with `git cherry-pick -x`. The change is identical to the master commit: the same 2 files, 20 insertions and 16 deletions, and the diff matches line for line. No prerequisite commits are missing. #67350 edits the conda block that #67256 added and #67295 extended. Below this PR, the picks of #67256 (#67320) and #67295 (#67322) leave both Dockerfiles identical to #67350's parent. After this pick they match master at 9a44846. This PR is the top of stack #67354. It was merged to master after every other PR in the stack, so it goes last here too. Below it are the picks of: - #67256 (#67320) - #67011 (#67321) - #67295 (#67322) - #67305 (#67342) - #67301 (#67343) - #67304 (#67344) Not a duplicate: this branch doesn't contain #67350, and no other PR against `releases/2.60.0` picks it. ## Testing | Command | Result | |---|---| | `pre-commit run --files docker/base-deps/Dockerfile docker/base-slim/Dockerfile` | Passed (trailing whitespace, end of file, large files) | I didn't build the images locally. This PR changes the base image inputs, so CI rebuilds the base images, including the py3.10 ones. #67350's own test ran the same conda step in `condaforge/miniforge3:24.11.3-0` for Python 3.10 to 3.14 in both Dockerfiles. AI assistance was used to prepare this cherry-pick. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Sai Miduthuri <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
… base-deps and base-slim (CVE-2026-111497) (#67596) (#67997) ## Description Cherry-pick of #67596 (master commit ed39c78) onto `releases/2.60.1`. **Top of a 2-PR stack on `releases/2.60.1`, above #67998 (the #67789 pick).** Merge the stack with `gh stack merge 67997`, which lands #67998 first. This PR needs #67998's lock files. Several images built on these bases install locks with pip: the py3.10 `ray`, `ray-gpu` and `ray-ml` test and release images, and `ray-llm` on 3.11 and 3.12. Without #67998, those locks still pin `brotli==1.2.0`. Installing them downgrades 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. The #67789 pick, #67998, covers the pip-side brotli pins in the compiled requirements and lock files. ## Related issues Related to #67596. Depends on #67998, the #67789 pick. Advisory: GHSA-9v8h-qqgm-4m35 / CVE-2026-111497. ## Additional information ### Cherry-pick details Applied cleanly with `git cherry-pick -x`. It has the same 2 files, +20/-2, and the same `git patch-id --stable` as the master commit. Rebasing it onto #67998 changed neither of those. No prerequisite commits are missing. Three master commits touched these Dockerfiles between the branch cut and #67596: #67256, #67295 and #67350. This branch already has them through the picks #67320, #67322 and #67352. After the pick, both Dockerfiles are identical to master at ed39c78. Not a duplicate: this branch doesn't contain #67596, and no PR against `releases/2.60.1` references it. #67962 picks the same commit onto `releases/2.58.2`. ### 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 #67998 | 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]>
Why
Any py3.10 base image built without a cache hit currently fails:
docker/base-depsanddocker/base-sliminstall Miniforge 24.11.3, which ships Python 3.12, and then runconda install python=3.10. conda-forgecertifibuilds uploaded from 2026-10-19 on requirepython >=3.11. That includes 2026.10.18, 2026.10.19 and a re-upload of 2026.7.22. With no certifi left that supports 3.10, the solver dropscertifi,requestsandconda, and conda refuses the transaction.Cached images still pass, so this only shows up on a cache miss:
ray-py3.10-cu13.3.1-cudnn-basein [ci] Build and publish cu133 (CUDA 13.3.1) images + hello_world release test #66547 (premerge build 75291).smoke test build-docker.sh, which always builds base-deps from scratch. It has failed on master postmerge since build 20426 (2026-10-21 16:05 UTC); build 20420 earlier that day passed.Change
Add
certifi<2026to theconda install python=...call in both Dockerfiles, for Python 3.10 only. Other Python versions are unchanged and keep the latest certifi.With the cap, the py3.10 solve settles on certifi 2025.11.12 and conda 23.9.0. That conda version is the newest the solver can pair with Python 3.10 under the cap. Pinning
conda>=24.11as well made the libmamba solver segfault locally. Python packages that Ray installs with pip/uv afterwards are unaffected; they come from the lock files.Duplicate check
I searched open PRs for
certifiandconda. #67203 bumps pip's certifi pin, which is unrelated (and closed); nothing else touches this.Testing
Locally, in
condaforge/miniforge3:24.11.3-0(the same Miniforge as the Dockerfiles), I ran the exact install and clean commands from each Dockerfile:RemoveErrorabove.This PR changes the base image inputs, so premerge rebuilds every base image from scratch, which also exercises the change on every Python version.
AI assistance (Claude Code) was used to investigate and write this change.
🤖 Generated with Claude Code