Skip to content

Commit

Permalink
Merge pull request #37434 from gsmet/3.6.1-backports-1
Browse files Browse the repository at this point in the history
3.6.1 backports 1
  • Loading branch information
gsmet committed Dec 2, 2023
2 parents 96fcda4 + 83a3e51 commit f433cb0
Show file tree
Hide file tree
Showing 79 changed files with 767 additions and 280 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,6 @@ jobs:
uses: gradle/github-actions/maven-build-scan/save@v1-beta
with:
job-name: "JVM Tests - JDK ${{matrix.java.name}}"
- name: Upload quarkus-ide-launcher jar
uses: actions/upload-artifact@v3
with:
name: "quarkus-ide-launcher-999-SNAPSHOT.jar - JDK ${{matrix.java.name}}"
path: |
core/launcher/target/quarkus-ide-launcher-999-SNAPSHOT.jar

maven-tests:
name: Maven Tests - JDK ${{matrix.java.name}}
Expand Down
60 changes: 11 additions & 49 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

<properties>
<angus-activation.version>2.0.1</angus-activation.version>
<bouncycastle.version>1.76</bouncycastle.version>
<bouncycastle.fips.version>1.0.2.3</bouncycastle.fips.version>
<bouncycastle.version>1.77</bouncycastle.version>
<bouncycastle.fips.version>1.0.2.4</bouncycastle.fips.version>
<bouncycastle.tls.fips.version>1.0.17</bouncycastle.tls.fips.version>
<expressly.version>5.0.0</expressly.version>
<findbugs.version>3.0.2</findbugs.version>
<jandex.version>3.1.5</jandex.version>
<jandex.version>3.1.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.5</parsson.version>
Expand Down Expand Up @@ -128,7 +128,7 @@
<postgresql-jdbc.version>42.6.0</postgresql-jdbc.version>
<mariadb-jdbc.version>3.2.0</mariadb-jdbc.version>
<mysql-jdbc.version>8.0.33</mysql-jdbc.version>
<mssql-jdbc.version>12.4.0.jre11</mssql-jdbc.version>
<mssql-jdbc.version>12.4.2.jre11</mssql-jdbc.version>
<adal4j.version>1.6.7</adal4j.version>
<oracle-jdbc.version>23.3.0.23.09</oracle-jdbc.version>
<derby-jdbc.version>10.14.2.0</derby-jdbc.version>
Expand Down Expand Up @@ -157,7 +157,7 @@
<aws-xray.version>2.14.0</aws-xray.version>
<azure-functions-java-library.version>2.2.0</azure-functions-java-library.version>
<azure-functions-java-spi.version>1.0.0</azure-functions-java-spi.version>
<kotlin.version>1.9.10</kotlin.version>
<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>
Expand Down Expand Up @@ -206,11 +206,11 @@
<avro.version>1.11.3</avro.version>
<apicurio-registry.version>2.4.14.Final</apicurio-registry.version>
<apicurio-common-rest-client.version>0.1.18.Final</apicurio-common-rest-client.version> <!-- must be the version Apicurio Registry uses -->
<testcontainers.version>1.19.1</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
<docker-java.version>3.3.3</docker-java.version> <!-- must be the version Testcontainers use -->
<testcontainers.version>1.19.3</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
<docker-java.version>3.3.4</docker-java.version> <!-- must be the version Testcontainers use -->
<!-- Check the compatibility matrix (https://github.com/opensearch-project/opensearch-testcontainers) before upgrading: -->
<opensearch-testcontainers.version>2.0.0</opensearch-testcontainers.version>
<com.dajudge.kindcontainer>1.3.0</com.dajudge.kindcontainer>
<com.dajudge.kindcontainer>1.4.4</com.dajudge.kindcontainer>
<aesh.version>2.7</aesh.version>
<aesh-readline.version>2.4</aesh-readline.version>
<jansi.version>2.4.0</jansi.version> <!-- Keep in sync with aesh-readline and dekorate -->
Expand Down Expand Up @@ -3304,48 +3304,10 @@
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-api</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-core</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-httpclient5</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-jersey</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-netty</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-okhttp</artifactId>
<version>${docker-java.version}</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-zerodep</artifactId>
<artifactId>docker-java-bom</artifactId>
<version>${docker-java.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud.functions</groupId>
Expand Down
8 changes: 4 additions & 4 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

<!-- These properties are needed in order for them to be resolvable by the generated projects -->
<compiler-plugin.version>3.11.0</compiler-plugin.version>
<kotlin.version>1.9.10</kotlin.version>
<dokka.version>1.9.0</dokka.version>
<kotlin.version>1.9.21</kotlin.version>
<dokka.version>1.9.10</dokka.version>
<scala.version>2.13.8</scala.version>
<scala-maven-plugin.version>4.8.1</scala-maven-plugin.version>
<!-- not pretty but this is used in the codestarts and we don't want to break compatibility -->
Expand All @@ -33,7 +33,7 @@
<failsafe-plugin.version>${version.surefire.plugin}</failsafe-plugin.version>

<!-- Jandex versions -->
<jandex.version>3.1.5</jandex.version>
<jandex.version>3.1.6</jandex.version>
<jandex-gradle-plugin.version>1.0.0</jandex-gradle-plugin.version>

<asciidoctorj.version>2.5.10</asciidoctorj.version>
Expand Down Expand Up @@ -64,7 +64,7 @@
<!-- These 2 properties are used by CreateProjectMojo to add the Maven Wrapper -->
<proposed-maven-version>3.9.5</proposed-maven-version>
<maven-wrapper.version>3.2.0</maven-wrapper.version>
<gradle-wrapper.version>8.4</gradle-wrapper.version>
<gradle-wrapper.version>8.5</gradle-wrapper.version>
<quarkus-gradle-plugin.version>${project.version}</quarkus-gradle-plugin.version>
<quarkus-maven-plugin.version>${project.version}</quarkus-maven-plugin.version>
<maven-plugin-plugin.version>3.8.1</maven-plugin-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.quarkus.deployment.builditem;

import io.quarkus.builder.item.MultiBuildItem;

/**
* A marker build item to make Quarkus set the {@code java.class.path} system property.
* This system property is used in rare by libraries (Truffle for example) to create their own ClassLoaders.
* The value of the system property is simply best effort, as there is no way to faithfully represent
* the Quarkus ClassLoader hierarchies in a system property value.
*/
public final class SetClassPathSystemPropBuildItem extends MultiBuildItem {
}
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,9 @@ private RuntimeUpdatesProcessor setWatchedFilePathsInternal(Map<String, Boolean>
// First find all matching paths from all roots
try (final Stream<Path> walk = Files.walk(root)) {
walk.forEach(path -> {
if (path.equals(root)) {
if (path.equals(root)
// Never watch directories
|| Files.isDirectory(path)) {
return;
}
// Use the relative path to match the watched file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ final class Known implements JavaVersion {
private static final int JAVA_11_MAJOR = 55;
private static final int JAVA_17_MAJOR = 61;
private static final int JAVA_19_MAJOR = 63;
private static final int JAVA_21_MAJOR = 66;
private static final int JAVA_21_MAJOR = 65;

private final int determinedMajor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public void setup(boolean processInheritIODisabled) {
// will appear to block and no output will be shown
String effectiveBuilderImage = nativeConfig.builderImage().getEffectiveImage();
var builderImagePull = nativeConfig.builderImage().pull();
log.infof("Checking status of builder image '%s'", effectiveBuilderImage);
if (builderImagePull != NativeConfig.ImagePullStrategy.ALWAYS) {
log.infof("Checking status of builder image '%s'", effectiveBuilderImage);
Process imageInspectProcess = null;
try {
final ProcessBuilder pb = new ProcessBuilder(
Expand Down Expand Up @@ -82,20 +82,37 @@ public void setup(boolean processInheritIODisabled) {
}
}
}
Process pullProcess = null;

try {
final ProcessBuilder pb = new ProcessBuilder(
Arrays.asList(containerRuntime.getExecutableName(), "pull", effectiveBuilderImage));
pullProcess = ProcessUtil.launchProcess(pb, processInheritIODisabled);
if (pullProcess.waitFor() != 0) {
throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'");
}
} catch (IOException | InterruptedException e) {
throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'", e);
} finally {
if (pullProcess != null) {
pullProcess.destroy();
log.infof("Pulling builder image '%s'", effectiveBuilderImage);
pull(effectiveBuilderImage, processInheritIODisabled);
} catch (Exception e) {
log.infof("Retrying in 5 seconds");
try {
Thread.sleep(5_000L);
} catch (InterruptedException e1) {
throw new RuntimeException(e1);
}
log.infof("Pulling builder image '%s' (take 2)", effectiveBuilderImage);
pull(effectiveBuilderImage, processInheritIODisabled);
}
}
}

private void pull(String effectiveBuilderImage, boolean processInheritIODisabled) {
Process pullProcess = null;
try {
final ProcessBuilder pb = new ProcessBuilder(
Arrays.asList(containerRuntime.getExecutableName(), "pull", effectiveBuilderImage));
pullProcess = ProcessUtil.launchProcess(pb, processInheritIODisabled);
if (pullProcess.waitFor() != 0) {
throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'");
}
} catch (IOException | InterruptedException e) {
throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'");
} finally {
if (pullProcess != null) {
pullProcess.destroy();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package io.quarkus.deployment.steps;

import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.SetClassPathSystemPropBuildItem;
import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem;
import io.quarkus.maven.dependency.ResolvedDependency;
import io.quarkus.runtime.ClassPathSystemPropertyRecorder;

public class ClassPathSystemPropBuildStep {

@BuildStep
public void produce(BuildProducer<SetClassPathSystemPropBuildItem> producer, CurateOutcomeBuildItem curateOutcome) {
boolean truffleUsed = curateOutcome.getApplicationModel().getDependencies().stream()
.anyMatch(d -> d.getGroupId().equals("org.graalvm.polyglot"));
if (truffleUsed) {
producer.produce(new SetClassPathSystemPropBuildItem());
}
}

@BuildStep
@Record(ExecutionTime.STATIC_INIT)
public void set(List<SetClassPathSystemPropBuildItem> setCPItems,
CurateOutcomeBuildItem curateOutcome,
ClassPathSystemPropertyRecorder recorder) {
if (setCPItems.isEmpty()) {
return;
}
Collection<ResolvedDependency> runtimeDependencies = curateOutcome.getApplicationModel().getRuntimeDependencies();
List<Path> parentFirst = new ArrayList<>();
List<Path> regular = new ArrayList<>();
for (ResolvedDependency dependency : runtimeDependencies) {
if (dependency.isClassLoaderParentFirst()) {
parentFirst.addAll(dependency.getContentTree().getRoots());
} else {
regular.addAll(dependency.getContentTree().getRoots());

}
}
String classPathValue = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString())
.collect(Collectors.joining(":"));
recorder.set(classPathValue);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.quarkus.runtime;

import io.quarkus.runtime.annotations.Recorder;

@Recorder
public class ClassPathSystemPropertyRecorder {

public void set(String value) {
System.setProperty("java.class.path", value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ private static boolean getRootlessStateFor(ContainerRuntime containerRuntime) {
// We also treat Docker Desktop as "rootless" since the way it binds mounts does not
// transparently map the host user ID and GID
// see https://docs.docker.com/desktop/faqs/linuxfaqs/#how-do-i-enable-file-sharing
stringPredicate = line -> line.trim().equals("rootless") || line.contains("desktop-linux");
stringPredicate = line -> line.trim().equals("rootless") || line.contains("Docker Desktop")
|| line.contains("desktop-linux");
} else {
stringPredicate = line -> line.trim().equals("rootless: true");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void shouldReturnMultipleOutputSourceDirectories() {

@Test
public void shouldNotFailOnProjectDependenciesWithoutMain(@TempDir Path testProjectDir) throws IOException {
var kotlinVersion = System.getProperty("kotlin_version", "1.9.10");
var kotlinVersion = System.getProperty("kotlin_version", "1.9.21");
var settingFile = testProjectDir.resolve("settings.gradle.kts");
var mppProjectDir = testProjectDir.resolve("mpp");
var quarkusProjectDir = testProjectDir.resolve("quarkus");
Expand Down
2 changes: 1 addition & 1 deletion devtools/gradle/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
plugin-publish = "1.2.1"

# updating Kotlin here makes QuarkusPluginTest > shouldNotFailOnProjectDependenciesWithoutMain(Path) fail
kotlin = "1.9.20"
kotlin = "1.9.21"
smallrye-config = "3.4.4"

junit5 = "5.10.1"
Expand Down
4 changes: 2 additions & 2 deletions devtools/gradle/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
# https://gradle.org/release-checksums/
distributionSha256Sum=f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{#include index-entry}
{#body}<br />&rsaquo; It can be tested in the <a href="/q/dev-v1/io.quarkus.quarkus-grpc/services">Dev UI</a> (available in dev mode only).
{#body}<br />&rsaquo; It can be tested in the <a href="/q/dev-ui/io.quarkus.quarkus-grpc/services">Dev UI</a> (available in dev mode only).
{/include}
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/deploying-to-kubernetes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ This would generate the following in the `env` section of your container:
- env:
- name: FOO
valueFrom:
configMapRefKey:
configMapKeyRef:
key: keyName
name: my-configmap
optional: false
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/deploying-to-openshift.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ This would generate the following in the `env` section of your container:
- env:
- name: FOO
valueFrom:
configMapRefKey:
configMapKeyRef:
key: keyName
name: my-configmap
optional: false
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/dev-mode-differences.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Examples of such operations are:
====
A new Dev UI has been implemented in Quarkus 3.x.
Not all the features are available yet.
You can still access the previous version of the Dev UI using: http://localhost:8080/q/dev-v1/.
You can still access the previous version of the Dev UI using: http://localhost:8080/q/dev-ui/.
====

=== Error pages
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/grpc-service-implementation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public class HelloServiceTest implements Greeter {

== Trying out your services manually
In the dev mode, you can try out your gRPC services in the Quarkus Dev UI.
Just go to http://localhost:8080/q/dev-v1 and click on _Services_ under the gRPC tile.
Just go to http://localhost:8080/q/dev-ui and click on _Services_ under the gRPC tile.

Please note that your application needs to expose the "normal" HTTP port for the Dev UI to be accessible. If your application does not expose any HTTP endpoints, you can create a dedicated profile with a dependency on `quarkus-vertx-http`:
[source,xml]
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/reactive-event-bus.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
= Using the event bus
include::_attributes.adoc[]
:categories: messaging
:keywords: vertx vert.x
:summary: This guide explains how different beans can interact using the event bus.
:topics: messaging,event-bus,vert.x
:extensions: io.quarkus:quarkus-vertx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public Response logout() {
The following properties can be used to configure form-based authentication:

include::{generated-dir}/config/quarkus-vertx-http-config-group-form-auth-config.adoc[opts=optional, leveloffset=+1]
include::{generated-dir}/config/quarkus-vertx-http-config-group-auth-runtime-config.adoc[opts=optional, leveloffset=+1]

[[mutual-tls]]
=== Mutual TLS authentication
Expand Down
Loading

0 comments on commit f433cb0

Please sign in to comment.