Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies for 1.28.0 #5584

Merged
merged 5 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ allprojects {
}

// Require to use JDK 19 when releasing.
tasks.closeAndReleaseStagingRepository.doFirst {
tasks.closeAndReleaseStagingRepositories.doFirst {
if (JavaVersion.current() != JavaVersion.VERSION_19) {
throw new IllegalStateException("You must release using JDK 19.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import com.linecorp.armeria.common.util.Exceptions;
import com.linecorp.armeria.internal.client.dns.DefaultDnsResolver;
import com.linecorp.armeria.internal.client.dns.DnsQuestionWithoutTrailingDot;
import com.linecorp.armeria.internal.client.dns.DnsUtil;

import io.netty.channel.EventLoop;
import io.netty.handler.codec.dns.DnsQuestion;
Expand Down Expand Up @@ -298,7 +299,7 @@ final class CacheEntry {
// because Netty can change the behavior while we are not noticing that.
// So sending a PR to upstream would be the best solution.
final UnknownHostException unknownHostException = (UnknownHostException) cause;
cacheable = unknownHostException.getCause() == null;
cacheable = !DnsUtil.isDnsQueryTimedOut(unknownHostException.getCause());

if (cacheable) {
negativeCacheFuture = executor().schedule(() -> addressResolverCache.invalidate(hostname),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import io.netty.channel.EventLoop;
import io.netty.handler.codec.dns.DnsRecord;
import io.netty.handler.codec.dns.DnsRecordType;
import io.netty.resolver.dns.DnsErrorCauseException;
import io.netty.resolver.dns.DnsNameResolver;
import io.netty.resolver.dns.DnsNameResolverBuilder;
import io.netty.resolver.dns.DnsNameResolverTimeoutException;
Expand Down Expand Up @@ -132,6 +133,9 @@ public static long defaultDnsQueryTimeoutMillis() {

public static boolean isDnsQueryTimedOut(Throwable cause) {
final Throwable rootCause = Throwables.getRootCause(cause);
if (rootCause instanceof DnsErrorCauseException) {
return false;
}
if (rootCause instanceof DnsTimeoutException ||
rootCause instanceof DnsNameResolverTimeoutException) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static io.netty.handler.codec.dns.DnsRecordType.A;
import static io.netty.handler.codec.dns.DnsRecordType.AAAA;
import static io.netty.handler.codec.dns.DnsRecordType.CNAME;
import static io.netty.handler.codec.dns.DnsRecordType.SRV;
import static io.netty.handler.codec.dns.DnsSection.ANSWER;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
Expand Down Expand Up @@ -209,12 +208,14 @@ void nxDomain() {
"cause=others,name=bar.com.,result=failure}";

assertThatThrownBy(() -> client.get("http://bar.com").aggregate().join())
.hasRootCauseInstanceOf(UnknownHostException.class);
.cause()
.isInstanceOf(UnprocessedRequestException.class)
.hasCauseInstanceOf(UnknownHostException.class);

await().untilAsserted(() -> {
assertThat(MoreMeters.measureAll(meterRegistry))
.containsEntry(writtenMeterId, 2.0)
.containsEntry(nxDomainMeterId, 2.0)
.containsEntry(writtenMeterId, 1.0)
.containsEntry(nxDomainMeterId, 1.0)
.doesNotContainKey(otherExceptionId);
});
}
Expand Down Expand Up @@ -254,23 +255,21 @@ void noAnswer() {
getHostAddress(server) + '}';
final String noAnswerMeterId =
"armeria.client.dns.queries.noanswer#count{code=10,name=bar.com.}";
final String nxDomainMeterId =
"armeria.client.dns.queries#count{" +
"cause=nx_domain,name=bar.com.,result=failure}";
final String otherExceptionId =
"armeria.client.dns.queries#count{" +
"cause=others,name=bar.com.,result=failure}";
assertThat(MoreMeters.measureAll(meterRegistry)).doesNotContainKeys(
writtenMeterId, noAnswerMeterId, nxDomainMeterId, nxDomainMeterId);
writtenMeterId, noAnswerMeterId);

assertThatThrownBy(() -> client.get("http://bar.com").aggregate().join())
.hasRootCauseInstanceOf(UnknownHostException.class);
.cause()
.isInstanceOf(UnprocessedRequestException.class)
.hasCauseInstanceOf(UnknownHostException.class);

await().untilAsserted(() -> {
assertThat(MoreMeters.measureAll(meterRegistry))
.containsEntry(writtenMeterId, 2.0)
.containsEntry(writtenMeterId, 1.0)
.containsEntry(noAnswerMeterId, 1.0)
.containsEntry(nxDomainMeterId, 1.0)
.doesNotContainKey(otherExceptionId);
});
}
Expand Down Expand Up @@ -391,13 +390,4 @@ static DnsRecord newCnameRecord(String name, String actualName) {
DnsNameEncoder.encodeName(actualName, content);
return new DefaultDnsRawRecord(name, CNAME, 60, content);
}

static DnsRecord newSrvRecord(String hostname, int weight, int port, String target) {
final ByteBuf content = Unpooled.buffer();
content.writeShort(1); // priority unused
content.writeShort(weight);
content.writeShort(port);
DnsNameEncoder.encodeName(target, content);
return new DefaultDnsRawRecord(hostname, SRV, 60, content);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
import io.netty.handler.codec.dns.DnsSection;
import io.netty.resolver.AddressResolver;
import io.netty.resolver.ResolvedAddressTypes;
import io.netty.resolver.dns.DnsErrorCauseException;
import io.netty.resolver.dns.DnsServerAddressStreamProvider;
import io.netty.resolver.dns.DnsServerAddresses;
import io.netty.util.NetUtil;
Expand Down Expand Up @@ -281,7 +282,7 @@ void negativeTtl() {
InetSocketAddress.createUnresolved("foo.com", 36462));
await().until(future2::isDone);
assertThat(future2.cause()).isInstanceOf(UnknownHostException.class)
.hasNoCause();
.hasCauseInstanceOf(DnsErrorCauseException.class);
// Because it is NXDOMAIN, the result is cached.
assertThat(cache.estimatedSize()).isOne();
}
Expand Down
114 changes: 57 additions & 57 deletions dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,68 @@
akka = "2.6.20"
akka-http-cors = "1.0.0"
akka-grpc-runtime = "1.0.3"
apache-httpclient5 = "5.3"
apache-httpclient5 = "5.3.1"
apache-httpclient4 = "4.5.14"
asm = "9.6"
assertj = "3.25.2"
awaitility = "4.2.0"
asm = "9.7"
assertj = "3.25.3"
awaitility = "4.2.1"
blockhound = "1.0.8.RELEASE"
bouncycastle = "1.70"
brave5 = "5.18.1"
brave6 = "6.0.0"
brotli4j = "1.15.0"
brave6 = "6.0.2"
brotli4j = "1.16.0"
bucket4j = "7.6.0"
# Don"t upgrade Caffeine to 3.x that requires Java 11.
caffeine = "2.9.3"
cglib = "3.3.0"
checkerframework = "2.5.6"
checkstyle = "10.3.2"
controlplane = "1.0.42"
controlplane = "1.0.44"
curator = "5.6.0"
dagger = "2.50"
dgs = "8.2.2"
dagger = "2.51.1"
dgs = "8.5.3"
dropwizard1 = "1.3.29"
dropwizard2 = "2.1.10"
dropwizard-metrics = "4.2.24"
errorprone = "2.24.1"
dropwizard2 = "2.1.12"
dropwizard-metrics = "4.2.25"
errorprone = "2.26.1"
errorprone-gradle-plugin = "3.1.0"
eureka = "2.0.1"
fastutil = "8.5.12"
eureka = "2.0.2"
fastutil = "8.5.13"
finagle = "23.11.0"
findbugs = "3.0.2"
futures-completable = "0.3.6"
futures-extra = "4.3.3"
gax-grpc = "2.40.0"
gax-grpc = "2.46.1"
# Don"t upgrade graphql-java to 21.0 that requires Java 11
graphql-java = "20.4"
graphql-kotlin = "7.0.2"
grpc-java = "1.61.0"
grpc-java = "1.63.0"
grpc-kotlin = "1.4.1"
guava = "33.0.0-jre"
guava = "33.1.0-jre"
hamcrest = "2.2"
hbase = "1.2.6"
hibernate-validator6 = "6.2.5.Final"
hibernate-validator8 = "8.0.1.Final"
j2objc = "2.8"
jackson = "2.16.1"
j2objc = "3.0.0"
jackson = "2.17.0"
jakarta-inject = "2.0.1"
jakarta-validation = "3.0.2"
jakarta-websocket = "2.1.1"
java-websocket = "1.5.5"
java-websocket = "1.5.6"
javax-annotation = "1.3.2"
javax-inject = "1"
javax-jsr311 = "1.1.1"
javax-validation = "2.0.1.Final"
jctools = "4.0.2"
jctools = "4.0.3"
# Find the latest version of the major 10 https://central.sonatype.com/artifact/org.eclipse.jetty/jetty-server/
jetty10 = "10.0.19"
jetty10 = "10.0.20"
# Find the latest version of the major 10 https://central.sonatype.com/artifact/org.eclipse.jetty/apache-jstl/
jetty10-jstl = "10.0.19"
jetty11 = "11.0.19"
jetty10-jstl = "10.0.20"
jetty11 = "11.0.20"
jetty11-jstl = "11.0.0"
jetty12 = "12.0.5"
jetty12 = "12.0.8"
jetty93 = "9.3.30.v20211001"
jetty94 = "9.4.52.v20230823"
jetty94 = "9.4.54.v20240208"
jetty-alpn-api = "1.1.3.v20160715"
jkube = "1.15.0"
jmh-core = "1.37"
Expand All @@ -73,31 +73,31 @@ joor = "0.9.15"
json-unit = "2.38.0"
jsoup = "1.17.2"
junit4 = "4.13.2"
junit5 = "5.10.1"
junit5 = "5.10.2"
# Don't upgrade junit-pioneer to 2.x.x that requires Java 11
junit-pioneer = "1.9.1"
jwt = "4.4.0"
kafka = "3.6.1"
kotlin = "1.9.22"
kotlin-coroutine = "1.7.3"
krotodc = "1.0.6"
kafka = "3.7.0"
kotlin = "1.9.23"
kotlin-coroutine = "1.8.0"
krotodc = "1.1.1"
ktlint-gradle-plugin = "12.1.0"
kubernetes-client = "6.10.0"
kubernetes-client = "6.11.0"
logback12 = "1.2.13"
logback13 = "1.3.14"
logback14 = "1.4.14"
micrometer = "1.12.2"
micrometer-tracing = "1.2.2"
micrometer = "1.12.4"
micrometer-tracing = "1.2.4"
micrometer-docs-generator = "1.0.2"
micrometer13 = "1.3.20"
# Don't uprade mockito to 5.x.x that requires Java 11
mockito = "4.11.0"
monix = "3.4.1"
munit = "0.7.29"
netty = "4.1.106.Final"
netty-incubator-transport-native-io_uring = "0.0.24.Final"
nexus-publish = "1.3.0"
node-gradle-plugin = "7.0.1"
netty = "4.1.108.Final"
netty-incubator-transport-native-io_uring = "0.0.25.Final"
nexus-publish = "2.0.0"
node-gradle-plugin = "7.0.2"
okhttp2 = "2.7.5" # For testing
okhttp3 = { strictly = "3.14.9" } # Not just for testing. Used in the Retrofit mudule.
okhttp4 = "4.12.0" # For testing
Expand All @@ -109,44 +109,46 @@ picocli = "4.7.5"
proguard = "7.3.1"
prometheus = "0.16.0"
# Ensure that we use the same Protobuf version as what gRPC depends on.
# See: https://github.com/grpc/grpc-java/blob/master/build.gradle
# See: https://github.com/grpc/grpc-java/blob/master/gradle/libs.versions.toml
# (Switch to the right tag and look for "protobuf".)
# e.g. https://github.com/grpc/grpc-java/blob/v1.48.0/gradle/libs.versions.toml
protobuf = "3.25.1"
protobuf-gradle-plugin = "0.8.19"
protobuf-jackson = "2.2.0"
protobuf-jackson = "2.5.0"
reactive-grpc = "1.2.4"
reactive-streams = "1.0.4"
reactor = "3.6.2"
reactor = "3.6.4"
reactor-kotlin = "1.2.2"
# Upgrade once https://github.com/ronmamo/reflections/issues/279 is fixed.
reflections = "0.9.11"
resilience4j = "2.2.0"
resteasy = "5.0.7.Final"
resteasy = "5.0.9.Final"
# "provided" dependency required by RESTEasy "resteasy-core-spi"
# jboss 3.5.0 requires at least jdk 11
resteasy-jboss-logging = "3.4.3.Final"
resteasy-jboss-logging-annotations = "2.2.1.Final"
retrofit2 = "2.9.0"
retrofit2 = "2.11.0"
rxjava2 = "2.2.21"
rxjava3 = "3.1.8"
sangria = "4.0.2"
sangria = "4.1.0"
sangria-slowlog = "3.0.0"
scala-collection-compat = "2.11.0"
scala-java8-compat = "1.0.2"
scala212 = "2.12.18"
scala213 = "2.13.12"
scala3 = "3.3.0"
scala212 = "2.12.19"
scala213 = "2.13.13"
scala3 = "3.4.1"
scalafmt-gradle-plugin = "1.16.2"
scalapb = "0.11.15"
scalapb-json = "0.12.1"
shadow-gradle-plugin = "7.1.2"
shibboleth-utilities = "7.5.2"
snappy = "1.1.10.5"
slf4j = "1.7.36"
slf4j2 = "2.0.11"
spring6 = "6.1.3"
slf4j2 = "2.0.12"
spring6 = "6.1.5"
spring-boot2 = "2.7.18"
spring-boot3 = "3.2.2"
testcontainers = "1.19.3"
spring-boot3 = "3.2.4"
testcontainers = "1.19.7"
thrift09 = { strictly = "0.9.3-1" }
thrift012 = { strictly = "0.12.0" }
thrift013 = { strictly = "0.13.0" }
Expand All @@ -155,14 +157,14 @@ thrift015 = { strictly = "0.15.0" }
thrift016 = { strictly = "0.16.0" }
thrift017 = { strictly = "0.17.0" }
thrift018 = { strictly = "0.18.1" }
tomcat8 = "8.5.98"
tomcat9 = "9.0.85"
tomcat10 = "10.1.18"
tomcat8 = "8.5.100"
tomcat9 = "9.0.87"
tomcat10 = "10.1.20"
xml-apis = "1.4.01"
# 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.)
zookeeper = "3.9.1"
zookeeper = "3.9.2"
zookeeper-junit = "1.2"

[boms]
Expand Down Expand Up @@ -1006,8 +1008,6 @@ version.ref = "resteasy"
[libraries.resteasy-jackson2-provider]
module = "org.jboss.resteasy:resteasy-jackson2-provider"
version.ref = "resteasy"
# "provided" dependency required by RESTEasy "resteasy-core-spi"
# jboss 3.5.0 requires at least jdk 11
[libraries.resteasy-jboss-logging]
module = "org.jboss.logging:jboss-logging"
version.ref = "resteasy-jboss-logging"
Expand Down
1 change: 1 addition & 0 deletions examples/grpc-krotodc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(libs.kotlin.coroutines.core)
implementation(libs.grpc.kotlin)
implementation(libs.protobuf.java.util)

testImplementation(project(":junit5"))
testImplementation(libs.javax.annotation)
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading
Loading