Skip to content

[cherry-pick][2.58.0][ci] Install data CI depset after conda ffmpeg to fix removed packages (#65334) - #65341

Merged
elliot-barn merged 1 commit into
releases/2.58.0from
elliot-barn/cherry-pick-2.58.0-data-depset-conda-ffmpeg-65334
Aug 10, 2026
Merged

elliot-barn merged 1 commit into
releases/2.58.0from
elliot-barn/cherry-pick-2.58.0-data-depset-conda-ffmpeg-65334

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

Cherry-pick of #65334 (master commit 4283d39) onto releases/2.58.0.

Why are these changes needed?

Same as #65334: data17build-py3.10-based CI jobs (data arrow v17 shards, docs example, integration, dashboard) fail with ModuleNotFoundError: No module named 'exceptiongroup' because the conda ffmpeg install step removes packages from the data CI depset. The release branch carries the same Dockerfile ordering, so its data CI is subject to the same breakage — this keeps 2.58.0 release CI green.

Notes

🤖 Generated with Claude Code

#65334)

## Why are these changes needed?

All `data17build-py3.10`-based CI jobs (data arrow v17 shards, docs
example, integration, dashboard) are currently red on master and
premerge with:

```
import pytest → from exceptiongroup import BaseExceptionGroup
ModuleNotFoundError: No module named 'exceptiongroup'
```

e.g. master postmerge [build
19099](https://buildkite.com/ray-project/postmerge/builds/19099) and
premerge [build
71680](https://buildkite.com/ray-project/premerge/builds/71680).

Root cause: in `ci/docker/data.build.Dockerfile`, the depset lock is
installed **before** `conda install -y -c conda-forge "ffmpeg=7.*"`.
With the current `oss-ci-base_ml` base image (which ships conda 26.7.0),
the ffmpeg solve upgrades core native libs (libmamba 2.0.8 → 2.9.0,
libarchive, libcurl, fmt), and since no conda 26.x py3.10 build is
compatible with that upgraded stack, the solver **downgrades conda
26.7.0 → 23.9.0 and removes conda 26's entire python dependency tree** —
including `exceptiongroup`, `jinja2`, `markupsafe`, `httpx` and
`typing-inspection` (visible under "The following packages will be
REMOVED" in the wanda `data17build-py3.10` job log). `exceptiongroup` is
a hard runtime dep of pytest on Python < 3.11, so every pytest target
import-fails.

Fix: move the `uv pip install -r python_depset.lock` step (and the
pyarrow-nightly override) **after** the conda ffmpeg step, so uv
restores everything the lock declares. All five data depset locks
contain the removed packages (`exceptiongroup` with a
`python_full_version < '3.11'` marker, so py3.12 images are unaffected
by design).

Not a duplicate: searched open PRs for `exceptiongroup`, `ffmpeg conda`,
and data image/depset changes — no existing PR addresses this.

## Related issue number

N/A — master CI breakage, no issue filed.

## Checks

- Verification: this is a CI image build-order change; validated by
triaging the wanda `data17build-py3.10` build logs (conda removal
transaction) and confirming the removed packages are present in all
`python/deplocks/ci/data-*` locks. The premerge data jobs on this PR
rebuild the image and are the end-to-end test.
- `pre-commit` hooks ran and passed on commit.
- AI assistance (Claude Code) was used for triage and this change;
reviewed line-by-line by the submitter.

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

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
(cherry picked from commit 4283d39)
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn requested a review from a team as a code owner August 10, 2026 20:20

@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 reorders the Dockerfile steps to install Python dependencies after installing ffmpeg via conda, using the '--reinstall' flag to restore any packages modified by conda. The reviewer suggests a more efficient approach: using the '--freeze-installed' flag during the conda installation of ffmpeg to prevent it from modifying Python packages, which would eliminate the need for the costly '--reinstall' step.

# (conda create -n ffmpeg) and point ld.so.conf at that env's lib dir, so the
# solve cannot touch base site-packages at all; then this --reinstall and the
# ordering constraint can go away.
uv pip install -r /home/ray/python_depset.lock --no-deps --system --reinstall --index-strategy unsafe-best-match

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 --reinstall on the entire lockfile (python_depset.lock) forces uv to reinstall every single package listed in the lock, including heavy ML libraries (like PyTorch, TensorFlow, etc.) that are already pre-installed in the base image (oss-ci-base_ml-py3.10). This can significantly increase the Docker build time and cache size.

Instead of forcing a full reinstallation, we can prevent conda from modifying or deleting any existing Python packages in the first place by using the --freeze-installed (or --no-update-deps) flag during the conda install step:

conda install -y -c conda-forge "ffmpeg=7.*" --freeze-installed

Since ffmpeg is a C library and does not have Python dependencies, freezing the installed packages will allow conda to install ffmpeg and its C dependencies without touching any of the Python packages or triggering the stale conda-meta cleanup. This eliminates the need for --reinstall entirely, keeping the uv pip install step extremely fast.

uv pip install -r /home/ray/python_depset.lock --no-deps --system --index-strategy unsafe-best-match

@elliot-barn
elliot-barn merged commit a611282 into releases/2.58.0 Aug 10, 2026
4 of 5 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn/cherry-pick-2.58.0-data-depset-conda-ffmpeg-65334 branch August 10, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant