Skip to content

Commit 8c44e78

Browse files
committed
chore: upgrade dependencies
1 parent 481d401 commit 8c44e78

File tree

9 files changed

+59
-60
lines changed

9 files changed

+59
-60
lines changed

.github/workflows/package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: ./gradlew :dagger-common:publish
2626
env:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
- name: Publish minimal and shadow packages of core
29-
run: ./gradlew :dagger-core:minimalAndShadowPublish
28+
- name: Publish minimal package of core
29+
run: ./gradlew :dagger-core:minimalPublish
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

dagger-common/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,26 @@ dependencies {
5858
compileOnly group: 'org.apache.flink', name: 'flink-table', version: flinkVersion
5959
compileOnly group: 'org.apache.flink', name: 'flink-table-api-java-bridge_2.11', version: flinkVersion
6060
compileOnly group: 'org.apache.flink', name: 'flink-connector-kafka_2.11', version: flinkVersion
61-
compileOnly 'com.gotocompany:stencil:0.4.0'
61+
compileOnly 'com.gotocompany:stencil:0.6.0'
6262

63-
dependenciesCommonJar ('org.apache.hadoop:hadoop-client:2.8.3') {
64-
exclude module:"commons-cli"
65-
exclude module:"commons-compress"
63+
dependenciesCommonJar('org.apache.hadoop:hadoop-client:3.3.6') {
64+
exclude module: "commons-cli"
65+
exclude module: "commons-compress"
6666
}
67-
dependenciesCommonJar 'com.google.cloud.bigdataoss:gcs-connector:1.9.0-hadoop2'
67+
dependenciesCommonJar group: 'com.google.cloud.bigdataoss', name: 'gcs-connector', version: 'hadoop2-2.2.16'
6868
dependenciesCommonJar 'org.apache.flink:flink-metrics-dropwizard:' + flinkVersion
6969
dependenciesCommonJar 'org.apache.flink:flink-json:' + flinkVersion
7070
dependenciesCommonJar 'com.jayway.jsonpath:json-path:2.4.0'
7171
dependenciesCommonJar 'com.google.code.gson:gson:2.8.2'
7272
dependenciesCommonJar 'org.apache.parquet:parquet-column:1.12.2'
7373

74-
testImplementation 'junit:junit:4.13'
74+
testImplementation 'junit:junit:4.13.1'
7575
testImplementation 'org.jmockit:jmockit:1.25'
7676
testImplementation 'org.mockito:mockito-core:2.25.1'
7777
testImplementation 'io.grpc:grpc-protobuf:1.18.0'
7878
testImplementation 'io.grpc:grpc-api:1.37.0'
7979
testImplementation 'io.grpc:grpc-stub:1.18.0'
80-
testImplementation 'com.google.protobuf:protobuf-java:3.5.0'
80+
testImplementation 'com.google.protobuf:protobuf-java:3.16.3'
8181
testImplementation 'com.google.protobuf:protobuf-java-util:3.5.0'
8282
testImplementation 'org.grpcmock:grpcmock-junit5:0.5.0'
8383
}

dagger-common/src/main/java/com/gotocompany/dagger/common/core/StencilClientOrchestrator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import com.gotocompany.stencil.cache.SchemaRefreshStrategy;
66
import com.gotocompany.stencil.client.StencilClient;
77
import com.gotocompany.stencil.config.StencilConfig;
8-
import org.apache.http.Header;
9-
import org.apache.http.message.BasicHeader;
8+
import org.apache.hc.core5.http.Header;
9+
import org.apache.hc.core5.http.message.BasicHeader;
1010
import org.slf4j.Logger;
1111
import org.slf4j.LoggerFactory;
1212

dagger-common/src/main/java/com/gotocompany/dagger/common/serde/proto/serialization/ProtoSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private DynamicMessage.Builder populateBuilder(DynamicMessage.Builder builder, D
103103
if (data != null) {
104104
try {
105105
builder = typeHandler.transformToProtoBuilder(builder, data);
106-
} catch (IllegalArgumentException e) {
106+
} catch (RuntimeException e) {
107107
String protoType = fieldDescriptor.getType().toString();
108108
if (fieldDescriptor.isRepeated()) {
109109
protoType = String.format("REPEATED %s", fieldDescriptor.getType());

dagger-common/src/test/java/com/gotocompany/dagger/common/serde/proto/serialization/ProtoSerializerTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.gotocompany.dagger.common.exceptions.DescriptorNotFoundException;
66
import com.gotocompany.dagger.common.exceptions.serde.DaggerSerializationException;
77
import com.gotocompany.dagger.common.exceptions.serde.InvalidColumnMappingException;
8-
import com.gotocompany.dagger.common.exceptions.serde.InvalidDataTypeException;
98
import com.gotocompany.dagger.consumer.*;
109
import com.gotocompany.stencil.StencilClientFactory;
1110
import com.gotocompany.stencil.client.StencilClient;
@@ -279,9 +278,9 @@ public void shouldThrowExceptionWhenPrimitiveTypeCanNotBeCasted() {
279278
Row element = new Row(1);
280279
element.setField(0, "invalid_number");
281280

282-
InvalidDataTypeException exception = assertThrows(InvalidDataTypeException.class,
281+
InvalidColumnMappingException exception = assertThrows(InvalidColumnMappingException.class,
283282
() -> serializer.serializeValue(element));
284-
assertEquals("type mismatch of field: customer_price, expecting DOUBLE type, actual type class java.lang.String",
283+
assertEquals("column invalid: type mismatch of column customer_price, expecting DOUBLE type. Actual type class java.lang.String",
285284
exception.getMessage());
286285
}
287286

dagger-core/build.gradle

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ buildscript {
99
}
1010
}
1111
dependencies {
12-
classpath 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
12+
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
1313
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.17.0"
1414
}
1515
}
1616

1717
plugins {
1818
id 'maven-publish'
1919
id 'com.jfrog.artifactory' version '4.17.0'
20-
id 'com.github.johnrengelman.shadow' version '6.0.0'
20+
id 'com.github.johnrengelman.shadow' version '6.1.0'
2121
}
2222

2323

@@ -26,12 +26,15 @@ def flinkVersion = rootProject.flinkVersion
2626
version = rootProject.file('version.txt').text.trim()
2727

2828
def minimalVersion = version
29-
def dependenciesVersion = "0.3.2"
29+
def dependenciesVersion = "0.4.0"
3030

3131
description = """dagger to the heart!"""
3232

33-
sourceCompatibility = 1.8
34-
targetCompatibility = 1.8
33+
34+
java {
35+
sourceCompatibility = JavaVersion.VERSION_1_8
36+
targetCompatibility = JavaVersion.VERSION_1_8
37+
}
3538

3639
tasks.withType(JavaCompile) {
3740
options.encoding = 'UTF-8'
@@ -61,47 +64,61 @@ configurations {
6164
dependencies {
6265
minimalJar project(path: ':dagger-common', configuration: 'minimalCommonJar')
6366
minimalJar project(path: ':dagger-functions', configuration: 'minimalFunctionsJar')
64-
minimalJar('com.gotocompany:depot:0.4.0') {
65-
exclude group: 'org.apache.httpcomponents'
66-
exclude group: 'com.google.protobuf'
67-
exclude group: 'com.datadoghq'
68-
exclude group: 'com.google.cloud', module:'google-cloud-bigtable'
67+
minimalJar('com.gotocompany:depot:0.6.0') {
68+
exclude group: 'com.google.cloud', module: 'google-cloud-bigtable'
69+
exclude group: 'com.google.cloud', module: 'google-cloud-bigquerystorage'
70+
exclude group: 'com.google.cloud', module: 'google-cloud-bigquery'
71+
exclude group: 'com.google.protobuf', module: 'protobuf-java'
72+
exclude group: 'com.google.protobuf', module: 'protobuf-java-util'
73+
exclude group: "io.grpc"
74+
}
75+
minimalJar ('com.gotocompany:stencil:0.6.0') {
76+
exclude group: 'com.google.protobuf', module: 'protobuf-java'
77+
exclude group: 'com.google.protobuf', module: 'protobuf-java-util'
6978
}
7079
compileOnly 'org.projectlombok:lombok:1.18.8'
7180
annotationProcessor 'org.projectlombok:lombok:1.18.8'
7281

73-
implementation 'org.slf4j:slf4j-log4j12:1.7.7'
82+
implementation group: 'org.slf4j', name: 'slf4j-reload4j', version: '2.0.7'
7483
implementation 'org.apache.flink:flink-streaming-java_2.11:' + flinkVersion
7584
implementation 'org.apache.flink:flink-clients_2.11:' + flinkVersion
7685
implementation 'org.apache.flink:flink-table:' + flinkVersion
7786
implementation 'org.apache.flink:flink-table-api-java-bridge_2.11:' + flinkVersion
7887
implementation 'org.apache.flink:flink-table-planner_2.11:' + flinkVersion
79-
implementation 'com.gotocompany:stencil:0.4.0'
8088

89+
dependenciesJar 'io.grpc:grpc-all:1.55.1'
8190
dependenciesJar project(path: ':dagger-common', configuration: 'dependenciesCommonJar')
8291
dependenciesJar project(path: ':dagger-functions', configuration: 'dependenciesFunctionsJar')
83-
92+
dependenciesJar(group: 'com.google.cloud', name: 'google-cloud-bigquerystorage', version: '2.39.1') {
93+
exclude group: "io.grpc"
94+
}
95+
dependenciesJar(group: 'com.google.cloud', name: 'google-cloud-bigtable', version: '2.24.1'){
96+
exclude group: "io.grpc"
97+
}
98+
dependenciesJar(group: 'com.google.cloud', name: 'google-cloud-bigquery', version: '2.29.0') {
99+
exclude group: "io.grpc"
100+
}
84101
dependenciesJar 'org.apache.flink:flink-connector-kafka_2.11:' + flinkVersion
85-
dependenciesJar 'com.google.protobuf:protobuf-java:3.1.0'
102+
dependenciesJar 'com.google.protobuf:protobuf-java:3.23.2'
86103
dependenciesJar 'com.google.protobuf:protobuf-java-util:3.1.0'
87104
dependenciesJar 'org.influxdb:influxdb-java:2.8'
88105
dependenciesJar 'org.elasticsearch.client:elasticsearch-rest-client:6.6.1'
89-
dependenciesJar 'com.google.cloud.bigtable:bigtable-hbase-2.x:1.11.0'
106+
dependenciesJar 'com.google.cloud.bigtable:bigtable-hbase-2.x:2.10.0'
90107
dependenciesJar 'org.asynchttpclient:async-http-client:2.10.1'
91108
dependenciesJar 'io.vertx:vertx-pg-client:3.9.0'
92109
dependenciesJar 'org.apache.commons:commons-pool2:2.4.3'
93110
dependenciesJar 'org.apache.parquet:parquet-protobuf:1.12.2'
94111

95112
testImplementation project(':dagger-common').sourceSets.test.output
96-
testImplementation 'junit:junit:4.13'
113+
testImplementation 'junit:junit:4.13.1'
97114
testImplementation 'org.apache.flink:flink-test-utils_2.11:' + flinkVersion
98-
testImplementation 'org.apache.kafka:kafka-clients:2.5.0'
115+
testImplementation 'org.apache.kafka:kafka-clients:2.6.3'
99116
testImplementation 'com.github.tomakehurst:wiremock-standalone:2.27.0'
100117
testImplementation 'org.jmockit:jmockit:1.25'
101118
testImplementation 'org.mockito:mockito-core:2.25.1'
102119
testImplementation 'org.powermock:powermock-module-junit4:2.0.0-beta.5'
103120
testImplementation 'org.powermock:powermock-api-mockito2:2.0.0-beta.5'
104-
testImplementation 'com.google.guava:guava:27.0.1-jre'
121+
testImplementation 'com.google.guava:guava:30.0-jre'
105122
testImplementation 'org.grpcmock:grpcmock-junit5:0.5.0'
106123
testImplementation 'com.github.stefanbirkner:system-rules:1.19.0'
107124
}
@@ -163,20 +180,7 @@ jar {
163180
}
164181
}
165182

166-
shadowJar {
167-
mergeServiceFiles()
168-
minimize {
169-
exclude(dependency('io.vertx:vertx-pg-client:.*'))
170-
exclude(dependency('com.google.cloud.bigtable:bigtable-hbase-2.x:.*'))
171-
}
172-
zip64 true
173-
configurations = [project.configurations.minimalJar, project.configurations.dependenciesJar]
174-
relocate('com.google.protobuf', 'shaded.com.google.protobuf') {
175-
exclude 'combine.self="override"'
176-
}
177-
}
178-
179-
task minimalJar(type: ShadowJar) {
183+
tasks.register('minimalJar', ShadowJar) {
180184
manifest.attributes 'Main-Class': mainClassName
181185
archiveClassifier = 'minimal'
182186
zip64 true
@@ -187,7 +191,7 @@ task minimalJar(type: ShadowJar) {
187191
exclude("core-site.xml")
188192
}
189193

190-
task dependenciesJar(type: ShadowJar) {
194+
tasks.register('dependenciesJar', ShadowJar) {
191195
mergeServiceFiles()
192196
manifest.attributes 'Main-Class': mainClassName
193197
archiveClassifier = 'dependencies'
@@ -197,7 +201,7 @@ task dependenciesJar(type: ShadowJar) {
197201
archiveVersion = dependenciesVersion
198202
}
199203

200-
task fatJar(type: ShadowJar) {
204+
tasks.register('fatJar', ShadowJar) {
201205
description = "Builds a executable jar"
202206
manifest.attributes 'Main-Class': mainClassName
203207
archiveClassifier = 'fat'
@@ -217,10 +221,6 @@ private Properties loadEnv() {
217221

218222
publishing {
219223
publications {
220-
shadow(MavenPublication) {
221-
publication ->
222-
project.shadow.component(publication)
223-
}
224224
minimalArtifact(MavenPublication) {
225225
artifact file("$buildDir/libs/dagger-core-${minimalVersion}-minimal.jar")
226226
groupId project.group
@@ -264,9 +264,9 @@ artifactory {
264264
clientConfig.info.setBuildNumber(System.env.BUILD_NUMBER)
265265
}
266266

267-
task minimalAndShadowPublish(dependsOn: 'minimalJar') {
268-
dependsOn('publishMinimalArtifactPublicationToGitHubPackagesRepository', 'publishShadowPublicationToGitHubPackagesRepository')
269-
description('Publishes minimal and shadow jar')
267+
task minimalPublish(dependsOn: 'minimalJar') {
268+
dependsOn('publishMinimalArtifactPublicationToGitHubPackagesRepository')
269+
description('Publishes minimal jar')
270270
}
271271

272272
task dependenciesPublish(dependsOn: 'dependenciesJar') {

dagger-functions/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ dependencies {
5757
compileOnly group: 'org.apache.flink', name: 'flink-table-api-java-bridge_2.11', version: flinkVersion
5858
compileOnly group: 'org.apache.flink', name: 'flink-streaming-java_2.11', version: flinkVersion
5959
compileOnly group: 'org.apache.flink', name: 'flink-metrics-dropwizard', version: flinkVersion
60-
compileOnly 'com.gotocompany:stencil:0.4.0'
60+
compileOnly 'com.gotocompany:stencil:0.6.0'
6161

6262
dependenciesFunctionsJar 'com.github.davidmoten:geo:0.7.6'
6363
dependenciesFunctionsJar 'org.apache.flink:flink-python_2.11:' + flinkVersion
6464
dependenciesFunctionsJar group: 'org.apache.commons', name: 'commons-jexl3', version: '3.1'
6565
dependenciesFunctionsJar group: 'org.isuper', name: 's2-geometry-library-java', version: '0.0.1'
66-
dependenciesFunctionsJar group: 'com.google.cloud', name: 'google-cloud-storage', version: '1.67.0'
66+
dependenciesFunctionsJar group: 'com.google.cloud', name: 'google-cloud-storage', version: '2.23.0'
6767

6868
testImplementation project(':dagger-common').sourceSets.test.output
6969
testImplementation group: 'junit', name: 'junit', version: '4.12'

docs/docs/guides/deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To know more about Flink's cluster mode deployment follow [this](https://ci.apac
1515
./gradlew clean build
1616

1717
#creating a fat jar
18-
./gradlew :dagger-core:shadowJar
18+
./gradlew :dagger-core:fatJar
1919

2020
```
2121

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.6
1+
0.10.0

0 commit comments

Comments
 (0)