Skip to content

Commit a19466a

Browse files
authored
Pin protobuf 3 for debezium (#33541)
* Pin protobuf 3 for debezium * CHANGES
1 parent 5a3ddc4 commit a19466a

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@
6767
## New Features / Improvements
6868

6969
* X feature added (Java/Python) ([#X](https://github.com/apache/beam/issues/X)).
70+
* Upgraded to protobuf 4 (Java) ([#33192](https://github.com/apache/beam/issues/33192)).
7071

7172
## Breaking Changes
7273

7374
* 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)).
75+
* 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.
7476

7577
## Deprecations
7678

sdks/java/io/debezium/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,14 @@ task integrationTest(type: Test, dependsOn: processTestResources) {
8989
useJUnit {
9090
}
9191
}
92+
93+
configurations.all (Configuration it) -> {
94+
resolutionStrategy {
95+
// Force protobuf 3 because debezium is currently incompatible with protobuf 4.
96+
// TODO - remove this and upgrade the version of debezium once a proto-4 compatible version is available
97+
// https://github.com/apache/beam/pull/33526 does some of this, but was abandoned because it still doesn't
98+
// work with protobuf 4.
99+
force "com.google.protobuf:protobuf-java:3.25.5"
100+
force "com.google.protobuf:protobuf-java-util:3.25.5"
101+
}
102+
}

sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubGrpcClient.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818
package org.apache.beam.sdk.io.gcp.pubsub;
1919

20-
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
2120
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState;
2221

2322
import com.google.auth.Credentials;

0 commit comments

Comments
 (0)