Skip to content

Commit

Permalink
Merge pull request #37664 from gsmet/3.6.2-backports-1
Browse files Browse the repository at this point in the history
3.6.2 backports 1
  • Loading branch information
gsmet authored Dec 12, 2023
2 parents abdc647 + c912ab6 commit 8a3bdb7
Show file tree
Hide file tree
Showing 50 changed files with 410 additions and 97 deletions.
21 changes: 13 additions & 8 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<smallrye-health.version>4.0.4</smallrye-health.version>
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
<smallrye-open-api.version>3.7.0</smallrye-open-api.version>
<smallrye-graphql.version>2.6.0</smallrye-graphql.version>
<smallrye-graphql.version>2.6.1</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.2.6</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.4.0</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.0</smallrye-context-propagation.version>
Expand Down Expand Up @@ -84,7 +84,7 @@
<jakarta.xml.bind-api.version>4.0.1</jakarta.xml.bind-api.version>
<jaxb-runtime.version>4.0.4</jaxb-runtime.version>
<asm.version>9.6</asm.version>
<commons-io.version>2.15.0</commons-io.version>
<commons-io.version>2.15.1</commons-io.version>
<jboss-metadata-web.version>16.0.0.Final</jboss-metadata-web.version>
<maven-toolchain.version>3.0-alpha-2</maven-toolchain.version>
<plexus-component-annotations.version>2.1.0</plexus-component-annotations.version>
Expand Down Expand Up @@ -136,7 +136,7 @@
<shrinkwrap.version>1.2.6</shrinkwrap.version>
<rest-assured.version>5.3.2</rest-assured.version>
<hamcrest.version>2.2</hamcrest.version><!-- The version needs to be compatible with both REST Assured and Awaitility -->
<junit.jupiter.version>5.10.0</junit.jupiter.version>
<junit.jupiter.version>5.10.1</junit.jupiter.version>
<junit-pioneer.version>1.5.0</junit-pioneer.version>
<infinispan.version>14.0.21.Final</infinispan.version>
<infinispan.protostream.version>4.6.5.Final</infinispan.protostream.version>
Expand All @@ -146,7 +146,7 @@
<reactive-streams.version>1.0.4</reactive-streams.version>
<jboss-logging.version>3.5.3.Final</jboss-logging.version>
<mutiny.version>2.5.1</mutiny.version>
<kafka3.version>3.6.0</kafka3.version>
<kafka3.version>3.6.1</kafka3.version>
<lz4.version>1.8.0</lz4.version> <!-- dependency of the kafka-clients that could be overridden by other imported BOMs in the platform -->
<snappy.version>1.1.10.5</snappy.version>
<strimzi-test-container.version>0.100.0</strimzi-test-container.version>
Expand All @@ -160,7 +160,7 @@
<kotlin.version>1.9.21</kotlin.version>
<kotlin.coroutine.version>1.7.3</kotlin.coroutine.version>
<azure.toolkit-lib.version>0.27.0</azure.toolkit-lib.version>
<kotlin-serialization.version>1.6.0</kotlin-serialization.version>
<kotlin-serialization.version>1.6.2</kotlin-serialization.version>
<dekorate.version>4.0.3</dekorate.version> <!-- Please check with Java Operator SDK team before updating -->
<maven-invoker.version>3.2.0</maven-invoker.version>
<awaitility.version>4.2.0</awaitility.version>
Expand Down Expand Up @@ -188,7 +188,7 @@
<jna.version>5.8.0</jna.version><!-- should satisfy both testcontainers and mongodb -->
<antlr.version>4.10.1</antlr.version><!-- needs to align with same property in build-parent/pom.xml -->
<quarkus-security.version>2.0.2.Final</quarkus-security.version>
<keycloak.version>22.0.5</keycloak.version>
<keycloak.version>23.0.0</keycloak.version>
<logstash-gelf.version>1.15.1</logstash-gelf.version>
<checker-qual.version>3.38.0</checker-qual.version>
<error-prone-annotations.version>2.22.0</error-prone-annotations.version>
Expand All @@ -197,10 +197,10 @@
<scram-client.version>2.1</scram-client.version>
<picocli.version>4.7.5</picocli.version>
<google-cloud-functions.version>1.1.0</google-cloud-functions.version>
<commons-compress.version>1.24.0</commons-compress.version>
<commons-compress.version>1.25.0</commons-compress.version>
<commons-text.version>1.11.0</commons-text.version>
<gson.version>2.10.1</gson.version>
<log4j2-jboss-logmanager.version>1.1.1.Final</log4j2-jboss-logmanager.version>
<log4j2-jboss-logmanager.version>1.1.2.Final</log4j2-jboss-logmanager.version>
<log4j2-api.version>2.20.0</log4j2-api.version>
<log4j-jboss-logmanager.version>1.3.0.Final</log4j-jboss-logmanager.version>
<avro.version>1.11.3</avro.version>
Expand Down Expand Up @@ -2207,6 +2207,11 @@
<artifactId>quarkus-funqy-amazon-lambda</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-funqy-amazon-lambda-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-funqy-google-cloud-functions</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

<!-- The image to use for tests that run Keycloak -->
<!-- IMPORTANT: If this is changed you must also update bom/application/pom.xml and KeycloakBuildTimeConfig/DevServicesConfig in quarkus-oidc/deployment to match the version -->
<keycloak.version>22.0.5</keycloak.version>
<keycloak.version>23.0.0</keycloak.version>
<keycloak.wildfly.version>19.0.3</keycloak.wildfly.version>
<keycloak.docker.image>quay.io/keycloak/keycloak:${keycloak.version}</keycloak.docker.image>
<keycloak.docker.legacy.image>quay.io/keycloak/keycloak:${keycloak.wildfly.version}-legacy</keycloak.docker.legacy.image>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static Set<String> configFiles(Path configFilesLocation) throws IOExcepti
Set<String> configFiles = new HashSet<>();
try (DirectoryStream<Path> candidates = Files.newDirectoryStream(configFilesLocation, CONFIG_FILES_FILTER)) {
for (Path candidate : candidates) {
configFiles.add(candidate.toString());
configFiles.add(candidate.toUri().getPath());
}
}
return configFiles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProjectExtensionsAdd extends BaseBuildCommand implements Callable<I
@CommandLine.Mixin
RunModeOption runMode;

@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "extensions to add to this project")
@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "extensions to add to this project", split = ",")
Set<String> extensions;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProjectExtensionsRemove extends BaseBuildCommand implements Callabl
@CommandLine.Mixin
RunModeOption runMode;

@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "Extension(s) to remove from this project.")
@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "Extension(s) to remove from this project.", split = ",")
Set<String> extensions;

@Override
Expand Down
50 changes: 48 additions & 2 deletions devtools/cli/src/test/java/io/quarkus/cli/CliDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public static Result invokeExtensionRemoveQute(Path projectRoot, Path file) thro
}

public static Result invokeExtensionAddMultiple(Path projectRoot, Path file) throws Exception {
// add the qute extension
// add amazon-lambda-http and jackson extensions
Result result = execute(projectRoot, "extension", "add", "amazon-lambda-http", "jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);
Expand All @@ -345,7 +345,7 @@ public static Result invokeExtensionAddMultiple(Path projectRoot, Path file) thr
}

public static Result invokeExtensionRemoveMultiple(Path projectRoot, Path file) throws Exception {
// add the qute extension
// remove amazon-lambda-http and jackson extensions
Result result = execute(projectRoot, "extension", "remove", "amazon-lambda-http", "jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);
Expand All @@ -370,6 +370,52 @@ public static Result invokeExtensionRemoveMultiple(Path projectRoot, Path file)
return result;
}

public static Result invokeExtensionAddMultipleCommas(Path projectRoot, Path file) throws Exception {
Result result = execute(projectRoot, "extension", "add",
"quarkus-resteasy-reactive-jsonb,quarkus-resteasy-reactive-jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);

result = invokeValidateExtensionList(projectRoot);
Assertions.assertTrue(result.stdout.contains("quarkus-qute"),
"Expected quarkus-qute to be in the list of extensions. Result:\n" + result);
Assertions.assertTrue(result.stdout.contains("quarkus-resteasy-reactive-jsonb"),
"Expected quarkus-resteasy-reactive-jsonb to be in the list of extensions. Result:\n" + result);
Assertions.assertTrue(result.stdout.contains("quarkus-resteasy-reactive-jackson"),
"Expected quarkus-resteasy-reactive-jackson to be in the list of extensions. Result:\n" + result);

String content = CliDriver.readFileAsString(file);
Assertions.assertTrue(content.contains("quarkus-qute"),
"quarkus-qute should still be listed as a dependency. Result:\n" + content);
Assertions.assertTrue(content.contains("quarkus-resteasy-reactive-jsonb"),
"quarkus-resteasy-reactive-jsonb should be listed as a dependency. Result:\n" + content);
Assertions.assertTrue(content.contains("quarkus-resteasy-reactive-jackson"),
"quarkus-resteasy-reactive-jackson should be listed as a dependency. Result:\n" + content);

return result;
}

public static Result invokeExtensionRemoveMultipleCommas(Path projectRoot, Path file) throws Exception {
Result result = execute(projectRoot, "extension", "remove",
"quarkus-resteasy-reactive-jsonb,quarkus-resteasy-reactive-jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);

result = invokeValidateExtensionList(projectRoot);
Assertions.assertFalse(result.stdout.contains("quarkus-resteasy-reactive-jsonb"),
"quarkus-resteasy-reactive-jsonb should not be in the list of extensions. Result:\n" + result);
Assertions.assertFalse(result.stdout.contains("quarkus-resteasy-reactive-jackson"),
"quarkus-resteasy-reactive-jackson should not be in the list of extensions. Result:\n" + result);

String content = CliDriver.readFileAsString(file);
Assertions.assertFalse(content.contains("quarkus-resteasy-reactive-jsonb"),
"quarkus-resteasy-reactive-jsonb should not be listed as a dependency. Result:\n" + content);
Assertions.assertFalse(content.contains("quarkus-resteasy-reactive-jackson"),
"quarkus-resteasy-reactive-jackson should not be listed as a dependency. Result:\n" + content);

return result;
}

public static Result invokeExtensionListInstallable(Path projectRoot) throws Exception {
Result result = CliDriver.execute(projectRoot, "extension", "list", "-e", "-B", "--verbose", "-i");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ public void testExtensionList() throws Exception {
CliDriver.invokeExtensionAddRedundantQute(project);
CliDriver.invokeExtensionListInstallable(project);
CliDriver.invokeExtensionAddMultiple(project, pom);
CliDriver.invokeExtensionAddMultipleCommas(project, pom);
CliDriver.invokeExtensionRemoveQute(project, pom);
CliDriver.invokeExtensionRemoveMultiple(project, pom);
CliDriver.invokeExtensionRemoveMultipleCommas(project, pom);

CliDriver.invokeExtensionListInstallableSearch(project);
CliDriver.invokeExtensionListFormatting(project);
Expand Down
6 changes: 2 additions & 4 deletions docs/src/main/asciidoc/kafka.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1952,10 +1952,8 @@ mp.messaging.outgoing.fruit-out.compression.type=snappy
----

In JVM mode, it will work out of the box.
However, to compile your application to a native executable, you need to:

1. Uses GraalVM 21.+
2. Add `quarkus.kafka.snappy.enabled=true` to your `application.properties`
However, to compile your application to a native executable, you need to
add `quarkus.kafka.snappy.enabled=true` to your `application.properties`.

In native mode, Snappy is disabled by default as the use of Snappy requires embedding a native library and unpacking it when the application starts.

Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/logging.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -841,4 +841,5 @@ NOTE: If applicable, MDC data is stored in a _duplicated context_, which is an i
[[loggingConfigurationReference]]
== Logging configuration reference

include::{generated-dir}/config/quarkus-log-logging-log-build-time-config.adoc[opts=optional, leveloffset=+1]
include::{generated-dir}/config/quarkus-log-logging-log-config.adoc[opts=optional, leveloffset=+1]
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/native-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,8 @@ we need the following cypher script which will import the data within the CSV fi

[source,cypher]
----
CREATE CONSTRAINT unique_vm_id ON (v:VM) ASSERT v.vmId IS UNIQUE;
CREATE CONSTRAINT unique_method_id ON (m:Method) ASSERT m.methodId IS UNIQUE;
CREATE CONSTRAINT unique_vm_id FOR (v:VM) REQUIRE v.vmId IS UNIQUE;
CREATE CONSTRAINT unique_method_id FOR (m:Method) REQUIRE m.methodId IS UNIQUE;
LOAD CSV WITH HEADERS FROM 'file:///reports/call_tree_vm.csv' AS row
MERGE (v:VM {vmId: row.Id, name: row.Name})
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/rest-client-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ public interface SseClient {
Multi<SseEvent<Long>> get();
class HeartbeatFilter implements Predicate<SessionEvent<String>> {
class HeartbeatFilter implements Predicate<SseEvent<String>> {
@Override
public boolean test(SseEvent<String> event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ For more information, see xref:security-oidc-bearer-token-authentication.adoc#in
[[keycloak-initialization]]
=== Keycloak Initialization

The `quay.io/keycloak/keycloak:22.0.5` image which contains a Keycloak distribution powered by Quarkus is used to start a container by default.
The `quay.io/keycloak/keycloak:23.0.0` image which contains a Keycloak distribution powered by Quarkus is used to start a container by default.
`quarkus.keycloak.devservices.image-name` can be used to change the Keycloak image name. For example, set it to `quay.io/keycloak/keycloak:19.0.3-legacy` to use a Keycloak distribution powered by WildFly.
Note that only a Quarkus based Keycloak distribution is available starting from Keycloak `20.0.0`.

Expand Down
1 change: 1 addition & 0 deletions docs/sync-web-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fi

if [ -z $TARGET_DIR ]; then
TARGET_DIR=target/web-site
rm -rf ${TARGET_DIR}
GIT_OPTIONS=""
if [[ "$QUARKUS_WEB_SITE_PUSH" != "true" ]]; then
GIT_OPTIONS="--depth=1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private DevServicesResultBuildItem.RunningDevService startElasticsearch(
container.withLabel(DEV_SERVICE_LABEL, config.serviceName);
}
if (config.port.isPresent()) {
container.setPortBindings(List.of(config.port.get() + ":" + config.port.get()));
container.setPortBindings(List.of(config.port.get() + ":" + ELASTICSEARCH_PORT));
}
timeout.ifPresent(container::withStartupTimeout);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package io.quarkus.elasticsearch.restclient.lowlevel.runtime;

import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;

import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.test.QuarkusDevModeTest;
import io.restassured.RestAssured;

public class DevServicesElasticsearchDevModeCustomPortTestCase {
@RegisterExtension
static QuarkusDevModeTest test = new QuarkusDevModeTest()
.withApplicationRoot((jar) -> jar
.addClass(TestResource.class)
.addAsResource(new StringAsset("quarkus.elasticsearch.devservices.port=19200"), "application.properties"));

@Test
public void checkConfiguredPort() {
RestAssured
.when().get("/fruits/configured-hosts")
.then().body(endsWith(":19200"));

}

@Test
public void testDatasource() throws Exception {
var fruit = new TestResource.Fruit();
fruit.id = "1";
fruit.name = "banana";
fruit.color = "yellow";

RestAssured
.given().body(fruit).contentType("application/json")
.when().post("/fruits")
.then().statusCode(204);

RestAssured.when().get("/fruits/search?term=color&match=yellow")
.then()
.statusCode(200)
.body(equalTo("[{\"id\":\"1\",\"name\":\"banana\",\"color\":\"yellow\"}]"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import jakarta.ws.rs.QueryParam;

import org.apache.http.util.EntityUtils;
import org.eclipse.microprofile.config.ConfigProvider;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
Expand Down Expand Up @@ -57,6 +58,12 @@ public List<Fruit> search(@QueryParam("term") String term, @QueryParam("match")
return results;
}

@GET
@Path("/configured-hosts")
public String configuredHosts() {
return ConfigProvider.getConfig().getConfigValue("quarkus.elasticsearch.hosts").getValue();
}

public static class Fruit {
public String id;
public String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.hibernate.id.enhanced.NoopOptimizer;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.hibernate.reactive.SchemaUtil;
Expand All @@ -22,6 +23,7 @@ public class IdOptimizerDefaultNoneTest extends AbstractIdOptimizerDefaultTest {
.overrideConfigKey("quarkus.hibernate-orm.mapping.id.optimizer.default", "none");

@Override
@Test
@Disabled("The 'none' optimizer will produce a different stream of IDs (1 then 51 then 101 then ...)")
public void ids(UniAsserter asserter) {
super.ids(asserter);
Expand Down
Loading

0 comments on commit 8a3bdb7

Please sign in to comment.