Pin google-adk to 1.17.0 for YAML/Xlang precommit dependency resolution#38090
Pin google-adk to 1.17.0 for YAML/Xlang precommit dependency resolution#38090aIbrahiim wants to merge 4 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 updates the dependency management for the Python SDK by explicitly pinning the google-adk package to a specific version. This change ensures consistent behavior and stability for YAML and Xlang precommit workflows by preventing unexpected dependency resolution issues. 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. 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. Footnotes
|
4fe24d6 to
a3da0f9
Compare
96bdf7b to
2232aa3
Compare
| 'google-adk==1.28.1', | ||
| 'opentelemetry-api==1.37.0', | ||
| 'opentelemetry-sdk==1.37.0', | ||
| 'opentelemetry-exporter-otlp-proto-http==1.37.0', |
There was a problem hiding this comment.
Is there a reason we need to pin these opentelemetry dependencies as well?
There was a problem hiding this comment.
Yes as ADK fixes OTel versions, unpinned exporters were upgrading and conflicting with ADK’s SDK constraint, so i pined the trio to match
There was a problem hiding this comment.
and pip failed with something like google-adk 1.17.0 wants opentelemetry-sdk exactly 1.37.x, but pip pulled opentelemetry-exporter-otlp-proto-http 1.40.x, which requires opentelemetry-sdk~=1.40
There was a problem hiding this comment.
Do you know where the opentelemetry requirement was coming from that installed 1.40.x? I would've expected that to be handled by pip
There was a problem hiding this comment.
Pip was handling it, it ended in ResolutionImpossible / a hard conflict, not a wrong install and the 1.40.x side was coming from opentelemetry-exporter-otlp-proto-http (e.g. 1.40.0 wants opentelemetry-sdk~=1.40). google-adk meanwhile pins opentelemetry-sdk to 1.37.x, so theres no single version of the SDK that satisfies both so pip can’t merge those, it just fails unless we pin the exporter (and api) to the same minor as ADK’s SDK so nothing pulls 1.40.x into the graph
There was a problem hiding this comment.
Right, but what requires opentelemetry-exporter-otlp-proto-http?
There was a problem hiding this comment.
I had to pin opentelemetry-exporter-otlp-proto-http because otherwise pip kept grabbing a newer 1.40.x build that wants opentelemetry-sdk~=1.40, while ADK only lines up with 1.37.x so resolution blew up unless i locked the exporter to the same minor as the SDK @damccorm
| # match tft extra. | ||
| 'tensorflow_transform>=1.14.0,<1.15.0', | ||
| # TFT->TFX-BSL require pandas 1.x, which is not compatible | ||
| # with numpy 2.x |
There was a problem hiding this comment.
Why don't we need this anymore?
There was a problem hiding this comment.
if you mean protobuf<4, i dropped that cap because with ADK/OTel in the same extra it fought protobuf>=5. ml_test no longer pulls ADK, so that specific cap isnt what unblocks resolution anymore, we can revisit a narrower cap separately if [gcp]+[ml_test] still allows it.
| 'google-adk==1.28.1', | ||
| 'opentelemetry-api==1.37.0', | ||
| 'opentelemetry-sdk==1.37.0', | ||
| 'opentelemetry-exporter-otlp-proto-http==1.37.0', |
There was a problem hiding this comment.
Do you know where the opentelemetry requirement was coming from that installed 1.40.x? I would've expected that to be handled by pip
sdks/python/setup.py
Outdated
| # proto-plus<1.24 requires protobuf<5; opentelemetry-proto | ||
| # (google-adk) needs protobuf>=5. 1.26.1 allows protobuf<7 | ||
| # (matches Beam's cap). | ||
| 'proto-plus>=1.26.1,<2', |
There was a problem hiding this comment.
If this is the case, we should just put this constraint in the adk portion of the extra and should keep the broader constraint here. This updates the core constraint which will be enforced on all users of beam
damccorm
left a comment
There was a problem hiding this comment.
I'm going to merge so that we can get this green/get it on the release branch. I think we can probably simplify this further though. If tensorflow-transform is the source of most of the pain, maybe we can scope it out for now and skip tests (or have a special suite/dependency set for tft only)
| 'google-adk==1.28.1', | ||
| 'opentelemetry-api==1.37.0', | ||
| 'opentelemetry-sdk==1.37.0', | ||
| 'opentelemetry-exporter-otlp-proto-http==1.37.0', |
There was a problem hiding this comment.
Right, but what requires opentelemetry-exporter-otlp-proto-http?
damccorm
left a comment
There was a problem hiding this comment.
Actually, I noticed https://github.com/apache/beam/actions/runs/24153581426/job/70486866605?pr=38090 is failing because of this. Could you please take a look/fix?
6557a06 to
8a74dd8
Compare
|
@damccorm the failure in beam_PreCommit_Python_ML looks unrelated to the ADK pin changes as the install step succeeds and tests fail later in Milvus IT setup with pymilvus Fail connecting to server on localhost:46509: so it’s a Milvus container readiness/connectivity issue in py313-ml |
|
The original failure I linked to was: This was clearly an adk issue. The new set of changes seems to be causing https://github.com/apache/beam/actions/runs/24182541038/job/70578913707 to fail all dataframes tests: We need this to be fixed before we can merge |
a899da7 to
61335ff
Compare
Please add a meaningful description for your change here
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.