Regenerate beam container image dependencies to include newer version of grpc. #37822
Regenerate beam container image dependencies to include newer version of grpc. #37822tvalentyn wants to merge 5 commits intoapache:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request aims to streamline and simplify the dependency management for gRPC-related packages within the Python SDK. It unifies Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
2679417 to
57f1532
Compare
78bdb41 to
2ac1a2f
Compare
sdks/python/setup.py
Outdated
| # hard requirement in setup.py. | ||
| 'dill', | ||
| 'tensorflow-transform', | ||
| 'protobuf<4; python_version<"3.11"', |
There was a problem hiding this comment.
Note: without this change,
beam_PreCommit_Yaml_Xlang_Direct suite failed to resolve dependencies. Looking at successful logs (https://github.com/apache/beam/actions/runs/23049196161/job/66945823677) the suite already installed protobuf 3:
2026-03-13T11:58:14.2393149Z Successfully installed absl-py-1.4.0 annotated-doc-0.0.4 apache-beam-2.73.0.dev0 astunparse-1.6.3 click-8.3.1 coloredlogs-15.0.1 contourpy-1.3.2 cuda-bindings-12.9.4 cuda-pathfinder-1.4.2 cycler-0.12.1 datatable-1.1.0 dill-0.4.1 embeddings-0.0.8 flatbuffers-25.12.19 fonttools-4.62.0 fsspec-2026.2.0 gast-0.7.0 google-api-core-2.29.0 google-api-python-client-1.12.11 google_pasta-0.2.0 grpcio-status-1.49.0rc1 h5py-3.16.0 hf-xet-1.4.2 huggingface-hub-1.7.1 humanfriendly-10.0 js2py-0.74 jsonpatch-1.33 jsonpointer-3.0.0 jsonschema-4.26.0 jsonschema-specifications-2025.9.1 keras-3.12.1 kiwisolver-1.5.0 langchain-1.2.12 langchain-core-1.2.18 langgraph-1.1.2 langgraph-checkpoint-4.0.1 langgraph-prebuilt-1.0.8 langgraph-sdk-0.3.11 langsmith-0.7.17 libclang-18.1.1 llvmlite-0.46.0 markdown-3.10.2 markdown-it-py-4.0.0 matplotlib-3.10.8 mdurl-0.1.2 ml-dtypes-0.3.2 mpmath-1.3.0 namex-0.1.0 networkx-3.4.2 numba-0.64.0 numpy-1.26.4 nvidia-cublas-cu12-12.8.4.1 nvidia-cuda-cupti-cu12-12.8.90 nvidia-cuda-nvrtc-cu12-12.8.93 nvidia-cuda-runtime-cu12-12.8.90 nvidia-cudnn-cu12-9.10.2.21 nvidia-cufft-cu12-11.3.3.83 nvidia-cufile-cu12-1.13.1.3 nvidia-curand-cu12-10.3.9.90 nvidia-cusolver-cu12-11.7.3.90 nvidia-cusparse-cu12-12.5.8.93 nvidia-cusparselt-cu12-0.7.1 nvidia-nccl-cu12-2.27.5 nvidia-nvjitlink-cu12-12.8.93 nvidia-nvshmem-cu12-3.4.5 nvidia-nvtx-cu12-12.8.90 onnx-1.17.0 onnxruntime-1.23.2 opt_einsum-3.4.0 optree-0.19.0 ormsgpack-1.12.2 pandas-1.5.3 protobuf-3.20.3 pyarrow-10.0.1 pydot-1.4.2 pyjsparser-2.7.1 pyod-2.0.7 referencing-0.37.0 requests-toolbelt-1.0.0 rich-14.3.3 rpds-py-0.30.0 safetensors-0.7.0 sentence-transformers-5.3.0 shellingham-1.5.4 skl2onnx-1.20.0 sympy-1.14.0 tensorboard-2.16.2 tensorboard-data-server-0.7.2 tensorflow-2.16.2 tensorflow-hub-0.16.1 tensorflow-io-gcs-filesystem-0.37.1 tensorflow-metadata-1.16.1 tensorflow-serving-api-2.16.1 tensorflow-transform-1.16.0 termcolor-3.3.0 tf-keras-2.16.0 tf2onnx-1.17.0 tfx-bsl-1.16.1 tokenizers-0.22.2 torch-2.10.0 tqdm-4.67.3 transformers-5.3.0 triton-3.6.0 typer-0.24.1 tzlocal-5.3.1 uritemplate-3.0.1 uuid-utils-0.14.1 werkzeug-3.1.6 wheel-0.46.3 xxhash-3.6.0
2026-03-13T11:58:22.8382660Z
2026-03-13T11:58:22.8383507Z > Task :sdks:python:yamlIntegrationTests
There was a problem hiding this comment.
Yaml suite now fails with a different error. It might be that stubs built with protobuf 6 are not compatible with protobuf 3.
We might have to figure out what in tftransform & friends requires downgrading protobuf...
There was a problem hiding this comment.
TFT still doesn't support protobuf 6: https://github.com/tensorflow/transform/blob/339b0cba4ab6e511c47ba20d576d6f2f08d603ba/setup.py#L51
| 'tensorflow-hub': ['tensorflow-hub>=0.14.0,<0.16.0'], | ||
| 'milvus': milvus_dependency, | ||
| 'vllm': ['openai==1.107.1', 'vllm==0.14', 'triton==3.3.1'] | ||
| 'vllm': ['openai==1.107.1', 'vllm==0.10.1.1', 'triton==3.3.1'] |
There was a problem hiding this comment.
Running gradlew :sdks:python:container:generatePythonRequirementsAll failed to resolve some dependencies without this revert.
If tests pass on this PR, I'd suggest to make another change to upgrade vllm and regenerate the dependencies. I suspect generating requirements on master is currently broken but haven't checked.
cc: @claudevdm
|
Wordcount IT failed with a strange error, likely a flake at submission: let's see if this happens again. |
| requires = [ | ||
| "setuptools", | ||
| "wheel>=0.36.0", | ||
| "grpcio-tools==1.62.1; python_version <= '3.12'", |
There was a problem hiding this comment.
grpcio-tools==1.62.1 pulls in protobuf 4.
grpcio-tools==1.71.0 pulls in protobuf 5.
Stubs generated with protobuf 5 won't work with protobuf 4:
Successfully installed protobuf-4.25.8
(py310b) 10:58:26 ::python$ python
Python 3.10.19 (main, Jan 5 2026, 12:29:08) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from google.protobuf import runtime_version
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'runtime_version' from 'google.protobuf' (/home/valentyn/.pyenv/versions/py310b/lib/python3.10/site-packages/google/protobuf/__init__.py)
so if any dependency causes installation of protobuf 4, for example, pip install apache-beam[tft], beam stops working.
b129909 to
0c428da
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #37822 +/- ##
============================================
+ Coverage 56.86% 56.87% +0.01%
Complexity 3414 3414
============================================
Files 1178 1178
Lines 187498 187540 +42
Branches 3590 3580 -10
============================================
+ Hits 106623 106670 +47
- Misses 77480 77485 +5
+ Partials 3395 3385 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
08ef814 to
f1d9039
Compare
f1d9039 to
f4dfaef
Compare
f4dfaef to
1162875
Compare
1162875 to
bc3c190
Compare
This is a followup for: #37817
Notable updates:
grpcio: 1.65.0 -> 1.78.0
protobuf: 5.x -> 6.x
envoy-data-plane -- updates to various newer versions, depending on python version.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.