From e1f90ea8653ef2ecfc96adfa93efcb8e5570524d Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Wed, 8 Jan 2025 20:56:50 +0000 Subject: [PATCH 1/2] Pin protobuf 3 for debezium --- CHANGES.md | 2 ++ sdks/java/io/debezium/build.gradle | 11 +++++++++++ .../beam/sdk/io/gcp/pubsub/PubsubGrpcClient.java | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d5cbb76fb3d5..89ae261d08ef 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 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; From ff049aacdcecfcd707f7949db2be8c2d1b9280a9 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Wed, 8 Jan 2025 21:00:48 +0000 Subject: [PATCH 2/2] CHANGES --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 89ae261d08ef..18dd8e66e17d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -72,7 +72,7 @@ ## 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. +* 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