Skip to content

Upgrade to Beam 2.72.0 - #3557

Merged
Abacn merged 23 commits into
GoogleCloudPlatform:mainfrom
Abacn:pr-3505
Apr 4, 2026
Merged

Upgrade to Beam 2.72.0#3557
Abacn merged 23 commits into
GoogleCloudPlatform:mainfrom
Abacn:pr-3505

Conversation

@Abacn

@Abacn Abacn commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 primarily focuses on a comprehensive dependency upgrade across both Java and Python components. It advances the core Apache Beam framework to a newer release candidate, updates several Google Cloud client libraries, and refines Python dependency specifications. The changes aim to ensure compatibility with the latest versions of these critical components and improve the robustness of related tests.

Highlights

  • Apache Beam Version Upgrade: Updated the Apache Beam version from 2.71.0 to 2.72.0 across Java and Python dependencies, including the beam-maven-repo URL.
  • Google Cloud Spanner Dependency Update: Upgraded the google-cloud-spanner dependency version from 6.104.0 to 6.112.0 in multiple pom.xml files.
  • Google Ads API Version Update: Updated the Google Ads API version from 41.0.0 to 42.1.0, which involved changing import statements from v19 to v23 in several Java files and adjusting test data.
  • Python Dependency Management Refinement: Updated apache-beam[gcp] and apache-beam[dataframe,gcp,test,yaml] versions to 2.72.0rc2 in Python requirement files, and regenerated requirements.txt with new hash values, adding google-cloud-build and removing google-cloud-pubsublite and overrides.
  • Maven Profile Activation Logic Change: Modified the validateCandidate Maven profile activation from activeByDefault to jdk version range [1.).
  • Spanner Test Exception Handling: Updated test expectations in SpannerChangeStreamsToGcsTest.java to catch SpannerException or SessionNotFoundException instead of IllegalArgumentException for certain scenarios.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.32%. Comparing base (d7c872a) to head (d5df998).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3557      +/-   ##
============================================
- Coverage     52.35%   52.32%   -0.04%     
+ Complexity     6143     6138       -5     
============================================
  Files          1053     1053              
  Lines         63361    63361              
  Branches       6947     6947              
============================================
- Hits          33174    33151      -23     
- Misses        27939    27962      +23     
  Partials       2248     2248              
Components Coverage Δ
spanner-templates 72.11% <ø> (-0.05%) ⬇️
spanner-import-export 68.78% <ø> (-0.15%) ⬇️
spanner-live-forward-migration 80.38% <ø> (ø)
spanner-live-reverse-replication 77.83% <ø> (ø)
spanner-bulk-migration 89.19% <ø> (ø)
gcs-spanner-dv 85.34% <ø> (ø)
Files with missing lines Coverage Δ
...oud/teleport/v2/templates/GoogleAdsToBigQuery.java 0.00% <ø> (ø)
...t/v2/transforms/GoogleAdsRowToReportRowJsonFn.java 54.00% <ø> (ø)
...port/v2/utils/GoogleAdsRateLimitPolicyFactory.java 66.66% <ø> (ø)
...google/cloud/teleport/v2/utils/GoogleAdsUtils.java 94.11% <ø> (ø)

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Abacn

Abacn commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

Now the error becomes

Caused by: com.clickhouse.client.api.ServerException: Code: 516. DB::Exception: default: Authentication failed:
 password is incorrect, or there is no user with such name. 
If you have installed ClickHouse and forgot password you can reset it in the configuration file. 
The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml 
and deleting this file will reset the password. See also /etc/clickhouse-server/users.xml on the server 
where ClickHouse is installed. . (AUTHENTICATION_FAILED) (version 23.8.16.16 (official build)) 
...
Caused by: java.lang.RuntimeException: Failed to get table schema for table: test_big_query_to_click_house_20260326030950490
 at org.apache.beam.sdk.io.clickhouse.ClickHouseIO.getTableSchema(ClickHouseIO.java:765)
 at org.apache.beam.sdk.io.clickhouse.ClickHouseIO.getTableSchema(ClickHouseIO.java:699)
 at com.google.cloud.teleport.v2.clickhouse.templates.BigQueryToClickHouse.run(BigQueryToClickHouse.java:109)
 ... 1 more

We may need to do similar changes like here:

https://github.com/apache/beam/pull/37611/changes#diff-2801abf26a3a9e2cd1f4278738986ea658907f7341cd0db9faa0e265eeb01eecR249

@Abacn

Abacn commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

clickhouse tests passed in the latest run

@Abacn Abacn changed the title [Do not merge] test Beam 2.72.0rc5 Upgrade to Beam 2.72.0 Apr 3, 2026
@Abacn Abacn added improvement Making existing code better and removed ignore-for-release labels Apr 3, 2026
@Abacn

Abacn commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

Build failure due to cannot find aiohttp 3.13.5 in internal pypi mirror

@Abacn
Abacn marked this pull request as ready for review April 3, 2026 21:38
@Abacn
Abacn requested a review from a team as a code owner April 3, 2026 21:38
@Abacn
Abacn requested review from aasthabharill and rohitwali April 3, 2026 21:38
@Abacn

Abacn commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

R: @apanich @tvalentyn if anyone still around

@tvalentyn

Copy link
Copy Markdown
Contributor

LGTM

@Abacn
Abacn merged commit 25dd6a0 into GoogleCloudPlatform:main Apr 4, 2026
56 checks passed
@Abacn
Abacn deleted the pr-3505 branch April 4, 2026 01:27
@@ -1,4 +1,4 @@
apache-beam[gcp]==2.71.0
apache-beam[gcp]

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.

I think that this doesn't work well. When there are several requirements, pip doesn't always resolve to the latest beam. For example,

is on an old beam. This doesn't a matter much for this example template, but would be easy to miss in other instances.

I think we should add back version numbers here, proposing this in #4203

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens when your __build__ dir isn't fresh. Adding version is indeed safer, though need to change it every time on a version bump or rc validation

@damccorm damccorm Sep 1, 2026

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.

I don't think it is just that. We're getting this even when getting PRs generated by GitHub actions and I reproed on a fresh GitHub codespace - neither of these have preexisting __build__ directories

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.

Also note that it only failed to update streaming-llm in those passes, not the other generated requirements. This suggests that this can be caused by including certain dependencies (for now these are ml deps, but I don't think there's any guarantee that the same thing couldn't happen for other dependencies)

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.

My guess is that pip resolves some of the other dependencies first, then picks a beam version which satisfies that; if the dependency (or one of its dependencies) is outside Beam's constraints, then we'll see this issue

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's possible. It's noticed some Beam's optional dependency started to depend on Beam: apache/beam#39884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Making existing code better size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants