Repository navigation
[cherry-pick][2.59.0][ci][deps] Downgrade protobuf to 5.27.5 without the unrelated lock drift (#66119) - #66152
Merged
Merged
Conversation
…ift (#66119) 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. | package | master | #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. 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. | | #65216 | this PR | |---|---|---| | packages changed | 40 | **21** | | files changed | 92 | **73** | | `requirements_compiled.txt` | 128 lines | **26 lines** | 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 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 #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 #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]> (cherry picked from commit 3f785c0) Signed-off-by: elliot-barn <[email protected]>
elliot-barn
requested review from
a team,
matthewdeng and
richardliaw
as code owners
September 14, 2026 04:25
Contributor
|
Note The number of changes in this pull request is too large for Gemini Code Assist to generate a review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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