Skip to content

Commit

Permalink
Update dependencies (#1065)
Browse files Browse the repository at this point in the history
### Dependencies

- Armeria 1.30.1 -> 1.31.2
- BouncyCastle 1.78.1 -> 1.79
- java-control-plane 1.0.45 → 1.0.46
- dropwizard-metrics 4.2.26 → 4.2.28
- Java gRPC 1.65.1 → 1.68.1
- Guava 33.2.1-jre → 33.3.1-jre
- Jackson 2.17.2 → 2.18.1
- Fabric8 Kubernetes Client 6.12.1 → 6.13.4
- Micrometer 1.13.3 → 1.13.6
- Protobuf 3.25.1 → 3.25.5
- Spring Boot 3.3.2 → 3.3.5

### Dev Dependencies

- junit5 5.11.0 → 5.11.3
- node-gradle-plugin 7.0.2 → 7.1.0
- testcontainers 1.20.1 → 1.20.3
  • Loading branch information
minwoox authored Dec 4, 2024
1 parent f01f9d3 commit 9e275c7
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 22 deletions.
30 changes: 15 additions & 15 deletions dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# If its classes are exposed in Javadoc, update offline links as well.
#
[versions]
armeria = "1.30.1"
armeria = "1.31.2"
assertj = "3.26.3"
awaitility = "4.2.2"
bouncycastle = "1.78.1"
bouncycastle = "1.79"
# Don"t upgrade Caffeine to 3.x that requires Java 11.
caffeine = "2.9.3"
checkstyle = "10.3.3"
controlplane = "1.0.45"
controlplane = "1.0.46"
# Ensure that we use the same ZooKeeper version as what Curator depends on.
# See: https://github.com/apache/curator/blob/master/pom.xml
# (Switch to the right tag to find out the right version.)
Expand All @@ -20,17 +20,17 @@ cron-utils = "9.2.0"
diffutils = "1.3.0"
docker = "9.4.0"
download = "5.6.0"
dropwizard-metrics = "4.2.26"
dropwizard-metrics = "4.2.28"
eddsa = "0.3.0"
findbugs = "3.0.2"
futures-completable = "0.3.6"
grpc-java = "1.66.0"
guava = "33.2.1-jre"
grpc-java = "1.68.1"
guava = "33.3.1-jre"
guava-failureaccess = "1.0.1"
hamcrest-library = "2.2"
hibernate-validator6 = "6.2.5.Final"
hibernate-validator8 = "8.0.1.Final"
jackson = "2.17.2"
jackson = "2.18.1"
javassist = "3.30.2-GA"
javax-annotation = "1.3.2"
javax-inject = "1"
Expand All @@ -41,7 +41,7 @@ jetty-alpn-agent = "2.0.10"
jgit = "5.13.3.202401111512-r"
jgit6 = "6.10.0.202406032230-r"
junit4 = "4.13.2"
junit5 = "5.11.0"
junit5 = "5.11.3"
# Don't upgrade junit-pioneer to 2.x.x that requires Java 11
junit-pioneer = "1.9.1"
jsch = "0.1.55"
Expand All @@ -53,19 +53,19 @@ jsoup = "1.18.1" # JSoup is only used for Gradle script.
jmh-core = "1.37"
jmh-gradle-plugin = "0.7.2"
jxr = "0.2.1"
kubernetes-client = "6.12.1"
kubernetes-client = "6.13.4"
logback12 = { strictly = "1.2.13" }
logback15 = { strictly = "1.5.7" }
logback = "1.2.13"
micrometer = "1.13.3"
mina-sshd = "2.13.2"
micrometer = "1.13.6"
mina-sshd = "2.14.0"
# Don't uprade mockito to 5.x.x that requires Java 11
mockito = "4.11.0"
nexus-publish-plugin = "2.0.0"
node-gradle-plugin = "7.0.2"
node-gradle-plugin = "7.1.0"
osdetector = "1.7.3"
proguard = "7.4.2"
protobuf = "3.25.1"
protobuf = "3.25.5"
protobuf-gradle-plugin = "0.8.19"
quartz = "2.3.2"
reflections = "0.9.11"
Expand All @@ -79,9 +79,9 @@ slf4j2 = { strictly = "2.0.16" }
snappy = "1.1.10.5"
sphinx = "2.10.1"
spring-boot2 = "2.7.18"
spring-boot3 = "3.3.2"
spring-boot3 = "3.3.5"
spring-test-junit5 = "1.5.0"
testcontainers = "1.20.1"
testcontainers = "1.20.3"
thrift09 = { strictly = "0.9.3-1" }
# Ensure that we use the same ZooKeeper version as what Curator depends on.
# See: https://github.com/apache/curator/blob/master/pom.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,17 @@ static void setup() {
final Map<String, String> selector = ImmutableMap.of("app1", "nginx1");
final Deployment deployment = newDeployment("deployment1", selector);
final Service service = newService("service1", selector);
createResources(nodes, deployment, service);
createResources(nodes, deployment, service, true);

final List<Node> nodes2 = ImmutableList.of(newNode("3.3.3.3"), newNode("4.4.4.4"));
final Map<String, String> selector2 = ImmutableMap.of("app2", "nginx2");
final Deployment deployment2 = newDeployment("deployment2", selector2);
final Service service2 = newService("service2", selector2);
createResources(nodes2, deployment2, service2);
createResources(nodes2, deployment2, service2, true);
}

private static void createResources(List<Node> nodes, Deployment deployment, Service service) {
private static void createResources(List<Node> nodes, Deployment deployment, Service service,
boolean create) {
final List<Pod> pods = nodes.stream()
.map(node -> node.getMetadata().getName())
.map(nodeName -> newPod(deployment.getSpec().getTemplate(), nodeName))
Expand All @@ -101,7 +102,11 @@ private static void createResources(List<Node> nodes, Deployment deployment, Ser
client.pods().resource(pods.get(0)).create();
client.pods().resource(pods.get(1)).create();
client.apps().deployments().resource(deployment).create();
client.services().resource(service).create();
if (create) {
client.services().resource(service).create();
} else {
client.services().resource(service).update();
}
}

@Test
Expand Down Expand Up @@ -181,17 +186,84 @@ void aggregateMultipleKubernetes() throws IOException {
" } ]" +
'}'
);
// Change service2
final List<Node> nodes = ImmutableList.of(newNode("5.5.5.5"), newNode("6.6.6.6"));
final Map<String, String> selector = ImmutableMap.of("app3", "nginx3");
final Deployment deployment = newDeployment("deployment3", selector);
final Service service2 = newService("service2", selector);
createResources(nodes, deployment, service2, false);

await().until(() -> fooGroup.normalizeNow(Revision.HEAD).equals(
endpointEntry.revision().forward(1)));
final Entry<JsonNode> endpointEntry1 = fooGroup.getOrNull(Revision.HEAD, Query.ofJson(
K8S_ENDPOINTS_DIRECTORY + aggregatorId + ".json")).join();
assertThatJson(endpointEntry1.content()).isEqualTo(
'{' +
" \"clusterName\": \"groups/foo/k8s/clusters/foo-k8s-cluster/1\"," +
" \"endpoints\": [ {" +
" \"locality\": {" +
" \"zone\": \"zone1\"" +
" }," +
" \"lbEndpoints\": [ {" +
" \"endpoint\": {" +
" \"address\": {" +
" \"socketAddress\": {" +
" \"address\": \"1.1.1.1\"," +
" \"portValue\": 30000" +
" }" +
" }" +
" }" +
" }, {" +
" \"endpoint\": {" +
" \"address\": {" +
" \"socketAddress\": {" +
" \"address\": \"2.2.2.2\"," +
" \"portValue\": 30000" +
" }" +
" }" +
" }" +
" } ]" +
" }, {" +
" \"locality\": {" +
" \"zone\": \"zone2\"" +
" }," +
" \"lbEndpoints\": [ {" +
" \"endpoint\": {" +
" \"address\": {" +
" \"socketAddress\": {" +
" \"address\": \"5.5.5.5\"," +
" \"portValue\": 30000" +
" }" +
" }" +
" }" +
" }, {" +
" \"endpoint\": {" +
" \"address\": {" +
" \"socketAddress\": {" +
" \"address\": \"6.6.6.6\"," +
" \"portValue\": 30000" +
" }" +
" }" +
" }" +
" } ]," +
" \"loadBalancingWeight\": 10," +
" \"priority\": 1" +
" } ]" +
'}'
);

// Remove service2
final KubernetesEndpointAggregator aggregator1 =
aggregator.toBuilder().removeLocalityLbEndpoints(1).build();
final AggregatedHttpResponse response1 =
updateAggregator(aggregator1, aggregatorId, dogma.httpClient());
assertOk(response1);
await().until(() -> fooGroup.normalizeNow(Revision.HEAD).equals(
endpointEntry.revision().forward(2))); // 2 because of the aggregator update and endpoint update
final Entry<JsonNode> endpointEntry1 = fooGroup.getOrNull(Revision.HEAD, Query.ofJson(
// 1 + 2 because of the aggregator update and endpoint update
endpointEntry.revision().forward(3)));
final Entry<JsonNode> endpointEntry2 = fooGroup.getOrNull(Revision.HEAD, Query.ofJson(
K8S_ENDPOINTS_DIRECTORY + aggregatorId + ".json")).join();
assertThatJson(endpointEntry1.content()).isEqualTo(
assertThatJson(endpointEntry2.content()).isEqualTo(
'{' +
" \"clusterName\": \"groups/foo/k8s/clusters/foo-k8s-cluster/1\"," +
" \"endpoints\": [ {" +
Expand Down

0 comments on commit 9e275c7

Please sign in to comment.