Skip to content

Commit bcd1b66

Browse files
authored
DE-9056: Set Kafka connector version in release workflow (#83)
1 parent 27cab9f commit bcd1b66

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,15 @@ jobs:
8989
workingDir=`pwd`
9090
echo "$SUBPROJECTS" | jq -r '.[]' | while read flink; do
9191
FLINK_VERSION=`cd sdk/$flink && grep "def flinkVersion" build.gradle | sed "s/.*'\([0-9.]*\)'.*/\1/"`
92+
KAFKA_CONNECTOR_VERSION=`cd sdk/$flink && grep "def kafkaConnectorVersion" build.gradle | sed "s/.*'\([0-9.-]*\)'.*/\1/"`
9293
9394
### patch example's dependencies for maven and gradle builds
9495
sed -i 's/<decodable.pipeline.sdk.version>.*<\/decodable.pipeline.sdk.version>/<decodable.pipeline.sdk.version>'"$FLINK_VERSION-$RELEASE_VERSION"'<\/decodable.pipeline.sdk.version>/g' examples/custom-pipelines-hello-world/pom.xml
9596
sed -i 's/<flink.version>.*<\/flink.version>/<flink.version>'"$FLINK_VERSION"'<\/flink.version>/g' examples/custom-pipelines-hello-world/pom.xml
97+
sed -i 's/<flink.kafka.connector.version>.*<\/flink.kafka.connector.version>/<flink.kafka.connector.version>'"$KAFKA_CONNECTOR_VERSION"'<\/flink.kafka.connector.version>/g' examples/custom-pipelines-hello-world/pom.xml
9698
sed -i 's/sdkVersion = \x27.*\x27/sdkVersion = \x27'"$FLINK_VERSION-$RELEASE_VERSION"'\x27/g' examples/custom-pipelines-hello-world/build.gradle
9799
sed -i 's/flinkVersion = \x27.*\x27/flinkVersion = \x27'"$FLINK_VERSION"'\x27/g' examples/custom-pipelines-hello-world/build.gradle
100+
sed -i 's/kafkaConnectorVersion = \x27.*\x27/kafkaConnectorVersion = \x27'"$KAFKA_CONNECTOR_VERSION"'\x27/g' examples/custom-pipelines-hello-world/build.gradle
98101
99102
echo "building and testing examples project with Maven using sdk $RELEASE_VERSION for flink $FLINK_VERSION"
100103
cd examples/custom-pipelines-hello-world && ./mvnw -B clean verify

sdk/flink-1.16/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88

99
dependencies {
1010
def flinkVersion = '1.16.3'
11+
def kafkaConnectorVersion = '1.16.3'
1112

1213
api "org.apache.flink:flink-core:$flinkVersion"
1314
implementation "org.apache.flink:flink-streaming-java:$flinkVersion"
1415
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
1516

1617
// A Kafka connector with custom patches is supplied by the Decodable platform at runtime
17-
compileOnly "org.apache.flink:flink-connector-kafka:$flinkVersion"
18+
compileOnly "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
1819

19-
testImplementation "org.apache.flink:flink-connector-kafka:$flinkVersion"
20+
testImplementation "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
2021
testImplementation "org.apache.flink:flink-clients:$flinkVersion"
2122
testImplementation "org.apache.flink:flink-table-api-java:$flinkVersion"
2223
testImplementation "org.apache.flink:flink-table-api-java-bridge:$flinkVersion"

sdk/flink-1.18/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
dependencies {
1010
def flinkVersion = '1.18.1'
11+
def kafkaConnectorVersion = '3.2.0-1.18'
1112

1213
api "org.apache.flink:flink-core:$flinkVersion"
1314
//NOTE: flink-connector-base is needed as of Flink 1.18
@@ -17,9 +18,9 @@ dependencies {
1718

1819
// NOTE: flink-connector-kafka released with different versioning schema starting with Flink 1.18
1920
// A Kafka connector with custom patches is supplied by the Decodable platform at runtime
20-
compileOnly "org.apache.flink:flink-connector-kafka:3.2.0-1.18"
21+
compileOnly "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
2122

22-
testImplementation "org.apache.flink:flink-connector-kafka:3.2.0-1.18"
23+
testImplementation "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
2324
testImplementation "org.apache.flink:flink-clients:$flinkVersion"
2425
testImplementation "org.apache.flink:flink-table-api-java:$flinkVersion"
2526
testImplementation "org.apache.flink:flink-table-api-java-bridge:$flinkVersion"

sdk/flink-1.19/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
dependencies {
1010
def flinkVersion = '1.19.2'
11+
def kafkaConnectorVersion = '3.3.0-1.19'
1112

1213
api "org.apache.flink:flink-core:$flinkVersion"
1314
//NOTE: flink-connector-base is needed as of Flink 1.18
@@ -17,11 +18,11 @@ dependencies {
1718

1819
// NOTE: flink-connector-kafka released with different versioning schema starting with Flink 1.18
1920
// A Kafka connector with custom patches is supplied by the Decodable platform at runtime
20-
compileOnly "org.apache.flink:flink-connector-kafka:3.3.0-1.19"
21+
compileOnly "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
2122

2223
// For some reason, with Flink 1.18+, the Redpanda testcontainer requires commons-codec to be added explicitly
2324
testImplementation "commons-codec:commons-codec:1.18.0"
24-
testImplementation "org.apache.flink:flink-connector-kafka:3.3.0-1.19"
25+
testImplementation "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
2526
testImplementation "org.apache.flink:flink-clients:$flinkVersion"
2627
testImplementation "org.apache.flink:flink-table-api-java:$flinkVersion"
2728
testImplementation "org.apache.flink:flink-table-api-java-bridge:$flinkVersion"

sdk/flink-1.20/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
dependencies {
1010
def flinkVersion = '1.20.1'
11+
def kafkaConnectorVersion = '3.4.0-1.20'
1112

1213
api "org.apache.flink:flink-core:$flinkVersion"
1314
//NOTE: flink-connector-base is needed as of Flink 1.18
@@ -17,11 +18,11 @@ dependencies {
1718

1819
//NOTE: flink-connector-kafka released with different versioning schema starting with Flink 1.18
1920
// A Kafka connector with custom patches is supplied by the Decodable platform at runtime
20-
compileOnly "org.apache.flink:flink-connector-kafka:3.4.0-1.20"
21+
compileOnly "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
2122

2223
// For some reason, with Flink 1.18+, the Redpanda testcontainer requires commons-codec to be added explicitly
2324
testImplementation "commons-codec:commons-codec:1.18.0"
24-
testImplementation "org.apache.flink:flink-connector-kafka:3.4.0-1.20"
25+
testImplementation "org.apache.flink:flink-connector-kafka:$kafkaConnectorVersion"
2526
testImplementation "org.apache.flink:flink-clients:$flinkVersion"
2627
testImplementation "org.apache.flink:flink-table-api-java:$flinkVersion"
2728
testImplementation "org.apache.flink:flink-table-api-java-bridge:$flinkVersion"

0 commit comments

Comments
 (0)