Repository navigation
[ci][deps] Downgrade protobuf to 5.27.5 without the unrelated lock drift - #66119
Conversation
Signed-off-by: Jeffrey Wang <[email protected]>
Signed-off-by: Jeffrey Wang <[email protected]>
Signed-off-by: Jeffrey Wang <[email protected]> # Conflicts: # python/deplocks/base_extra_testdeps/ray-ml-base_extra_testdeps_py3.10.lock
…e locks
Narrow the protobuf 4.25.8 compatibility set (protobuf, OpenTelemetry 1.27,
grpcio-tools/status 1.62.3, TensorFlow 2.19, NumPy 2.1.3, torchft-nightly)
from `python_version < '3.13'` to `python_version < '3.12'`.
Python 3.12 cannot take the pin: the py3.12 rayllm depsets resolve
vllm==0.26.0, which requires protobuf>=5.29.6, so
`ci/compile_llm_requirements.sh` fails to resolve
`rayllm_test_py312_{cpu,cu130}` with protobuf pinned to 4.25.8. All Serve
release tests that exercise the regression (including
pytest_serve_throughput_optimized_microbenchmarks) run on Python 3.10, so
the fix is unaffected by the narrower scope.
requirements_compiled.txt is regenerated under Python 3.11, matching the
interpreter CI uses; the previous revision of this branch was compiled
under 3.12, which silently dropped uvloop/pymars and emitted an unmarked
array-record==0.8.3 that made ml-build-ci_depset_py3.10 unresolvable.
Validation:
- ./ci/ci.sh compile_pip_dependencies (Python 3.11)
- ./ci/compile_llm_requirements.sh
- bazel run //ci/raydepsets:raydepsets -- build --all-configs
all exit 0.
Signed-off-by: Jeffrey Wang <[email protected]>
Signed-off-by: Jeffrey Wang <[email protected]>
…t-free #65216 regenerates every lock file from a branch cut off an older master, so 15 packages unrelated to protobuf move with it -- click (80 files), packaging (78), py-spy (51), wandb (18), the four opentelemetry packages, aiofiles, more-itertools, restrictedpython, serpent, etils, cmake and databricks-sdk on py3.12+. Four of those are downgrades against master (packaging 26.1->25.0, wandb 0.26.0->0.24.2, databricks-sdk and the google-cloud trio aside). The first commit on that branch already carries every one of these values, and master is then merged in twice with the branch's side of the lock files kept. Reset every generated artifact -- requirements_compiled.txt, python/deplocks and release/ray_release/byod -- to master, then regenerated on top of the protobuf pins alone. pip-compile and uv both reuse the versions already in their output file unless a constraint forces otherwise, so starting from master's locks confines the diff to what protobuf 5.27.5 actually requires. packages changed 40 -> 21 files changed 92 -> 73 What remains is the protobuf chain only: the hand-pinned tensorflow 2.19.1 / tensorboard 2.19.0 / tf-keras 2.19.0 / numpy 2.1.3 / databricks-sdk 0.72.0 / grpcio-{tools,status} 1.71.2, the four google-cloud packages that declare protobuf>=6.33.5, and the collateral of the TF downgrade (tensorflow-io-gcs- filesystem appearing, pillow leaving via tensorboard, the tfds chain dropping out of the Windows py3.10 locks). Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
|
Note The number of changes in this pull request is too large for Gemini Code Assist to generate a review. |
|
Running serve release test to make sure this fixes the latency regression: https://buildkite.com/ray-project/release/builds/106883/canvas?sid=01a092ec-6a63-4617-a1eb-6c10b910f1cf&open=false. |
jeffreywang88
left a comment
There was a problem hiding this comment.
@elliot-barn Please make sure the changes in python/requirements/test-requirements.txt, python/requirements/ml/dl-cpu-requirements.txt, and python/requirements/ml/dl-gpu-requirements.txt look good to you, especially the split in behavior for python <3.12 vs. >=3.12. Will approve once I confirm that this resolves serve release test's latency regression.
LGTM and the release tests pass |
|
Hmm, the improvement isn't quite what I expected. Let me run the release test again to verify that it isn't resulted from test noise: second attempt. Throughput optimized results
HAProxy resultsHAProxy's results (11.42 ms) seem fine.
|
|
Second attempt:
Both align with expectation. |
jeffreywang88
left a comment
There was a problem hiding this comment.
Thanks for trimming down the drifts!
…the unrelated lock drift (#66119) (#66152) Cherry-pick of #66119 (master commit 3f785c0) onto releases/2.59.0. One conflict resolved: the original commit also touched `python/deplocks/ray-torch/ray-torch-cu128_base_py3.11.lock`, which does not exist on this branch (only the py3.14 ray-torch lock is present) — dropped that file from the pick, same resolution as #65988. All other 72 lock/requirements files applied cleanly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Jeffrey Wang <[email protected]> Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Jeffrey Wang <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Add `grpcio-reflection` as a default Serve dependency: the `serve` extra in setup.py (mirrored in python/requirements.txt), pinned in test-requirements.txt alongside grpcio-tools and grpcio-status, mirrored into the compiled constraints, and the lock files regenerated with `raydepsets build --all-configs` (`--check` passes). This is the dependency half of ray-project#65854 (gRPC server reflection on the Serve gRPC proxy), split out so the lock regeneration reviews on its own. grpcio-reflection tracks grpcio, so it takes the same three-way pin that ray-project#66119 gave grpcio-tools and grpcio-status: 1.71.2 below Python 3.12 (1.72+ requires protobuf>=6.30, incompatible with the protobuf 5.27.5 pin on that track), 1.75.0 on 3.12-3.13, and 1.76.0 on 3.14. No lock moves protobuf or grpcio. Lock changes: every lock that installs the serve extra gains exactly one grpcio-reflection line, matched to its existing grpcio pin. The two `expand` depsets with no constraints file (tests/data/datatfds_py3.12, byod/audio_transcription_py3.10) resolve the newest grpcio-reflection (1.83.1) and follow it to grpcio 1.83.1, protobuf 7.36.1, and newer google-cloud/opentelemetry pins; this is inherent to unconstrained expand depsets and matches the pre-rebase version of this change. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Qisheng He <[email protected]>
## Why Prerequisite for #65854, which adds gRPC server reflection to Serve's gRPC proxy. Reviewers there asked for `grpcio-reflection` to be a default Serve dependency rather than an optional install, and for the lock regeneration to be reviewed on its own, so the dependency change is split out here. ## What - `grpcio-reflection` added to the `serve` extra in `setup.py`, mirrored in `python/requirements.txt` (same shape as the `jinja2` addition in #65542). - Pinned in `test-requirements.txt` next to `grpcio-tools` / `grpcio-status`, with the same three-way split #66119 gave those two: **1.71.2 on py<3.12**, 1.75.0 on py3.12–3.13, 1.76.0 on py3.14. grpcio-reflection ≥ 1.72 requires protobuf ≥ 6.30, so 1.71.2 is the newest release compatible with the protobuf 5.27.5 pin on the py<3.12 track. Mirrored into `requirements_compiled.txt` (py<3.12 branch, as pip-compile emits it) and `requirements_compiled_py3.14.txt`. - Lock files regenerated with `bazelisk run //ci/raydepsets:raydepsets -- build --all-configs`; `--check` passes locally. No code changes. The feature that uses the package lands in #65854. **Rebased on 2026-09-14 after #66119 landed.** Master now pins protobuf 5.27.5 on py<3.12, which is exactly the constraint the earlier `py310_protobuf_overrides.txt` / `--override` mechanism was working around, so that mechanism is gone: no override file, no depset config edits. The branch is a single commit again. ## Lock changes vs master - 92 locks gain exactly one `grpcio-reflection` line, matched to the grpcio already pinned in that lock (1.71.2, 1.75.0, 1.76.0, or 1.78.0/1.80.0/1.62.3 in the few locks on a different grpcio). **No lock moves protobuf or grpcio.** - **Two `expand` depsets with no constraints file** (`tests/data/datatfds_py3.12`, `byod/audio_transcription_py3.10`) resolve the newest grpcio-reflection (1.83.1) and follow it to grpcio 1.83.1, protobuf 7.36.1, and newer google-cloud/opentelemetry pins. Same as before the rebase: a pre-existing gap in those depset definitions; happy to add a constraints file to them if preferred. ## Tests - `bazelisk run //ci/raydepsets:raydepsets -- build --all-configs` then `--check`: "Lock files are up to date." - `pre-commit run --files` on the edited source and compiled files: passed. - The `pip-compile dependencies` CI job validates the hand-added `requirements_compiled*.txt` entries. AI assistance was used for this PR; every changed line was reviewed and all checks were run by the submitter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Qisheng He <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
…ift (ray-project#66119) ## Why Alternative to ray-project#65216. Same protobuf pin, same hand-edited requirements, but the regenerated locks no longer carry dependency churn that has nothing to do with protobuf. ray-project#65216 moves **15 packages unrelated to protobuf**: | package | master | ray-project#65216 | locks | |---|---|---|---| | `click` | 8.3.2 | 8.4.2 | 80 | | `packaging` | 26.1 | **25.0** ⬇ | 78 | | `py-spy` | 0.4.1 | 0.4.2 | 51 | | `wandb` | 0.26.0 | **0.24.2** ⬇ | 18 | | `databricks-sdk` (py3.12+) | 0.103.0 | 0.123.0 | 6 | | `opentelemetry-{api,sdk,semantic-conventions,exporter-prometheus}` | 1.38–1.41 / 0.59b0–0.62b1 | 1.44.0 / 0.65b0 | 7 each | | `aiofiles`, `more-itertools`, `restrictedpython`, `serpent`, `etils`, `cmake` | — | — | 2–9 each | None of these are required by protobuf 5.27.5. They are fossils of the branch's **first** commit (`17a586bc08`), which pinned `protobuf==4.25.8; python_version < '3.13'` — protobuf 4.x across nearly every supported Python. That re-resolved a large slice of the graph at once: ``` package base (= today's master) after the 4.25.8 commit click 8.3.2 8.4.2 packaging 26.1 25.0 wandb 0.26.0 0.24.2 opentelemetry-api 1.39.0 1.27.0 aiofiles, more-itertools, restrictedpython, serpent present -> dropped ``` The pin was later relaxed to `5.27.5; python_version < '3.12'`, but pip-compile only re-resolves a package when its pin becomes *invalid* — and 8.4.2 / 25.0 / 0.24.2 all still satisfy the relaxed graph. So they stayed exactly where protobuf 4.x had put them. Verified: recompiling with the same requirements inputs and the same 5.27.5 pins returns master's values (`packaging` 26.1, `wandb` 0.26.0, `click` 8.3.2, `py-spy` 0.4.1), and `click==8.4.2` also resolves cleanly against master — nothing caps any of them. ## What changed here Reset every generated artifact — `requirements_compiled.txt`, `python/deplocks/`, `release/ray_release/byod/` — to master, then regenerated on top of the protobuf pins alone: ``` ci/ci.sh compile_pip_dependencies # py3.11, pip<25 for pip-tools 7.4.1 bazel run //ci/raydepsets:raydepsets -- build --all-configs ``` Both `pip-compile` and `uv` reuse the versions already in their output file unless a constraint forces otherwise, so starting from master's locks confines the diff to what protobuf 5.27.5 actually requires. | | ray-project#65216 | this PR | |---|---|---| | packages changed | 40 | **21** | | files changed | 92 | **73** | | `requirements_compiled.txt` | 128 lines | **26 lines** | ## What remains Only the protobuf chain: - **Hand-pinned** (py<3.12): `tensorflow` 2.19.1, `tensorflow-macos` 2.19.1, `tensorboard` 2.19.0, `tf-keras` 2.19.0, `numpy` 2.1.3, `databricks-sdk` 0.72.0, `grpcio-tools`/`grpcio-status` 1.71.2, `tensorflow-datasets` dropped on Windows - **Forced transitively** — each declares `protobuf>=6.33.5`: `google-cloud-compute` 1.48.0, `google-cloud-filestore` 1.17.0, `google-cloud-secret-manager` 2.29.0, `grpc-google-iam-v1` 0.14.4 - **Collateral of the TF downgrade**: `tensorflow-io-gcs-filesystem` appears (a hard dep of TF 2.19.1 on py<3.12; TF 2.20 moved it behind an extra), `pillow` leaves (it entered via tensorboard 2.20), and the tfds chain (`array-record`, `promise`, `toml`, `tensorflow-metadata`) leaves the Windows py3.10 locks ## Notes for review 1. **The py3.12+ protobuf pin does not reach the constraints file.** `requirements_compiled.txt` is a py3.11 resolution, so `protobuf==6.33.6; python_version >= '3.12'` is dropped and the only line left is `protobuf==5.27.5 ; python_version < "3.12"`. Master had `>= "3.11"`, which did apply. The py3.12/3.13 locks still hold 6.33.6, but nothing pins it any more. Same in ray-project#65216 — inherent to the marker choice. 2. **The numpy cap leaks into shipped images.** `ray_base_deps` is a `subset` of `ray_base_extra_testdeps` (`rayimg.depsets.yaml:226`), so py3.10/3.11 base images get numpy 2.1.3 to satisfy a TensorFlow constraint they do not contain. Worth scoping to the TF-bearing ML depsets instead. (TF 2.19.1's `numpy<2.2.0` is a test-matrix cap, not an ABI break — TF 2.19.1 + numpy 2.2.6 passes dtype bridge, ml_dtypes bfloat16, dlpack, `tf.experimental.numpy`, Keras fit/save and `tf.data` — but the resolver still hard-fails on the pair, and pip-compile has no `--override`, so keeping 2.2.6 would mean changing how `requirements_compiled.txt` is generated.) 3. **Master's lock set is not self-consistent.** Across 109 lock files the same package on the same Python version sits at different versions in different files (`packaging` on py3.10 is 25.0, 26.0 *and* 26.1). That is why the `keras`/`scipy`/`networkx` reconciliation in ray-project#65216 is not reproduced here — those locks still disagree with the pins master already declares. Worth one convergence pass on its own PR rather than inside a protobuf fix. 4. **Worth a guard.** `requirements_compiled.txt` is a single propagation point to all 109 locks, and CI only checks that it is up to date — nothing flags a pin moving *backward* against master. A transient pin during development ratchets values in permanently, which is exactly what happened here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Jeffrey Wang <[email protected]> Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Jeffrey Wang <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
## Why Prerequisite for ray-project#65854, which adds gRPC server reflection to Serve's gRPC proxy. Reviewers there asked for `grpcio-reflection` to be a default Serve dependency rather than an optional install, and for the lock regeneration to be reviewed on its own, so the dependency change is split out here. ## What - `grpcio-reflection` added to the `serve` extra in `setup.py`, mirrored in `python/requirements.txt` (same shape as the `jinja2` addition in ray-project#65542). - Pinned in `test-requirements.txt` next to `grpcio-tools` / `grpcio-status`, with the same three-way split ray-project#66119 gave those two: **1.71.2 on py<3.12**, 1.75.0 on py3.12–3.13, 1.76.0 on py3.14. grpcio-reflection ≥ 1.72 requires protobuf ≥ 6.30, so 1.71.2 is the newest release compatible with the protobuf 5.27.5 pin on the py<3.12 track. Mirrored into `requirements_compiled.txt` (py<3.12 branch, as pip-compile emits it) and `requirements_compiled_py3.14.txt`. - Lock files regenerated with `bazelisk run //ci/raydepsets:raydepsets -- build --all-configs`; `--check` passes locally. No code changes. The feature that uses the package lands in ray-project#65854. **Rebased on 2026-09-14 after ray-project#66119 landed.** Master now pins protobuf 5.27.5 on py<3.12, which is exactly the constraint the earlier `py310_protobuf_overrides.txt` / `--override` mechanism was working around, so that mechanism is gone: no override file, no depset config edits. The branch is a single commit again. ## Lock changes vs master - 92 locks gain exactly one `grpcio-reflection` line, matched to the grpcio already pinned in that lock (1.71.2, 1.75.0, 1.76.0, or 1.78.0/1.80.0/1.62.3 in the few locks on a different grpcio). **No lock moves protobuf or grpcio.** - **Two `expand` depsets with no constraints file** (`tests/data/datatfds_py3.12`, `byod/audio_transcription_py3.10`) resolve the newest grpcio-reflection (1.83.1) and follow it to grpcio 1.83.1, protobuf 7.36.1, and newer google-cloud/opentelemetry pins. Same as before the rebase: a pre-existing gap in those depset definitions; happy to add a constraints file to them if preferred. ## Tests - `bazelisk run //ci/raydepsets:raydepsets -- build --all-configs` then `--check`: "Lock files are up to date." - `pre-commit run --files` on the edited source and compiled files: passed. - The `pip-compile dependencies` CI job validates the hand-added `requirements_compiled*.txt` entries. AI assistance was used for this PR; every changed line was reviewed and all checks were run by the submitter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Qisheng He <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>


Why
Alternative to #65216. Same protobuf pin, same hand-edited requirements, but the regenerated
locks no longer carry dependency churn that has nothing to do with protobuf.
#65216 moves 15 packages unrelated to protobuf:
clickpackagingpy-spywandbdatabricks-sdk(py3.12+)opentelemetry-{api,sdk,semantic-conventions,exporter-prometheus}aiofiles,more-itertools,restrictedpython,serpent,etils,cmakeNone of these are required by protobuf 5.27.5. They are fossils of the branch's first commit
(
17a586bc08), which pinnedprotobuf==4.25.8; python_version < '3.13'— protobuf 4.x across nearlyevery supported Python. That re-resolved a large slice of the graph at once:
The pin was later relaxed to
5.27.5; python_version < '3.12', but pip-compile only re-resolves apackage when its pin becomes invalid — and 8.4.2 / 25.0 / 0.24.2 all still satisfy the relaxed graph.
So they stayed exactly where protobuf 4.x had put them. Verified: recompiling with the same requirements
inputs and the same 5.27.5 pins returns master's values (
packaging26.1,wandb0.26.0,click8.3.2,py-spy0.4.1), andclick==8.4.2also resolves cleanly against master — nothing caps any of them.What changed here
Reset every generated artifact —
requirements_compiled.txt,python/deplocks/,release/ray_release/byod/— to master, then regenerated on top of the protobuf pins alone:Both
pip-compileanduvreuse the versions already in their output file unless a constraint forcesotherwise, so starting from master's locks confines the diff to what protobuf 5.27.5 actually requires.
requirements_compiled.txtWhat remains
Only the protobuf chain:
tensorflow2.19.1,tensorflow-macos2.19.1,tensorboard2.19.0,tf-keras2.19.0,numpy2.1.3,databricks-sdk0.72.0,grpcio-tools/grpcio-status1.71.2,tensorflow-datasetsdropped on Windowsprotobuf>=6.33.5:google-cloud-compute1.48.0,google-cloud-filestore1.17.0,google-cloud-secret-manager2.29.0,grpc-google-iam-v10.14.4tensorflow-io-gcs-filesystemappears (a hard dep of TF 2.19.1on py<3.12; TF 2.20 moved it behind an extra),
pillowleaves (it entered via tensorboard 2.20),and the tfds chain (
array-record,promise,toml,tensorflow-metadata) leaves the Windowspy3.10 locks
Notes for review
requirements_compiled.txtis apy3.11 resolution, so
protobuf==6.33.6; python_version >= '3.12'is dropped and the only line leftis
protobuf==5.27.5 ; python_version < "3.12". Master had>= "3.11", which did apply. The py3.12/3.13locks still hold 6.33.6, but nothing pins it any more. Same in [ci][deps] Downgrade protobuf from 6.33.6 to 5.27.5 to resolve serve's latency regression #65216 — inherent to the marker choice.
ray_base_depsis asubsetofray_base_extra_testdeps(
rayimg.depsets.yaml:226), so py3.10/3.11 base images get numpy 2.1.3 to satisfy a TensorFlowconstraint they do not contain. Worth scoping to the TF-bearing ML depsets instead.
(TF 2.19.1's
numpy<2.2.0is a test-matrix cap, not an ABI break — TF 2.19.1 + numpy 2.2.6 passesdtype bridge, ml_dtypes bfloat16, dlpack,
tf.experimental.numpy, Keras fit/save andtf.data—but the resolver still hard-fails on the pair, and pip-compile has no
--override, so keeping 2.2.6would mean changing how
requirements_compiled.txtis generated.)Python version sits at different versions in different files (
packagingon py3.10 is 25.0, 26.0and 26.1). That is why the
keras/scipy/networkxreconciliation in [ci][deps] Downgrade protobuf from 6.33.6 to 5.27.5 to resolve serve's latency regression #65216 is not reproducedhere — those locks still disagree with the pins master already declares. Worth one convergence pass
on its own PR rather than inside a protobuf fix.
requirements_compiled.txtis a single propagation point to all 109 locks, and CIonly checks that it is up to date — nothing flags a pin moving backward against master. A transient
pin during development ratchets values in permanently, which is exactly what happened here.
🤖 Generated with Claude Code