Skip to content

Commit

Permalink
Merge pull request #46210 from gsmet/3.18.3-backports-1
Browse files Browse the repository at this point in the history
[3.18] 3.18.3 backports 1
  • Loading branch information
gsmet authored Feb 12, 2025
2 parents be39917 + 90daf5c commit a92a24d
Show file tree
Hide file tree
Showing 58 changed files with 552 additions and 133 deletions.
12 changes: 6 additions & 6 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<cyclonedx.version>9.0.5</cyclonedx.version>
<expressly.version>5.0.0</expressly.version>
<findbugs.version>3.0.2</findbugs.version>
<jandex.version>3.2.3</jandex.version>
<jandex.version>3.2.6</jandex.version>
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<javax.inject.version>1</javax.inject.version>
<parsson.version>1.1.7</parsson.version>
Expand All @@ -32,7 +32,7 @@
<opentelemetry-instrumentation.version>2.8.0-alpha</opentelemetry-instrumentation.version>
<opentelemetry-semconv.version>1.27.0-alpha</opentelemetry-semconv.version>
<quarkus-http.version>5.3.4</quarkus-http.version>
<micrometer.version>1.14.3</micrometer.version><!-- keep in sync with hdrhistogram -->
<micrometer.version>1.14.4</micrometer.version><!-- keep in sync with hdrhistogram -->
<hdrhistogram.version>2.2.2</hdrhistogram.version><!-- keep in sync with micrometer -->
<google-auth.version>0.22.0</google-auth.version>
<graphql-java.version>22.2</graphql-java.version> <!-- keep in sync with smallrye-graphql -->
Expand All @@ -57,7 +57,7 @@
<smallrye-context-propagation.version>2.2.0</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>3.0.1</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>3.18.0</smallrye-mutiny-vertx-binding.version>
<smallrye-mutiny-vertx-binding.version>3.18.1</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>4.26.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>2.7.0</smallrye-stork.version>
<jakarta.activation.version>2.1.3</jakarta.activation.version>
Expand Down Expand Up @@ -110,7 +110,7 @@
<wildfly-elytron.version>2.6.0.Final</wildfly-elytron.version>
<jboss-marshalling.version>2.2.2.Final</jboss-marshalling.version>
<jboss-threads.version>3.8.0.Final</jboss-threads.version>
<vertx.version>4.5.12</vertx.version>
<vertx.version>4.5.13</vertx.version>
<httpclient.version>4.5.14</httpclient.version>
<httpcore.version>4.4.16</httpcore.version>
<httpasync.version>4.1.5</httpasync.version>
Expand All @@ -132,7 +132,7 @@
<infinispan.version>15.0.13.Final</infinispan.version>
<infinispan.protostream.version>5.0.13.Final</infinispan.protostream.version>
<caffeine.version>3.1.8</caffeine.version>
<netty.version>4.1.117.Final</netty.version>
<netty.version>4.1.118.Final</netty.version>
<brotli4j.version>1.16.0</brotli4j.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
Expand Down Expand Up @@ -199,7 +199,7 @@
<docker-java.version>3.4.0</docker-java.version> <!-- must be the version Testcontainers use: https://central.sonatype.com/artifact/org.testcontainers/testcontainers -->
<!-- Check the compatibility matrix (https://github.com/opensearch-project/opensearch-testcontainers) before upgrading: -->
<opensearch-testcontainers.version>2.0.2</opensearch-testcontainers.version>
<com.dajudge.kindcontainer>1.4.7</com.dajudge.kindcontainer>
<com.dajudge.kindcontainer>1.4.8</com.dajudge.kindcontainer>
<aesh.version>2.8.2</aesh.version>
<aesh-readline.version>2.6</aesh-readline.version>
<jansi.version>2.4.0</jansi.version> <!-- Keep in sync with aesh-readline and dekorate -->
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<jboss-bridger-plugin.version>1.6.Final</jboss-bridger-plugin.version>

<!-- Jandex versions -->
<jandex.version>3.2.3</jandex.version>
<jandex.version>3.2.6</jandex.version>
<jandex-gradle-plugin.version>1.0.0</jandex-gradle-plugin.version>

<asciidoctorj.version>2.5.13</asciidoctorj.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected static void withDefaultValue(SmallRyeConfigBuilder builder, String nam
protected static <T> void withConverter(SmallRyeConfigBuilder builder, String type, int priority, Converter<T> converter) {
try {
// To support converters that are not public
builder.withConverter((Class<T>) builder.getClassLoader().loadClass(type), priority, converter);
builder.withConverter((Class<T>) Class.forName(type, false, builder.getClassLoader()), priority, converter);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ COPY --chown=quarkus:quarkus .mvn /code/.mvn
COPY --chown=quarkus:quarkus pom.xml /code/
USER quarkus
WORKDIR /code
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.8.1:go-offline
COPY src /code/src
RUN ./mvnw package -Dnative
Expand Down Expand Up @@ -724,7 +724,7 @@ RUN mkdir /musl && \
ENV PATH="/musl/bin:${PATH}"
USER quarkus
WORKDIR /code
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.8.1:go-offline
COPY src /code/src
RUN ./mvnw package -Dnative -DskipTests -Dquarkus.native.additional-build-args="--static","--libc=musl"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/kafka-dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Note that the Kafka advertised address is automatically configured with the chos
[[configuring-the-image]]
== Configuring the image

Dev Services for Kafka supports https://redpanda.com[Redpanda], https://github/ozangunalp/kafka-native[kafka-native]
Dev Services for Kafka supports https://redpanda.com[Redpanda], https://github.com/ozangunalp/kafka-native[kafka-native]
and https://strimzi.io[Strimzi] (in https://github.com/apache/kafka/blob/trunk/config/kraft/README.md[Kraft] mode) images.

**Redpanda** is a Kafka compatible event streaming platform.
Expand Down
18 changes: 9 additions & 9 deletions docs/src/main/asciidoc/qute-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ In this case, just add `_isolated=false` or `_unisolated` argument to the call s
===== Arguments

Named arguments can be accessed directly in the tag template.
However, the first argument does not need to define a name and it can be accessed using the `it` alias.
However, the first argument does not need to define a name, and it can be accessed using the `it` alias.
Furthermore, if an argument does not have a name defined and the value is a single identifier, such as `foo`, then the name is defaulted to the value identifier, e.g. `{#myTag foo /}` becomes `{#myTag foo=foo /}`.
In other words, the argument value `foo` is resolved and can be accessed using `{foo}` in the tag template.

Expand Down Expand Up @@ -2044,8 +2044,8 @@ public class ItemResource {
You can also define a type-safe <<fragments,fragment>> in your Java code.
A _native static_ method with the name that contains a dollar sign `$` denotes a method that represents a fragment of a type-safe template.
The name of the fragment is derived from the annotated method name.
The part before the last occurence of a dollar sign `$` is the method name of the related type-safe template.
The part after the last occurence of a dollar sign is the fragment identifier.
The part before the last occurrence of a dollar sign `$` is the method name of the related type-safe template.
The part after the last occurrence of a dollar sign is the fragment identifier.
The strategy defined by the relevant `CheckedTemplate#defaultName()` is honored when constructing the defaulted names.

.Type-safe Fragment Example
Expand Down Expand Up @@ -2200,18 +2200,18 @@ static BigDecimal discountedPrice(Item item) {
}
----

A special constant - `TemplateExtension#ANY`/`*` - can be used to specify that the extension method matches any name.
A special constant - `TemplateExtension#ANY` - can be used to specify that the extension method matches any name.

.`TemplateExtension#ANY` Example
[source,java]
----
@TemplateExtension(matchName = "*")
@TemplateExtension(matchName = TemplateExtension.ANY)
static String itemProperty(Item item, String name) { <1>
// this method matches {item.foo} if "item" resolves to an object assignable to "Item"
// the value of the "name" argument is "foo"
}
----
<1> A additional string method parameter is used to pass the actual property name.
<1> An additional string method parameter is used to pass the actual property name.

It's also possible to match the name against a regular expression specified in `matchRegex()`.

Expand All @@ -2224,7 +2224,7 @@ static String itemProperty(Item item, String name) { <1>
// the value of the "name" argument is "foo" or "bar"
}
----
<1> A additional string method parameter is used to pass the actual property name.
<1> An additional string method parameter is used to pass the actual property name.

Finally, `matchNames()` can be used to specify a collection of matching names.
An additional string method parameter is mandatory as well.
Expand Down Expand Up @@ -2832,7 +2832,7 @@ In the development mode, all files located in `src/main/resources/templates` are
By default, a template modification results in an application restart that also triggers build-time validations.

However, it's possible to use the `quarkus.qute.dev-mode.no-restart-templates` configuration property to specify the templates for which the application is not restarted.
The configration value is a regular expression that matches the template path relative from the `templates` directory and `/` is used as a path separator.
The configuration value is a regular expression that matches the template path relative from the `templates` directory and `/` is used as a path separator.
For example, `quarkus.qute.dev-mode.no-restart-templates=templates/foo.html` matches the template `src/main/resources/templates/foo.html`.
The matching templates are reloaded and only runtime validations are performed.

Expand Down Expand Up @@ -2938,7 +2938,7 @@ However, the `io.quarkus.qute.i18n.MessageBundle#locale()` can be used to specif
Additionally, there are two ways to define a localized bundle:

1. Create an interface that extends the default interface that is annotated with `@Localized`
2. Create an UTF-8 encoded file located in the `src/main/resources/messages` directory of an application archive; e.g. `msg_de.properties`.
2. Create a UTF-8 encoded file located in the `src/main/resources/messages` directory of an application archive; e.g. `msg_de.properties`.

TIP: While a localized interface enables easy refactoring, an external file might be more convenient in many situations.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/scheduler-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ class Jobs {

In some cases, it might be useful to choose a scheduler implementation used to execute a scheduled method.
However, only one `Scheduler` implementation is used for all scheduled methods by default.
For example, the `quarkus-quartz` extension provides an implementation that supports clustering but it also removes the simple in-memory implementation from the game.
For example, the `quarkus-quartz` extension provides an implementation that supports clustering, but it also removes the simple in-memory implementation from the game.
Now, if clustering is enabled then it's not possible to define a scheduled method that would be executed locally on a single node.
Nevertheless, if you set the `quarkus.scheduler.use-composite-scheduler` config property to `true` then a composite `Scheduler` is used instead.
This means that multiple scheduler implementations are kept running side by side.
Furthermore, it's possible to chose a specific implementation used to execute a scheduled method using `@Scheduled#executeWith()`.
Furthermore, it's possible to choose a specific implementation used to execute a scheduled method using `@Scheduled#executeWith()`.

[source,java]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/vertx-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ quarkus.http.so-reuse-port=true
== Use a Vert.x context-aware scheduler

Some Mutiny operators need to schedule work on an executor thread pool.
A good example is `.onItem().delayIt().by(Duration.ofMillis(10)` as it needs such an executor to delay emissions.
A good example is `.onItem().delayIt().by(Duration.ofMillis(10))` as it needs such an executor to delay emissions.

The default executor is returned by `io.smallrye.mutiny.infrastructure.Infrastructure` and it is already configured and managed by Quarkus.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,19 @@ void validateConfigMappingsInjectionPoints(
if (configClass != null) {
AnnotationTarget target = injectionPoint.getAnnotationTarget();
AnnotationInstance mapping = null;
if (target.kind().equals(FIELD)) {
mapping = target.asField().annotation(CONFIG_MAPPING_NAME);
} else if (target.kind().equals(METHOD_PARAMETER)) {
MethodParameterInfo methodParameterInfo = target.asMethodParameter();
if (methodParameterInfo.type().name().equals(type.name())) {
Set<AnnotationInstance> parameterAnnotations = getParameterAnnotations(
validationPhase.getBeanProcessor().getBeanDeployment(),
target.asMethodParameter().method(), methodParameterInfo.position());
mapping = Annotations.find(parameterAnnotations, CONFIG_MAPPING_NAME);

// target can be null for synthetic injection point
if (target != null) {
if (target.kind().equals(FIELD)) {
mapping = target.asField().annotation(CONFIG_MAPPING_NAME);
} else if (target.kind().equals(METHOD_PARAMETER)) {
MethodParameterInfo methodParameterInfo = target.asMethodParameter();
if (methodParameterInfo.type().name().equals(type.name())) {
Set<AnnotationInstance> parameterAnnotations = getParameterAnnotations(
validationPhase.getBeanProcessor().getBeanDeployment(),
target.asMethodParameter().method(), methodParameterInfo.position());
mapping = Annotations.find(parameterAnnotations, CONFIG_MAPPING_NAME);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ protected void configure() {
if (useSharedNetwork) {
hostName = ConfigureUtil.configureSharedNetwork(this, "keycloak");
if (keycloakX) {
addEnv(KEYCLOAK_QUARKUS_HOSTNAME, "localhost");
addEnv(KEYCLOAK_QUARKUS_HOSTNAME, "http://" + hostName);
} else {
addEnv(KEYCLOAK_WILDFLY_FRONTEND_URL, "http://localhost:" + fixedExposedPort.getAsInt());
}
Expand Down Expand Up @@ -550,7 +550,7 @@ protected void configure() {
addEnv(KEYCLOAK_QUARKUS_ADMIN_PROP, KEYCLOAK_ADMIN_USER);
addEnv(KEYCLOAK_QUARKUS_ADMIN_PASSWORD_PROP, KEYCLOAK_ADMIN_PASSWORD);
withCommand(startCommand.orElse(KEYCLOAK_QUARKUS_START_CMD)
+ (useSharedNetwork ? " --hostname-port=" + fixedExposedPort.getAsInt() : ""));
+ (useSharedNetwork ? " --hostname-backchannel-dynamic true" : ""));
addUpConfigResource();
if (isHttps()) {
addExposedPort(KEYCLOAK_HTTPS_PORT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ public class MailerRuntimeConfig {

/**
* Sets the login mode for the connection.
* Either {@code NONE}, {@code DISABLED}, {@code OPTIONAL}, {@code REQUIRED} or {@code XOAUTH2}.
* Either {@code NONE}, {@code DISABLED}, {@code REQUIRED} or {@code XOAUTH2}.
* <ul>
* <li>NONE means a login will be attempted if the server supports it and login credentials are set</li>
* <li>DISABLED means no login will be attempted</li>
* <li>NONE means a login will be attempted if the server supports in and login credentials are set</li>
* <li>REQUIRED means that a login will be attempted if the server supports it and the send operation will fail
* otherwise</li>
* <li>XOAUTH2 means that a login will be attempted using Google Gmail Oauth2 tokens</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2247,7 +2247,7 @@ public static Token fromAudience(String... audience) {
* For this option be effective the `authentication.session-age-extension` property should also be set to a nonzero
* value since the refresh token is currently kept in the user session.
*
* This option is valid only when the application is of type {@link ApplicationType#WEB_APP}}.
* This option is valid only when the application is of type {@link ApplicationType#WEB_APP}.
*
* This property is enabled if `quarkus.oidc.token.refresh-token-time-skew` is configured,
* you do not need to enable this property manually in this case.
Expand All @@ -2270,7 +2270,7 @@ public static Token fromAudience(String... audience) {

/**
* Custom HTTP header that contains a bearer token.
* This option is valid only when the application is of type {@link ApplicationType#SERVICE}}.
* This option is valid only when the application is of type {@link ApplicationType#SERVICE}.
*/
public Optional<String> header = Optional.empty();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ interface Token {
* For this option be effective the `authentication.session-age-extension` property should also be set to a nonzero
* value since the refresh token is currently kept in the user session.
*
* This option is valid only when the application is of type {@link ApplicationType#WEB_APP}}.
* This option is valid only when the application is of type {@link ApplicationType#WEB_APP}.
*
* This property is enabled if `quarkus.oidc.token.refresh-token-time-skew` is configured,
* you do not need to enable this property manually in this case.
Expand All @@ -1032,7 +1032,7 @@ interface Token {

/**
* Custom HTTP header that contains a bearer token.
* This option is valid only when the application is of type {@link ApplicationType#SERVICE}}.
* This option is valid only when the application is of type {@link ApplicationType#SERVICE}.
*/
Optional<String> header();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ private OidcUtils() {

}

public static JsonObject decodeJwtContent(String jwt) {
return OidcCommonUtils.decodeJwtContent(jwt);
}

public static String getJwtContentPart(String jwt) {
return OidcCommonUtils.getJwtContentPart(jwt);
}

public static String getSessionCookie(RoutingContext context, OidcTenantConfig oidcTenantConfig) {
final Map<String, Cookie> cookies = context.request().cookieMap();
return getSessionCookie(context.data(), cookies, oidcTenantConfig);
Expand Down
Loading

0 comments on commit a92a24d

Please sign in to comment.