Skip to content

Unvendor guava - #41862

Open
Abacn wants to merge 3 commits into
apache:masterfrom
Abacn:unvendor-guava
Open

Abacn wants to merge 3 commits into
apache:masterfrom
Abacn:unvendor-guava

Conversation

@Abacn

@Abacn Abacn commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

The first commit is a trivial mass replace:

  • Replace org.apache.beam.vendor.guava.v32_1_2_jre.* with com.google.common.* in srcs
  • Replace library.java.vendored_guava_32_1_2_jre with library.java.guava across Gradle build files.
  • Remove vendor/guava-32_1_2-jre, settings.gradle.kts entry, and BeamModulePlugin vendored_guava_32_1_2_jre definition.
  • Remove ForbidNonVendoredGuava checkstyle rule and suppressions; update ForbidGrpcVendoredGuava message.

The scond commit is for fixes:

  • Fix Error Prone warnings/errors newly detected on unvendored com.google.common.* APIs (LenientFormatStringValidation, PreconditionsInvalidPlaceholder, PreconditionsCheckNotNullRepeated, InlineMeInliner, UnnecessaryMethodReference, UnnecessaryLambda, ObjectEqualsForPrimitives, NullableOptional).
  • Fix SpotBugs findings: use ImmutableSet for public static final sets in Kafka schema transforms, suppress HE_INHERITS_EQUALS_USE_HASHCODE on Guava Equivalence subclasses (StateTags, SerializableDataFile), and suppress EI_EXPOSE_STATIC_REP2 in SparkContextFactory.
  • Make TableRowToStorageApiProto.tableSchemaHash(String, List) private to keep com.google.common.hash.HashCode off the GCP API surface.
  • Scope Guava 25.1-jre pin strictly to testRuntimeClasspath (embedded Cassandra 3.11.10 in cassandra/hadoop-format) and hadoopVersion2102 (Hadoop 2.10.2 in hadoop-file-system); move guava to testImplementation in opentelemetry-gcp-auth-extension.
  • Update VendoredListenableFutureAdapter javadoc.

@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.25%. Comparing base (3e0805a) to head (eafecb5).
⚠️ Report is 20 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #41862      +/-   ##
============================================
+ Coverage     36.59%   42.25%   +5.65%     
- Complexity     2848     5184    +2336     
============================================
  Files           721      981     +260     
  Lines         89116   103832   +14716     
  Branches       2330     3882    +1552     
============================================
+ Hits          32614    43876   +11262     
- Misses        53792    56541    +2749     
- Partials       2710     3415     +705     
Flag Coverage Δ
java 71.09% <ø> (+4.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Abacn added 2 commits December 2, 2026 02:33
- Replace org.apache.beam.vendor.guava.v32_1_2_jre.* with com.google.common.* across Java, Kotlin, Gradle, and doc files (formatted with Spotless).
- Replace library.java.vendored_guava_32_1_2_jre with library.java.guava across Gradle build files.
- Remove vendor/guava-32_1_2-jre, settings.gradle.kts entry, and BeamModulePlugin vendored_guava_32_1_2_jre definition.
- Remove ForbidNonVendoredGuava checkstyle rule and suppressions; update ForbidGrpcVendoredGuava message.
…fter unvendoring Guava

- Fix Error Prone warnings/errors newly detected on unvendored com.google.common.* APIs (LenientFormatStringValidation, PreconditionsInvalidPlaceholder, PreconditionsCheckNotNullRepeated, InlineMeInliner, UnnecessaryMethodReference, UnnecessaryLambda, ObjectEqualsForPrimitives, NullableOptional).
- Fix SpotBugs findings: use ImmutableSet for public static final sets in Kafka schema transforms, suppress HE_INHERITS_EQUALS_USE_HASHCODE on Guava Equivalence subclasses (StateTags, SerializableDataFile), and suppress EI_EXPOSE_STATIC_REP2 in SparkContextFactory.
- Make TableRowToStorageApiProto.tableSchemaHash(String, List) private to keep com.google.common.hash.HashCode off the GCP API surface.
- Update OLDER_VERSION_SERIALIZED_CHECKPOINT in KinesisReaderCheckpointTest for unvendored Guava ImmutableList$SerializedForm.
- Scope Guava 25.1-jre pin strictly to testRuntimeClasspath (embedded Cassandra 3.11.10 in cassandra/hadoop-format) and hadoopVersion2102 (Hadoop 2.10.2 in hadoop-file-system); move guava to testImplementation in opentelemetry-gcp-auth-extension.
- Update VendoredListenableFutureAdapter javadoc.
@Abacn

Abacn commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

All tests on eced817 passed. The latest merge commit was to resolve conflicts

@Abacn

Abacn commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Sent out a notice to dev list: https://lists.apache.org/thread/fdoojvofqn7g5hkmh6jk72j25x0kfqb5

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @igorbernstein2 for label bigtable.
Backup reviewer: mutianf (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

This pull request likely touches a core component ("core" label). Please review with scrutiny.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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