You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2025/01/08 20:57:10 UTC
(beam) 01/01: Pin protobuf 3 for debezium
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch users/damccorm/pin-proto-debezium
in repository https://gitbox.apache.org/repos/asf/beam.git
commit e1f90ea8653ef2ecfc96adfa93efcb8e5570524d
Author: Danny McCormick <da...@google.com>
AuthorDate: Wed Jan 8 20:56:50 2025 +0000
Pin protobuf 3 for debezium
---
CHANGES.md | 2 ++
sdks/java/io/debezium/build.gradle | 11 +++++++++++
.../org/apache/beam/sdk/io/gcp/pubsub/PubsubGrpcClient.java | 1 -
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/CHANGES.md b/CHANGES.md
index d5cbb76fb3d..89ae261d08e 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 ([#TODO](https://github.com/apache/beam/issues/TODO) 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 e3b88e22607..d8ab954b447 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 de6c1472289..7fb30a1099a 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;