diff --git a/CHANGES.md b/CHANGES.md index ac3992a872de..189bd8c1f71c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -67,10 +67,12 @@ ## New Features / Improvements * X feature added (Java/Python) ([#X](https://github.com/apache/beam/issues/X)). +* Upgraded to protobuf 4 (Java) ([#33192](https://github.com/apache/beam/issues/33192)). ## Breaking Changes * AWS V1 I/Os have been removed (Java). As part of this, x-lang Python Kinesis I/O has been updated to consume the V2 IO and it also no longer supports setting producer_properties ([#33430](https://github.com/apache/beam/issues/33430)). +* Upgraded to protobuf 4 (Java) ([#33192](https://github.com/apache/beam/issues/33192)), but forced Debezium IO to use protobuf 3 ([#33541](https://github.com/apache/beam/issues/33541) because Debezium clients are not protobuf 4 compatible. This may cause conflicts when using clients which are only compatible with protobuf 4. ## Deprecations diff --git a/sdks/java/io/debezium/build.gradle b/sdks/java/io/debezium/build.gradle index e3b88e22607d..d8ab954b4473 100644 --- a/sdks/java/io/debezium/build.gradle +++ b/sdks/java/io/debezium/build.gradle @@ -89,3 +89,14 @@ task integrationTest(type: Test, dependsOn: processTestResources) { useJUnit { } } + +configurations.all (Configuration it) -> { + resolutionStrategy { + // Force protobuf 3 because debezium is currently incompatible with protobuf 4. + // TODO - remove this and upgrade the version of debezium once a proto-4 compatible version is available + // https://github.com/apache/beam/pull/33526 does some of this, but was abandoned because it still doesn't + // work with protobuf 4. + force "com.google.protobuf:protobuf-java:3.25.5" + force "com.google.protobuf:protobuf-java-util:3.25.5" + } +} diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubGrpcClient.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubGrpcClient.java index de6c14722898..7fb30a1099aa 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubGrpcClient.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubGrpcClient.java @@ -17,7 +17,6 @@ */ package org.apache.beam.sdk.io.gcp.pubsub; -import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState; import com.google.auth.Credentials;