Skip to content

Commit 583ccdf

Browse files
authored
Merge pull request #47385 from gsmet/3.21.3-backports-1
[3.21] 3.21.3 backports 1
2 parents 25f530e + 090cf35 commit 583ccdf

File tree

79 files changed

+1560
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1560
-265
lines changed

bom/application/pom.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<opentelemetry-instrumentation.version>2.10.0-alpha</opentelemetry-instrumentation.version>
3333
<opentelemetry-semconv.version>1.29.0-alpha</opentelemetry-semconv.version>
3434
<quarkus-http.version>5.3.4</quarkus-http.version>
35-
<micrometer.version>1.14.5</micrometer.version><!-- keep in sync with hdrhistogram: https://central.sonatype.com/artifact/io.micrometer/micrometer-core -->
35+
<micrometer.version>1.14.6</micrometer.version><!-- keep in sync with hdrhistogram: https://central.sonatype.com/artifact/io.micrometer/micrometer-core -->
3636
<hdrhistogram.version>2.2.2</hdrhistogram.version><!-- keep in sync with micrometer -->
3737
<google-auth.version>0.22.0</google-auth.version>
3838
<graphql-java.version>22.2</graphql-java.version> <!-- keep in sync with smallrye-graphql -->
@@ -46,17 +46,17 @@
4646
<microprofile-jwt.version>2.1</microprofile-jwt.version>
4747
<microprofile-lra.version>2.0.1</microprofile-lra.version>
4848
<microprofile-openapi.version>4.0.2</microprofile-openapi.version>
49-
<smallrye-common.version>2.10.0</smallrye-common.version>
49+
<smallrye-common.version>2.12.0</smallrye-common.version>
5050
<smallrye-config.version>3.12.4</smallrye-config.version>
5151
<smallrye-health.version>4.2.0</smallrye-health.version>
5252
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
5353
<smallrye-open-api.version>4.0.8</smallrye-open-api.version>
5454
<smallrye-graphql.version>2.12.2</smallrye-graphql.version>
5555
<smallrye-fault-tolerance.version>6.9.0</smallrye-fault-tolerance.version>
5656
<smallrye-jwt.version>4.6.1</smallrye-jwt.version>
57-
<smallrye-context-propagation.version>2.2.0</smallrye-context-propagation.version>
57+
<smallrye-context-propagation.version>2.2.1</smallrye-context-propagation.version>
5858
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
59-
<smallrye-reactive-types-converter.version>3.0.1</smallrye-reactive-types-converter.version>
59+
<smallrye-reactive-types-converter.version>3.0.3</smallrye-reactive-types-converter.version>
6060
<smallrye-mutiny-vertx-binding.version>3.18.1</smallrye-mutiny-vertx-binding.version>
6161
<smallrye-reactive-messaging.version>4.27.0</smallrye-reactive-messaging.version>
6262
<smallrye-stork.version>2.7.3</smallrye-stork.version>
@@ -128,7 +128,7 @@
128128
<db2-jdbc.version>12.1.0.0</db2-jdbc.version>
129129
<shrinkwrap.version>1.2.6</shrinkwrap.version>
130130
<hamcrest.version>2.2</hamcrest.version><!-- The version needs to be compatible with both REST Assured and Awaitility -->
131-
<junit.jupiter.version>5.12.1</junit.jupiter.version>
131+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
132132
<infinispan.version>15.0.14.Final</infinispan.version>
133133
<infinispan.protostream.version>5.0.13.Final</infinispan.protostream.version>
134134
<caffeine.version>3.2.0</caffeine.version>
@@ -187,7 +187,7 @@
187187
<picocli.version>4.7.6</picocli.version>
188188
<google-cloud-functions.version>1.1.4</google-cloud-functions.version>
189189
<commons-compress.version>1.27.1</commons-compress.version> <!-- Please check with Java Operator SDK / Fabric8 team before updating -->
190-
<commons-text.version>1.13.0</commons-text.version>
190+
<commons-text.version>1.13.1</commons-text.version>
191191
<gson.version>2.12.1</gson.version>
192192
<log4j2-jboss-logmanager.version>2.0.1.Final</log4j2-jboss-logmanager.version>
193193
<log4j2-api.version>2.24.3</log4j2-api.version>
@@ -3294,6 +3294,11 @@
32943294
<artifactId>quarkus-observability-devservices</artifactId>
32953295
<version>${project.version}</version>
32963296
</dependency>
3297+
<dependency>
3298+
<groupId>io.quarkus</groupId>
3299+
<artifactId>quarkus-observability-devservices-deployment</artifactId>
3300+
<version>${project.version}</version>
3301+
</dependency>
32973302
<dependency>
32983303
<groupId>io.quarkus</groupId>
32993304
<artifactId>quarkus-observability-devservices-lgtm</artifactId>

bom/dev-ui/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<es-module-shims.version>2.0.10</es-module-shims.version>
3232
<path-to-regexp.version>2.4.0</path-to-regexp.version>
3333
<codeblock.version>1.0.17</codeblock.version>
34-
<qomponent.version>1.0.3</qomponent.version>
34+
<qomponent.version>1.0.4</qomponent.version>
3535

3636
<hpcc-js-wasm.version>2.15.3</hpcc-js-wasm.version>
3737
<yargs.version>17.7.2</yargs.version>

build-parent/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@
277277
<artifactId>quarkus-arc-test-supplement</artifactId>
278278
<version>${project.version}</version>
279279
</dependency>
280+
<dependency>
281+
<groupId>io.quarkus</groupId>
282+
<artifactId>quarkus-arc-test-supplement-decorator</artifactId>
283+
<version>${project.version}</version>
284+
</dependency>
280285
<dependency>
281286
<groupId>org.assertj</groupId>
282287
<artifactId>assertj-core</artifactId>

core/deployment/src/main/java/io/quarkus/deployment/builditem/nativeimage/UnsupportedOSBuildItem.java

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111
* extension on a given OS or architecture.
1212
*/
1313
public final class UnsupportedOSBuildItem extends MultiBuildItem {
14+
15+
public static String ARCH = System.getProperty("os.arch");
16+
1417
public enum Os {
1518
WINDOWS(IS_WINDOWS),
1619
MAC(IS_MAC),
17-
LINUX(IS_LINUX);
20+
LINUX(IS_LINUX),
21+
NONE(false);
1822

1923
public final boolean active;
2024

@@ -23,22 +27,52 @@ public enum Os {
2327
}
2428
}
2529

30+
public enum Arch {
31+
AMD64("amd64".equalsIgnoreCase(ARCH)),
32+
AARCH64("aarch64".equalsIgnoreCase(ARCH)),
33+
NONE(false);
34+
35+
public final boolean active;
36+
37+
Arch(boolean active) {
38+
this.active = active;
39+
}
40+
}
41+
2642
public final Os os;
43+
public final Arch arch;
2744
public final String error;
2845

2946
public UnsupportedOSBuildItem(Os os, String error) {
3047
this.os = os;
48+
this.arch = Arch.NONE;
49+
this.error = error;
50+
}
51+
52+
public UnsupportedOSBuildItem(Arch arch, String error) {
53+
this.os = Os.NONE;
54+
this.arch = arch;
55+
this.error = error;
56+
}
57+
58+
public UnsupportedOSBuildItem(Os os, Arch arch, String error) {
59+
this.os = os;
60+
this.arch = arch;
3161
this.error = error;
3262
}
3363

3464
public boolean triggerError(boolean isContainerBuild) {
3565
return
3666
// When the host OS is unsupported, it could have helped to
3767
// run in a Linux builder image (e.g. an extension unsupported on Windows).
38-
(os.active && !isContainerBuild) ||
68+
((os.active && !isContainerBuild) ||
3969
// If Linux is the OS the extension does not support,
4070
// it fails in a container build regardless the host OS,
4171
// because we have only Linux based builder images.
42-
(isContainerBuild && os == Os.LINUX);
72+
(isContainerBuild && os == Os.LINUX)) ||
73+
// We don't do cross-compilation, even builder images have to be
74+
// of the same arch, e.g. aarch64 Mac using aarch64 Linux builder image.
75+
// So if the arch is unsupported, it fails.
76+
arch.active;
4377
}
4478
}

core/deployment/src/main/java/io/quarkus/deployment/dev/IDEDevModeMain.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.util.HashMap;
66
import java.util.LinkedHashSet;
77
import java.util.Map;
8+
import java.util.Properties;
89
import java.util.Set;
910
import java.util.function.BiConsumer;
1011

@@ -37,6 +38,10 @@ public void accept(CuratedApplication curatedApplication, Map<String, Object> st
3738
Path appClasses = (Path) stringObjectMap.get("app-classes");
3839
DevModeContext devModeContext = new DevModeContext();
3940
devModeContext.setArgs((String[]) stringObjectMap.get("args"));
41+
Properties buildSystemProperties = curatedApplication.getQuarkusBootstrap().getBuildSystemProperties();
42+
for (String key : buildSystemProperties.stringPropertyNames()) {
43+
devModeContext.getBuildSystemProperties().put(key, buildSystemProperties.getProperty(key));
44+
}
4045

4146
ApplicationModel appModel = null;
4247
try {

core/deployment/src/main/java/io/quarkus/deployment/index/IndexingUtil.java

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public class IndexingUtil {
4444

4545
private static final int JAVA_VERSION;
4646

47-
// At least Jandex 2.1 is needed
48-
private static final int REQUIRED_INDEX_VERSION = 8;
47+
// At least Jandex 3.0 is needed
48+
private static final int REQUIRED_INDEX_VERSION = 11;
4949

5050
static {
5151
int version = 8;
@@ -71,7 +71,7 @@ public static Index indexJar(Path path, Set<String> removed) throws IOException
7171

7272
public static Index indexTree(OpenPathTree tree, Set<String> removed) throws IOException {
7373
if (removed == null) {
74-
final Index i = tree.apply(JANDEX_INDEX, MetaInfJandexReader.getInstance());
74+
final Index i = tree.apply(JANDEX_INDEX, new MetaInfJandexReader(tree.toString()));
7575
if (i != null) {
7676
return i;
7777
}
@@ -88,17 +88,19 @@ public static Index indexJar(File file, Set<String> removed) throws IOException
8888
if (existing != null && removed == null) {
8989
try (InputStream in = jarFile.getInputStream(existing)) {
9090
IndexReader reader = new IndexReader(in);
91-
if (reader.getIndexVersion() < REQUIRED_INDEX_VERSION) {
92-
log.warnf(
93-
"Re-indexing %s - at least Jandex 2.1 must be used to index an application dependency",
94-
file);
95-
return indexJar(jarFile, removed);
96-
} else {
97-
try {
98-
return reader.read();
99-
} catch (UnsupportedVersion e) {
100-
throw new UnsupportedVersion("Can't read Jandex index from " + file + ": " + e.getMessage());
91+
try {
92+
int indexVersion = reader.getIndexVersion();
93+
if (indexVersion < REQUIRED_INDEX_VERSION) {
94+
log.warnf("Reindexing %s, at least Jandex 3.0 must be used"
95+
+ " to index an application dependency (index version is %s)", file, indexVersion);
96+
return indexJar(jarFile, removed);
10197
}
98+
return reader.read();
99+
} catch (UnsupportedVersion e) {
100+
log.warnf("Reindexing %s, the index format is too new for the Jandex version"
101+
+ " used by your application. Please report it to the author of this JAR (%s)",
102+
file, e.getMessage());
103+
return indexJar(jarFile, removed);
102104
}
103105
}
104106
}
@@ -273,10 +275,10 @@ public void visitPath(PathVisit visit) {
273275
}
274276

275277
private static class MetaInfJandexReader implements Function<PathVisit, Index> {
276-
private static MetaInfJandexReader instance;
278+
private final String treeDescription;
277279

278-
private static MetaInfJandexReader getInstance() {
279-
return instance == null ? instance = new MetaInfJandexReader() : instance;
280+
MetaInfJandexReader(String treeDescription) {
281+
this.treeDescription = treeDescription;
280282
}
281283

282284
@Override
@@ -287,19 +289,22 @@ public Index apply(PathVisit visit) {
287289
try (InputStream in = Files.newInputStream(visit.getPath())) {
288290
IndexReader reader = new IndexReader(in);
289291
try {
290-
if (reader.getIndexVersion() < REQUIRED_INDEX_VERSION) {
291-
log.warnf(
292-
"Re-indexing %s:%s - at least Jandex 2.1 must be used to index an application dependency",
293-
visit.getRoot(), visit.getPath());
292+
int indexVersion = reader.getIndexVersion();
293+
if (indexVersion < REQUIRED_INDEX_VERSION) {
294+
log.warnf("Reindexing %s, at least Jandex 3.0 must be used"
295+
+ " to index an application dependency (index version is %s)",
296+
treeDescription, indexVersion);
294297
return null;
295298
}
296299
return reader.read();
297300
} catch (UnsupportedVersion e) {
298-
throw new UnsupportedVersion(
299-
"Can't read Jandex index from " + visit.getRoot() + ":" + visit.getPath() + ": " + e.getMessage());
301+
log.warnf("Reindexing %s, the index format is too new for the Jandex version"
302+
+ " used by your application. Please report it to the author of this JAR (%s)",
303+
treeDescription, e.getMessage());
304+
return null;
300305
}
301306
} catch (IOException e) {
302-
throw new UncheckedIOException("Can't read Jandex index from " + visit.getRoot() + ":" + visit.getPath(), e);
307+
throw new UncheckedIOException("Can't read Jandex index from " + treeDescription, e);
303308
}
304309
}
305310
}

core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.quarkus.deployment.pkg.steps;
22

3+
import static io.quarkus.deployment.builditem.nativeimage.UnsupportedOSBuildItem.Arch.AMD64;
4+
35
import java.io.File;
46
import java.io.IOException;
57
import java.io.UncheckedIOException;
@@ -855,12 +857,15 @@ public NativeImageInvokerInfo build() {
855857
addExperimentalVMOption(nativeImageArgs, "-H:+AllowFoldMethods");
856858

857859
/*
860+
* @formatter:off
858861
* Foreign Function and Memory API in Native Image, JDK's JEP 454
859862
* This is needed for JDK 24+ internal native calls due to AWT,
860863
* e.g. JDK-8337237 et al.
861-
*
864+
* Note GraalVM FFI/FFM support per platform:
865+
* https://www.graalvm.org/latest/reference-manual/native-image/native-code-interoperability/foreign-interface/#foreign-functions
866+
* @formatter:on
862867
*/
863-
if (graalVMVersion.compareTo(GraalVM.Version.VERSION_24_2_0) >= 0) {
868+
if (graalVMVersion.compareTo(GraalVM.Version.VERSION_24_2_0) >= 0 && AMD64.active) {
864869
addExperimentalVMOption(nativeImageArgs, "-H:+ForeignAPISupport");
865870
}
866871

core/runtime/src/main/java/io/quarkus/runtime/graal/GraalVM.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static class Version implements Comparable<Version> {
6868

6969
public static final Version VERSION_23_0_0 = new Version("GraalVM 23.0.0", "23.0.0", "17", Distribution.GRAALVM);
7070
public static final Version VERSION_23_1_0 = new Version("GraalVM 23.1.0", "23.1.0", "21", Distribution.GRAALVM);
71+
public static final Version VERSION_24_2_0 = new Version("GraalVM 24.2.0", "24.2.0", "24", Distribution.GRAALVM);
7172

7273
// Temporarily work around https://github.com/quarkusio/quarkus/issues/36246,
7374
// till we have a consensus on how to move forward in

devtools/cli/src/test/java/io/quarkus/cli/MavenProjectInfoAndUpdateTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,17 @@ void testMisalignedPlatformExtensionVersion() throws Exception {
104104
assertRegistryExtensions(infoResult.stdout, "registry.acme.org",
105105
UP_TO_DATE_ICON.iconOrMessage() + " org.acme:acme-quarkiverse-extension:1.0");
106106

107-
final CliDriver.Result rectifyResult = run(projectDir, "update", "--platform-version=1.0.0", "--no-rewrite");
108-
assertThat(rectifyResult.getExitCode()).isEqualTo(0);
107+
CliDriver.Result updateResult = run(projectDir, "update", "--platform-version=1.0.0", "--no-rewrite");
108+
assertThat(updateResult.getExitCode()).isEqualTo(0);
109109

110-
assertThat(rectifyResult.stdout)
110+
assertThat(updateResult.stdout)
111111
.contains(
112112
"- org.acme.quarkus.platform:acme-quarkus-subatomic:[1.0.0 -> managed]");
113+
assertQuarkusPlatformBomUpdates(updateResult.stdout,
114+
ArtifactCoords.pom("org.acme.quarkus.platform", "quarkus-bom", "[2.0.0 -> 1.0.0]"),
115+
ArtifactCoords.pom("org.acme.quarkus.platform", "acme-bom", "[2.0.0 -> 1.0.0]"));
113116

114-
final CliDriver.Result updateResult = run(projectDir, "update", "-Dquarkus.platform.version=1.0.0", "--no-rewrite");
117+
updateResult = run(projectDir, "update", "-Dquarkus.platform.version=1.0.0", "--no-rewrite");
115118
assertThat(updateResult.getExitCode()).isEqualTo(0);
116119
assertQuarkusPlatformBomUpdates(updateResult.stdout,
117120
ArtifactCoords.pom("org.acme.quarkus.platform", "quarkus-bom", "[1.0.0 -> 2.0.0]"),

devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
import java.io.File;
66
import java.nio.file.Path;
77
import java.util.Collections;
8+
import java.util.HashMap;
89
import java.util.HashSet;
10+
import java.util.Map;
911
import java.util.Optional;
12+
import java.util.Properties;
1013
import java.util.Set;
1114
import java.util.stream.Collectors;
1215

@@ -461,6 +464,8 @@ public boolean isSatisfiedBy(Task t) {
461464
t.notCompatibleWithConfigurationCache(
462465
"The quarkus-plugin isn't compatible with the configuration cache");
463466

467+
t.setSystemProperties(extractQuarkusTestSystemProperties());
468+
464469
// Quarkus test configuration action which should be executed before any Quarkus test
465470
// Use anonymous classes in order to leverage task avoidance.
466471
t.doFirst(new Action<Task>() {
@@ -718,4 +723,17 @@ private Optional<TaskProvider<Task>> getLazyTask(Project project, String name) {
718723
return Optional.empty();
719724
}
720725
}
726+
727+
private static Map<String, Object> extractQuarkusTestSystemProperties() {
728+
Properties systemProperties = System.getProperties();
729+
Map<String, Object> quarkusSystemProperties = new HashMap<>();
730+
for (String propertyName : systemProperties.stringPropertyNames()) {
731+
if (!propertyName.startsWith("quarkus.test.")) {
732+
continue;
733+
}
734+
735+
quarkusSystemProperties.put(propertyName, systemProperties.get(propertyName));
736+
}
737+
return quarkusSystemProperties;
738+
}
721739
}

0 commit comments

Comments
 (0)