Skip to content

Commit 8fdaada

Browse files
committed
upgrade
1 parent 1cb60a8 commit 8fdaada

File tree

7 files changed

+75
-54
lines changed

7 files changed

+75
-54
lines changed

client/java-armeria-xds/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ dependencies {
44
// Armeria
55
api libs.armeria.xds
66

7-
testImplementation libs.controlplane.server
8-
testImplementation libs.controlplane.cache
7+
testImplementation (libs.controlplane.server) {
8+
exclude group: "io.envoyproxy.controlplane"
9+
}
10+
testImplementation (libs.controlplane.cache) {
11+
exclude group: "io.envoyproxy.controlplane"
12+
}
13+
914
testImplementation libs.armeria.junit5
1015
testImplementation libs.jackson.dataformat.yaml
1116
}

client/java-armeria-xds/src/main/java/com/linecorp/centraldogma/client/armeria/xds/XdsCentralDogmaBuilder.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@
5757
import io.envoyproxy.envoy.config.cluster.v3.Cluster;
5858
import io.envoyproxy.envoy.config.cluster.v3.Cluster.DiscoveryType;
5959
import io.envoyproxy.envoy.config.core.v3.Address;
60+
import io.envoyproxy.envoy.config.core.v3.AggregatedConfigSource;
6061
import io.envoyproxy.envoy.config.core.v3.ApiConfigSource;
6162
import io.envoyproxy.envoy.config.core.v3.ApiConfigSource.ApiType;
63+
import io.envoyproxy.envoy.config.core.v3.ConfigSource;
6264
import io.envoyproxy.envoy.config.core.v3.GrpcService;
6365
import io.envoyproxy.envoy.config.core.v3.GrpcService.EnvoyGrpc;
6466
import io.envoyproxy.envoy.config.core.v3.HeaderValue;
@@ -269,8 +271,13 @@ private XdsBootstrap xdsBootstrap() {
269271
.addGrpcServices(grpcService)
270272
.setApiType(ApiType.AGGREGATED_GRPC)
271273
.build();
274+
final AggregatedConfigSource ads = AggregatedConfigSource.getDefaultInstance();
272275
final DynamicResources dynamicResources =
273-
DynamicResources.newBuilder().setAdsConfig(apiConfigSource).build();
276+
DynamicResources.newBuilder()
277+
.setLdsConfig(ConfigSource.newBuilder().setAds(ads))
278+
.setCdsConfig(ConfigSource.newBuilder().setAds(ads))
279+
.setAdsConfig(apiConfigSource)
280+
.build();
274281
final Bootstrap bootstrap =
275282
Bootstrap.newBuilder()
276283
.setClusterManager(ClusterManager.newBuilder()
@@ -300,7 +307,9 @@ private Cluster bootstrapCluster() {
300307
localityLbEndpointsBuilder.addLbEndpoints(lbEndpoint);
301308
}
302309
final ClusterLoadAssignment clusterLoadAssignment =
303-
ClusterLoadAssignment.newBuilder().addEndpoints(localityLbEndpointsBuilder.build()).build();
310+
ClusterLoadAssignment.newBuilder()
311+
.setClusterName(BOOTSTRAP_CLUSTER_NAME)
312+
.addEndpoints(localityLbEndpointsBuilder.build()).build();
304313

305314
if (isUseTls()) {
306315
clusterBuilder.setTransportSocket(

dependencies.toml

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# If its classes are exposed in Javadoc, update offline links as well.
44
#
55
[versions]
6-
armeria = "1.33.4"
7-
assertj = "3.27.4"
6+
armeria = "1.34.0"
7+
assertj = "3.27.6"
88
awaitility = "4.3.0"
9-
bouncycastle = "1.81"
10-
caffeine = "3.2.2"
9+
bouncycastle = "1.83"
10+
caffeine = "3.2.3"
1111
checkstyle = "10.3.3"
1212
conscrypt = "2.5.2"
1313
controlplane = "1.0.49"
@@ -19,17 +19,17 @@ curator = "5.9.0"
1919
cron-utils = "9.2.0"
2020
diffutils = "1.3.0"
2121
download = "5.6.0"
22-
dropwizard-metrics = "4.2.33"
22+
dropwizard-metrics = "4.2.37"
2323
eddsa = "0.3.0"
2424
findbugs = "3.0.2"
2525
futures-completable = "0.3.6"
26-
grpc-java = "1.74.0"
27-
guava = "33.4.8-jre"
26+
grpc-java = "1.77.0"
27+
guava = "33.5.0-jre"
2828
guava-failureaccess = "1.0.1"
29-
hamcrest-library = "2.2"
29+
hamcrest-library = "3.0"
3030
hibernate-validator6 = "6.2.5.Final"
31-
hibernate-validator8 = "8.0.1.Final"
32-
jackson = "2.19.2"
31+
hibernate-validator8 = "8.0.3.Final"
32+
jackson = "2.20.1"
3333
javassist = "3.30.2-GA"
3434
javax-annotation = "1.3.2"
3535
javax-inject = "1"
@@ -40,33 +40,34 @@ jetty-alpn-agent = "2.0.10"
4040
# JGit 7.x.x requires Java 17
4141
jgit6 = "6.10.0.202406032230-r"
4242
junit4 = "4.13.2"
43-
junit5 = "5.13.4"
43+
junit5 = "5.14.1"
4444
junit-pioneer = "2.3.0"
4545
jsch = "0.1.55"
4646
# Don't update `json-path` version
4747
json-path = "2.2.0"
4848
# 3.0.0 requires java 17
4949
json-unit = "2.38.0"
50-
jsoup = "1.21.1" # JSoup is only used for Gradle script.
50+
jsoup = "1.21.2" # JSoup is only used for Gradle script.
5151
jmh-core = "1.37"
5252
jmh-gradle-plugin = "0.7.3"
5353
jxr = "0.2.1"
54-
kubernetes-client = "7.3.1"
54+
kubernetes-client = "7.4.0"
5555
logback15 = "1.5.7"
56-
micrometer = "1.15.2"
57-
mina-sshd = "2.15.0"
58-
mockito = "5.18.0"
59-
nimbus-jose-jwt = "10.5"
56+
micrometer = "1.16.0"
57+
mina-sshd = "2.16.0"
58+
mockito = "5.20.0"
59+
nimbus-jose-jwt = "10.6"
6060
nexus-publish-plugin = "2.0.0"
6161
node-gradle-plugin = "7.1.0"
6262
osdetector = "1.7.3"
63-
owasp = "1.3.1"
63+
owasp = "1.4.0"
6464
proguard = "7.4.2"
65-
protobuf = "3.25.5"
65+
protobuf = "3.25.8"
6666
protobuf-gradle-plugin = "0.9.5"
67-
quartz = "2.3.2"
67+
protoc-gen-validate = "1.2.1"
68+
quartz = "2.5.1"
6869
reflections = "0.9.11"
69-
rocksdb = "10.2.1"
70+
rocksdb = "10.4.2"
7071
shadow-gradle-plugin = "8.3.9"
7172
# Don't update `shiro` version
7273
shiro = "1.3.2"
@@ -76,15 +77,15 @@ slf4j2 = "2.0.17"
7677
snappy = "1.1.10.5"
7778
sphinx = "2.10.1"
7879
spring-boot2 = "2.7.18"
79-
spring-boot3 = "3.5.4"
80+
spring-boot3 = "3.5.8"
8081
spring-test-junit5 = "1.5.0"
8182
testcontainers = "1.21.3"
8283
thrift09 = { strictly = "0.9.3-1" }
8384
# Ensure that we use the same ZooKeeper version as what Curator depends on.
8485
# See: https://github.com/apache/curator/blob/master/pom.xml
8586
# (Switch to the right tag to find out the right version.)
8687
zookeeper = "3.9.3"
87-
zstd = "1.5.7-4"
88+
zstd = "1.5.7-6"
8889

8990
[boms]
9091
armeria = { module = "com.linecorp.armeria:armeria-bom", version.ref = "armeria" }
@@ -109,6 +110,8 @@ module = "com.linecorp.armeria:armeria-saml"
109110
module = "com.linecorp.armeria:armeria-thrift0.9"
110111
[libraries.armeria-xds]
111112
module = "com.linecorp.armeria:armeria-xds"
113+
[libraries.armeria-xds-api]
114+
module = "com.linecorp.armeria:armeria-xds-api"
112115

113116
[libraries.assertj]
114117
module = "org.assertj:assertj-core"
@@ -378,6 +381,9 @@ version.ref = "protobuf"
378381
[libraries.protobuf-gradle-plugin]
379382
module = "com.google.protobuf:protobuf-gradle-plugin"
380383
version.ref = "protobuf-gradle-plugin"
384+
[libraries.pgv-java-stub]
385+
module = "build.buf.protoc-gen-validate:pgv-java-stub"
386+
version.ref = "protoc-gen-validate"
381387

382388
[libraries.quartz]
383389
module = "org.quartz-scheduler:quartz"

server/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ dependencies {
4141
implementation libs.micrometer.core
4242
implementation libs.micrometer.prometheus
4343

44-
implementation libs.rocksdbjni
44+
if (OperatingSystem.current().isWindows()) {
45+
implementation(variantOf(libs.rocksdbjni) { classifier('win64') })
46+
} else if (OperatingSystem.current().isMacOsX()) {
47+
implementation(variantOf(libs.rocksdbjni) { classifier('osx') })
48+
} else {
49+
implementation(variantOf(libs.rocksdbjni) { classifier('linux64') })
50+
}
4551

4652
// Quartz
4753
implementation libs.quartz

xds/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ dependencies {
55
implementation libs.kubernetes.client.impl
66

77
implementation libs.armeria.grpc
8-
implementation libs.controlplane.api
98
implementation libs.controlplane.cache
109
implementation libs.controlplane.server
1110

1211
implementation libs.reflections
1312

1413
testImplementation libs.armeria.junit5
15-
testImplementation libs.armeria.xds
14+
testImplementation (libs.armeria.xds) {
15+
exclude group: 'com.linecorp.armeria', module: 'armeria-xds-api'
16+
}
1617
testImplementation libs.kubernetes.server.mock
1718
testImplementation libs.kubernetes.junit.jupiter
1819
testImplementation libs.logback15

xds/src/test/java/com/linecorp/centraldogma/xds/internal/CdsStreamingMultipleClientsTest.java

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ void updateClusterRootWithCorrespondingResource() throws Exception {
7676

7777
final ClusterLoadAssignment fooEndpoint = loadAssignment(fooClusterName, "127.0.0.1", 8080);
7878
createEndpoint(fooGroupName, fooClusterId, fooEndpoint, webClient);
79-
Cluster fooCluster = cluster(fooClusterName, 1);
79+
final Cluster fooCluster = cluster(fooClusterName, 1);
8080
createCluster(fooGroupName, fooClusterId, fooCluster, webClient);
8181

82-
await().until(() -> fooSnapshotCaptor.get() != null);
83-
ClusterSnapshot fooClusterSnapshot = fooSnapshotCaptor.getAndSet(null);
84-
assertThat(fooClusterSnapshot.xdsResource().resource()).isEqualTo(fooCluster);
85-
assertThat(fooClusterSnapshot.endpointSnapshot().xdsResource().resource()).isEqualTo(fooEndpoint);
82+
await().untilAsserted(() -> {
83+
final ClusterSnapshot fooClusterSnapshot = fooSnapshotCaptor.get();
84+
assertThat(fooClusterSnapshot.xdsResource().resource()).isEqualTo(fooCluster);
85+
assertThat(fooClusterSnapshot.endpointSnapshot().xdsResource().resource()).isEqualTo(fooEndpoint);
86+
});
8687

8788
// bar is not updated.
8889
await().pollDelay(200, TimeUnit.MILLISECONDS).until(() -> barSnapshotCaptor.get() == null);
@@ -91,24 +92,20 @@ void updateClusterRootWithCorrespondingResource() throws Exception {
9192
createEndpoint(barGroupName, barClusterId, barEndpoint, webClient);
9293
final Cluster barCluster = cluster(barClusterName, 1);
9394
createCluster(barGroupName, barClusterId, barCluster, webClient);
94-
await().until(() -> barSnapshotCaptor.get() != null);
95-
final ClusterSnapshot barClusterSnapshot = barSnapshotCaptor.getAndSet(null);
96-
assertThat(barClusterSnapshot.xdsResource().resource()).isEqualTo(barCluster);
97-
assertThat(barClusterSnapshot.endpointSnapshot().xdsResource().resource()).isEqualTo(barEndpoint);
98-
99-
// foo is not updated.
100-
await().pollDelay(200, TimeUnit.MILLISECONDS).until(() -> fooSnapshotCaptor.get() == null);
95+
await().untilAsserted(() -> {
96+
final ClusterSnapshot barClusterSnapshot = barSnapshotCaptor.get();
97+
assertThat(barClusterSnapshot.xdsResource().resource()).isEqualTo(barCluster);
98+
assertThat(barClusterSnapshot.endpointSnapshot().xdsResource().resource()).isEqualTo(barEndpoint);
99+
});
101100

102101
// Change the configuration.
103-
fooCluster = cluster(fooClusterName, 2);
104-
updateCluster(fooGroupName, fooClusterId, fooCluster, webClient);
105-
await().until(() -> fooSnapshotCaptor.get() != null);
106-
fooClusterSnapshot = fooSnapshotCaptor.getAndSet(null);
107-
assertThat(fooClusterSnapshot.xdsResource().resource()).isEqualTo(fooCluster);
108-
assertThat(fooClusterSnapshot.endpointSnapshot().xdsResource().resource()).isEqualTo(fooEndpoint);
109-
110-
// bar is not updated.
111-
await().pollDelay(200, TimeUnit.MILLISECONDS).until(() -> barSnapshotCaptor.get() == null);
102+
final Cluster fooCluster2 = cluster(fooClusterName, 2);
103+
updateCluster(fooGroupName, fooClusterId, fooCluster2, webClient);
104+
await().untilAsserted(() -> {
105+
final ClusterSnapshot clusterSnapshot = fooSnapshotCaptor.get();
106+
assertThat(clusterSnapshot.xdsResource().resource()).isEqualTo(fooCluster2);
107+
assertThat(clusterSnapshot.endpointSnapshot().xdsResource().resource()).isEqualTo(fooEndpoint);
108+
});
112109
}
113110
}
114111
}

xds/src/test/java/com/linecorp/centraldogma/xds/internal/LdsStreamingMultipleClientsTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ void updateListenerRootWithCorrespondingResource() throws Exception {
122122
await().until(() -> fooSnapshotCaptor.get() != null);
123123
fooListenerSnapshot = fooSnapshotCaptor.getAndSet(null);
124124
assertThat(fooListenerSnapshot.xdsResource().resource()).isEqualTo(fooListener);
125-
126-
// bar is not updated.
127-
await().pollDelay(200, TimeUnit.MILLISECONDS).until(() -> barSnapshotCaptor.get() == null);
128125
}
129126
}
130127
}

0 commit comments

Comments
 (0)