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

Update to Vert.x 4.2.1 and related projects #21195

Merged
merged 3 commits into from
Nov 5, 2021
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
8 changes: 4 additions & 4 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<opentelemetry.version>1.7.0</opentelemetry.version>
<opentelemetry-alpha.version>1.7.0-alpha</opentelemetry-alpha.version>
<jaeger.version>1.6.0</jaeger.version>
<quarkus-http.version>4.1.3</quarkus-http.version>
<quarkus-http.version>4.1.4</quarkus-http.version>
<micrometer.version>1.7.5</micrometer.version>
<google-auth.version>0.22.0</google-auth.version>
<microprofile-config-api.version>2.0</microprofile-config-api.version>
Expand All @@ -53,9 +53,9 @@
<smallrye-context-propagation.version>1.2.2</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>2.6.0</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>2.14.1</smallrye-mutiny-vertx-binding.version>
<smallrye-mutiny-vertx-binding.version>2.15.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>3.10.1</smallrye-reactive-messaging.version>
<smallrye-stork.version>1.0.0.Alpha7</smallrye-stork.version>
<smallrye-stork.version>1.0.0.Beta1</smallrye-stork.version>
<jakarta.activation.version>1.2.1</jakarta.activation.version>
<jakarta.annotation-api.version>1.3.5</jakarta.annotation-api.version>
<jakarta.el-impl.version>3.0.4</jakarta.el-impl.version>
Expand Down Expand Up @@ -108,7 +108,7 @@
<wildfly-elytron.version>1.17.2.Final</wildfly-elytron.version>
<jboss-modules.version>1.8.7.Final</jboss-modules.version>
<jboss-threads.version>3.4.2.Final</jboss-threads.version>
<vertx.version>4.1.5</vertx.version>
<vertx.version>4.2.1</vertx.version>
<httpclient.version>4.5.13</httpclient.version>
<httpcore.version>4.4.14</httpcore.version>
<httpasync.version>4.1.4</httpasync.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import io.quarkus.dev.spi.DevModeType;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.ProfileManager;
import io.quarkus.runtime.configuration.QuarkusConfigFactory;

/**
* The augmentation task that produces the application.
Expand Down Expand Up @@ -331,6 +332,7 @@ private BuildResult runAugment(boolean firstRun, Set<String> changedResources,
} finally {
ProfileManager.setRuntimeDefaultProfile(null);
Thread.currentThread().setContextClassLoader(old);
QuarkusConfigFactory.setConfig(null);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.quarkus.amazon.lambda.http.deployment;

import static io.vertx.core.file.impl.FileResolverImpl.CACHE_DIR_BASE_PROP_NAME;

import org.jboss.logging.Logger;

import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
Expand All @@ -20,7 +22,6 @@
import io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem;
import io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem;
import io.quarkus.vertx.http.deployment.RequireVirtualHttpBuildItem;
import io.vertx.core.file.impl.FileResolver;

public class AmazonLambdaHttpProcessor {
private static final Logger log = Logger.getLogger(AmazonLambdaHttpProcessor.class);
Expand Down Expand Up @@ -67,7 +68,7 @@ public void registerReflectionClasses(BuildProducer<ReflectiveClassBuildItem> re
*/
@BuildStep
void setTempDir(BuildProducer<SystemPropertyBuildItem> systemProperty) {
systemProperty.produce(new SystemPropertyBuildItem(FileResolver.CACHE_DIR_BASE_PROP_NAME, "/tmp/quarkus"));
systemProperty.produce(new SystemPropertyBuildItem(CACHE_DIR_BASE_PROP_NAME, "/tmp/quarkus"));
}

@BuildStep
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.quarkus.amazon.lambda.http.deployment;

import static io.vertx.core.file.impl.FileResolverImpl.CACHE_DIR_BASE_PROP_NAME;

import org.jboss.logging.Logger;

import io.quarkus.amazon.lambda.deployment.LambdaUtil;
Expand All @@ -25,7 +27,6 @@
import io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem;
import io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem;
import io.quarkus.vertx.http.deployment.RequireVirtualHttpBuildItem;
import io.vertx.core.file.impl.FileResolver;

public class AmazonLambdaHttpProcessor {
private static final Logger log = Logger.getLogger(AmazonLambdaHttpProcessor.class);
Expand Down Expand Up @@ -74,7 +75,7 @@ public void registerReflectionClasses(BuildProducer<ReflectiveClassBuildItem> re
*/
@BuildStep
void setTempDir(BuildProducer<SystemPropertyBuildItem> systemProperty) {
systemProperty.produce(new SystemPropertyBuildItem(FileResolver.CACHE_DIR_BASE_PROP_NAME, "/tmp/quarkus"));
systemProperty.produce(new SystemPropertyBuildItem(CACHE_DIR_BASE_PROP_NAME, "/tmp/quarkus"));
}

@BuildStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.sqlclient.Pool;
import io.vertx.sqlclient.PrepareOptions;
import io.vertx.sqlclient.PreparedQuery;
import io.vertx.sqlclient.Query;
import io.vertx.sqlclient.Row;
Expand All @@ -33,6 +34,11 @@ public PreparedQuery<RowSet<Row>> preparedQuery(String s) {
return null;
}

@Override
public PreparedQuery<RowSet<Row>> preparedQuery(String sql, PrepareOptions options) {
return null;
}

@Override
public Future<SqlConnection> getConnection() {
Promise<SqlConnection> promise = Promise.promise();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ public void registerRuntimeInitializedClasses(BuildProducer<RuntimeInitializedCl
producer.produce(new RuntimeInitializedClassBuildItem(BulkType.class.getName()));
// Classes using SplittableRandom, which need to be runtime initialized
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisSentinelClient"));
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisReplicationClient"));
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.Slots"));
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisClusterConnection"));
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisReplicationConnection"));
// RedisClusterConnections is referenced from RedisClusterClient. Thus, we need to runtime-init
// that too.
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisClusterClient"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ static RedisClient createClient(String name) {

Response lpop(String arg0);

Response lpop(List<String> args);

Response lpush(List<String> args);

Response lpushx(List<String> args);
Expand Down Expand Up @@ -244,6 +246,8 @@ static RedisClient createClient(String name) {

Response psync(String arg0, String arg1);

Response psync(List<String> args);

Response pttl(String arg0);

Response publish(String arg0, String arg1);
Expand Down Expand Up @@ -274,6 +278,8 @@ static RedisClient createClient(String name) {

Response rpop(String arg0);

Response rpop(List<String> args);

Response rpoplpush(String arg0, String arg1);

Response rpush(List<String> args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,12 @@ static ReactiveRedisClient createClient(String name) {

Uni<Response> lpop(String arg0);

Uni<Response> lpop(List<String> arg0);

Response lpopAndAwait(String arg0);

Response lpopAndAwait(List<String> arg0);

Uni<Response> lpush(List<String> args);

Response lpushAndAwait(List<String> args);
Expand Down Expand Up @@ -448,8 +452,12 @@ static ReactiveRedisClient createClient(String name) {

Uni<Response> psync(String arg0, String arg1);

Uni<Response> psync(List<String> args);

Response psyncAndAwait(String arg0, String arg1);

Response psyncAndAwait(List<String> args);

Uni<Response> pttl(String arg0);

Response pttlAndAwait(String arg0);
Expand Down Expand Up @@ -508,8 +516,12 @@ static ReactiveRedisClient createClient(String name) {

Uni<Response> rpop(String arg0);

Uni<Response> rpop(List<String> args);

Response rpopAndAwait(String arg0);

Response rpopAndAwait(List<String> args);

Uni<Response> rpoplpush(String arg0, String arg1);

Response rpoplpushAndAwait(String arg0, String arg1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,11 +751,21 @@ public Response lolwutAndAwait(List<String> args) {

@Override
public Uni<Response> lpop(String arg0) {
return redisAPI.lpop(List.of(arg0));
}

@Override
public Uni<Response> lpop(List<String> arg0) {
return redisAPI.lpop(arg0);
}

@Override
public Response lpopAndAwait(String arg0) {
return redisAPI.lpopAndAwait(List.of(arg0));
}

@Override
public Response lpopAndAwait(List<String> arg0) {
return redisAPI.lpopAndAwait(arg0);
}

Expand Down Expand Up @@ -1041,12 +1051,22 @@ public Response psubscribeAndAwait(List<String> args) {

@Override
public Uni<Response> psync(String arg0, String arg1) {
return redisAPI.psync(arg0, arg1);
return redisAPI.psync(List.of(arg0, arg1));
}

@Override
public Uni<Response> psync(List<String> args) {
return redisAPI.psync(args);
}

@Override
public Response psyncAndAwait(List<String> args) {
return redisAPI.psyncAndAwait(args);
}

@Override
public Response psyncAndAwait(String arg0, String arg1) {
return redisAPI.psyncAndAwait(arg0, arg1);
return redisAPI.psyncAndAwait(List.of(arg0, arg1));
}

@Override
Expand Down Expand Up @@ -1191,12 +1211,22 @@ public Response roleAndAwait() {

@Override
public Uni<Response> rpop(String arg0) {
return redisAPI.rpop(arg0);
return redisAPI.rpop(List.of(arg0));
}

@Override
public Uni<Response> rpop(List<String> args) {
return redisAPI.rpop(args);
}

@Override
public Response rpopAndAwait(List<String> args) {
return redisAPI.rpopAndAwait(args);
}

@Override
public Response rpopAndAwait(String arg0) {
return redisAPI.rpopAndAwait(arg0);
return redisAPI.rpopAndAwait(List.of(arg0));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,12 @@ public Response lolwut(List<String> args) {

@Override
public Response lpop(String arg0) {
return await(redisAPI.lpop(arg0));
return await(redisAPI.lpop(List.of(arg0)));
}

@Override
public Response lpop(List<String> args) {
return await(redisAPI.lpop(args));
}

@Override
Expand Down Expand Up @@ -534,7 +539,12 @@ public Response psubscribe(List<String> args) {

@Override
public Response psync(String arg0, String arg1) {
return await(redisAPI.psync(arg0, arg1));
return await(redisAPI.psync(List.of(arg0, arg1)));
}

@Override
public Response psync(List<String> args) {
return await(redisAPI.psync(args));
}

@Override
Expand Down Expand Up @@ -609,7 +619,12 @@ public Response role() {

@Override
public Response rpop(String arg0) {
return await(redisAPI.rpop(arg0));
return await(redisAPI.rpop(List.of(arg0)));
}

@Override
public Response rpop(List<String> args) {
return await(redisAPI.rpop(args));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Handler<RoutingContext> handler() {
return new Handler<RoutingContext>() {
@Override
public void handle(RoutingContext event) {
if (event.normalisedPath().length() == (event.currentRoute().getPath().length()
if (event.normalizedPath().length() == (event.currentRoute().getPath().length()
+ (event.mountPoint() == null ? 0 : event.mountPoint().length() - 1))) {
event.response().setStatusCode(302);
event.response().headers().set(HttpHeaders.LOCATION, (event.mountPoint() == null ? "" : event.mountPoint())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.quarkus.vertx.http.runtime;

import java.util.Map;
import java.util.Set;

import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
Expand Down Expand Up @@ -143,6 +144,7 @@ public SocketAddress localAddress() {
}

@Override
@Deprecated
public X509Certificate[] peerCertificateChain() throws SSLPeerUnverifiedException {
return delegate.peerCertificateChain();
}
Expand Down Expand Up @@ -243,10 +245,36 @@ public int cookieCount() {
}

@Override
@Deprecated
public Map<String, Cookie> cookieMap() {
return delegate.cookieMap();
}

@Override
public String getParam(String paramName, String defaultValue) {
return delegate.getParam(paramName, defaultValue);
}

@Override
public int streamId() {
return delegate.streamId();
}

@Override
public Cookie getCookie(String name, String domain, String path) {
return delegate.getCookie(name, domain, path);
}

@Override
public Set<Cookie> cookies(String name) {
return delegate.cookies(name);
}

@Override
public Set<Cookie> cookies() {
return delegate.cookies();
}

@Override
public HttpServerRequest body(Handler<AsyncResult<Buffer>> handler) {
return delegate.body(handler);
Expand Down
Loading