Skip to content

Commit

Permalink
Pin protobuf 3 for debezium (#33541)
Browse files Browse the repository at this point in the history
* Pin protobuf 3 for debezium

* CHANGES
  • Loading branch information
damccorm authored Jan 8, 2025
1 parent 5a3ddc4 commit a19466a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 11 additions & 0 deletions sdks/java/io/debezium/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a19466a

Please sign in to comment.