Skip to content

Commit 3b922d3

Browse files
authored
Merge pull request #18920 from gsmet/2.1.0.Final-backports-3
2.1.0.final backports 3
2 parents 14595e5 + 6b01498 commit 3b922d3

File tree

211 files changed

+3743
-764
lines changed

Some content is hidden

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

211 files changed

+3743
-764
lines changed

.github/workflows/ci-actions-incremental.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,11 @@ jobs:
239239
maven_opts: "-Xmx2g -XX:MaxMetaspaceSize=1g",
240240
os-name: "ubuntu-latest"
241241
}
242-
# all the jdk.compiler ones are for Kotlin Kapt
243242
- {
244243
name: "16",
245244
java-version: 16,
246245
maven_args: "$JVM_TEST_MAVEN_ARGS -pl '!devtools/gradle'",
247-
maven_opts: "-Xmx2g -XX:MaxMetaspaceSize=1g --add-opens java.base/java.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
246+
maven_opts: "-Xmx2g -XX:MaxMetaspaceSize=1g",
248247
os-name: "ubuntu-latest"
249248
}
250249
- {

.github/workflows/jdk-early-access-build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ jobs:
2727
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
2828
timeout-minutes: 360
2929
env:
30-
# "--add-opens ..." to work around https://youtrack.jetbrains.com/issue/KT-43704
31-
# all the jdk.compiler ones are for Kotlin Kapt
32-
MAVEN_OPTS: -Xmx2048m -XX:MaxMetaspaceSize=1000m --add-opens java.base/java.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
30+
MAVEN_OPTS: -Xmx2048m -XX:MaxMetaspaceSize=1000m
3331
steps:
3432

3533
- name: Set up JDK

bom/application/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<opentracing-jdbc.version>0.2.4</opentracing-jdbc.version>
2828
<opentracing-kafka.version>0.1.15</opentracing-kafka.version>
2929
<opentracing-mongo.version>0.1.5</opentracing-mongo.version>
30-
<opentelemetry.version>1.3.0</opentelemetry.version>
31-
<opentelemetry-alpha.version>1.3.0-alpha</opentelemetry-alpha.version>
30+
<opentelemetry.version>1.4.1</opentelemetry.version>
31+
<opentelemetry-alpha.version>1.4.1-alpha</opentelemetry-alpha.version>
3232
<jaeger.version>1.4.0</jaeger.version>
3333
<quarkus-http.version>4.1.1</quarkus-http.version>
3434
<jboss-servlet-api_4.0_spec.version>1.0.0.Final</jboss-servlet-api_4.0_spec.version>
@@ -53,8 +53,8 @@
5353
<smallrye-context-propagation.version>1.2.0</smallrye-context-propagation.version>
5454
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
5555
<smallrye-reactive-types-converter.version>2.6.0</smallrye-reactive-types-converter.version>
56-
<smallrye-mutiny-vertx-binding.version>2.9.0</smallrye-mutiny-vertx-binding.version>
57-
<smallrye-reactive-messaging.version>3.6.0</smallrye-reactive-messaging.version>
56+
<smallrye-mutiny-vertx-binding.version>2.11.0</smallrye-mutiny-vertx-binding.version>
57+
<smallrye-reactive-messaging.version>3.7.1</smallrye-reactive-messaging.version>
5858
<jakarta.activation.version>1.2.1</jakarta.activation.version>
5959
<jakarta.annotation-api.version>1.3.5</jakarta.annotation-api.version>
6060
<jakarta.el-impl.version>3.0.3</jakarta.el-impl.version>
@@ -90,7 +90,7 @@
9090
<commons-lang3.version>3.12.0</commons-lang3.version>
9191
<commons-codec.version>1.15</commons-codec.version>
9292
<classmate.version>1.5.1</classmate.version>
93-
<hibernate-orm.version>5.5.3.Final</hibernate-orm.version>
93+
<hibernate-orm.version>5.5.4.Final</hibernate-orm.version>
9494
<hibernate-reactive.version>1.0.0.CR8</hibernate-reactive.version>
9595
<hibernate-validator.version>6.2.0.Final</hibernate-validator.version>
9696
<hibernate-search.version>6.0.5.Final</hibernate-search.version>
@@ -109,7 +109,7 @@
109109
<wildfly-elytron.version>1.16.0.Final</wildfly-elytron.version>
110110
<jboss-modules.version>1.8.7.Final</jboss-modules.version>
111111
<jboss-threads.version>3.4.0.Final</jboss-threads.version>
112-
<vertx.version>4.1.1</vertx.version>
112+
<vertx.version>4.1.2</vertx.version>
113113
<httpclient.version>4.5.13</httpclient.version>
114114
<httpcore.version>4.4.14</httpcore.version>
115115
<httpasync.version>4.1.4</httpasync.version>
@@ -150,7 +150,7 @@
150150
<azure-functions-java-library.version>1.4.2</azure-functions-java-library.version>
151151
<kotlin.version>1.5.21</kotlin.version>
152152
<kotlin.coroutine.version>1.5.0</kotlin.coroutine.version>
153-
<dekorate.version>2.2.2</dekorate.version>
153+
<dekorate.version>2.3.0</dekorate.version>
154154
<maven-artifact-transfer.version>0.10.0</maven-artifact-transfer.version>
155155
<maven-invoker.version>3.0.1</maven-invoker.version>
156156
<awaitility.version>4.1.0</awaitility.version>
@@ -169,7 +169,7 @@
169169
<okhttp.version>3.14.9</okhttp.version>
170170
<sentry.version>5.0.1</sentry.version>
171171
<hibernate-quarkus-local-cache.version>0.1.0</hibernate-quarkus-local-cache.version>
172-
<kubernetes-client.version>5.5.0</kubernetes-client.version>
172+
<kubernetes-client.version>5.6.0</kubernetes-client.version>
173173
<flapdoodle.mongo.version>2.2.0</flapdoodle.mongo.version>
174174
<quarkus-spring-api.version>5.2.SP4</quarkus-spring-api.version>
175175
<quarkus-spring-data-api.version>2.1.SP2</quarkus-spring-data-api.version>

build-parent/pom.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<wagon-provider-api.version>3.4.3</wagon-provider-api.version>
8989

9090
<!-- The image to use for tests that run Keycloak -->
91-
<!-- IMPORTANT: If this is changed you must also update bom/application/pom.xml to match the version -->
91+
<!-- IMPORTANT: If this is changed you must also update bom/application/pom.xml and KeycloakBuildTimeConfig/DevServicesConfig in quarkus-oidc/deployment to match the version -->
9292
<keycloak.docker.image>quay.io/keycloak/keycloak:14.0.0</keycloak.docker.image>
9393

9494
<unboundid-ldap.version>4.0.13</unboundid-ldap.version>
@@ -339,7 +339,9 @@
339339
<maven.home>${maven.home}</maven.home>
340340
<maven.repo.local>${settings.localRepository}</maven.repo.local>
341341
<maven.settings>${session.request.userSettingsFile.path}</maven.settings>
342-
<project.version>${project.version}</project.version> <!-- some dev tools tests need this -->
342+
<!-- some dev tools tests need the following properties -->
343+
<project.version>${project.version}</project.version>
344+
<project.groupId>${project.groupId}</project.groupId>
343345
</systemPropertyVariables>
344346
<!-- limit the amount of memory surefire can use, 1500m should be plenty-->
345347
<!-- set tmpdir as early as possible because surefire sets it too late for JDK16 -->
@@ -358,7 +360,9 @@
358360
<maven.home>${maven.home}</maven.home>
359361
<maven.repo.local>${settings.localRepository}</maven.repo.local>
360362
<maven.settings>${session.request.userSettingsFile.path}</maven.settings>
361-
<project.version>${project.version}</project.version> <!-- some dev tools tests need this -->
363+
<!-- some dev tools tests need the following properties -->
364+
<project.version>${project.version}</project.version>
365+
<project.groupId>${project.groupId}</project.groupId>
362366
</systemPropertyVariables>
363367
<!-- set tmpdir as early as possible because failsafe sets it too late for JDK16 -->
364368
<argLine>-Djava.io.tmpdir="${project.build.directory}"</argLine>
@@ -820,7 +824,7 @@
820824
<property>
821825
<name>dokka</name>
822826
</property>
823-
<jdk>[,16)</jdk>
827+
<jdk>(,16)</jdk>
824828
<file>
825829
<exists>src/main/kotlin</exists>
826830
</file>

core/deployment/src/main/java/io/quarkus/deployment/PlatformConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ public class PlatformConfig {
1515
/**
1616
* groupId of the platform to use
1717
*/
18-
@ConfigItem(defaultValue = "io.quarkus")
18+
@ConfigItem(defaultValue = "io.quarkus.platform")
1919
String groupId;
2020

2121
/**
2222
* artifactId of the platform to use
2323
*/
24-
@ConfigItem(defaultValue = "quarkus-universe-bom")
24+
@ConfigItem(defaultValue = "quarkus-bom")
2525
String artifactId;
2626

2727
/**

core/deployment/src/main/java/io/quarkus/deployment/console/ConsoleStateManager.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ void installBuiltins(DevModeType devModeType) {
118118
? toLevel(((LogManager) LogManager.getLogManager()).getLogger("").getLevel()).toString()
119119
: currentLevel.toString())),
120120
ConsoleStateManager.this::toggleLogLevel));
121+
commands.add(new ConsoleCommand((char) 13, null, null, 10001, null, this::printBlankLine));
121122
commands.add(new ConsoleCommand('h', "Shows this help", "for more options", 10000, null, this::printHelp));
122123
commands.add(new ConsoleCommand('q', "Quits the application", null, this::exitQuarkus));
123124
context.reset(commands.toArray(new ConsoleCommand[0]));
@@ -175,6 +176,10 @@ public void run() {
175176
}
176177
}
177178

179+
private void printBlankLine() {
180+
System.out.println("");
181+
}
182+
178183
private void printHelp() {
179184
System.out.println("\nThe following commands are currently available:");
180185
Set<ConsoleContext> contexts = new HashSet<>();
@@ -186,13 +191,15 @@ private void printHelp() {
186191
.collect(Collectors.toList())) {
187192
System.out.println("\n" + RED + "==" + RESET + " " + UNDERLINE + ctx.name + NO_UNDERLINE + "\n");
188193
for (var i : ctx.internal) {
189-
if (i.getHelpState() == null) {
190-
System.out.println(helpOption(i.getKey(), i.getDescription()));
191-
} else if (i.getHelpState().toggleState != null) {
192-
System.out.println(helpOption(i.getKey(), i.getDescription(), i.getHelpState().toggleState.get()));
193-
} else {
194-
System.out.println(helpOption(i.getKey(), i.getDescription(), i.getHelpState().stateSupplier.get(),
195-
i.getHelpState().colorSupplier.get()));
194+
if (i.getDescription() != null) {
195+
if (i.getHelpState() == null) {
196+
System.out.println(helpOption(i.getKey(), i.getDescription()));
197+
} else if (i.getHelpState().toggleState != null) {
198+
System.out.println(helpOption(i.getKey(), i.getDescription(), i.getHelpState().toggleState.get()));
199+
} else {
200+
System.out.println(helpOption(i.getKey(), i.getDescription(), i.getHelpState().stateSupplier.get(),
201+
i.getHelpState().colorSupplier.get()));
202+
}
196203
}
197204
}
198205
}

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

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

3+
import static java.util.Arrays.asList;
4+
import static java.util.Collections.singletonList;
35
import static java.util.stream.Collectors.groupingBy;
46
import static java.util.stream.Collectors.toList;
57

@@ -20,11 +22,11 @@
2022
import java.nio.file.attribute.BasicFileAttributes;
2123
import java.nio.file.attribute.FileTime;
2224
import java.util.ArrayList;
23-
import java.util.Arrays;
2425
import java.util.Collection;
2526
import java.util.Collections;
2627
import java.util.HashMap;
2728
import java.util.HashSet;
29+
import java.util.Iterator;
2830
import java.util.List;
2931
import java.util.Locale;
3032
import java.util.Map;
@@ -213,6 +215,7 @@ public void handleChanges(Collection<FileChangeEvent> changes) {
213215
periodicTestCompile();
214216
}
215217
};
218+
Set<Path> nonExistent = new HashSet<>();
216219
for (DevModeContext.ModuleInfo module : context.getAllModules()) {
217220
for (Path path : module.getMain().getSourcePaths()) {
218221
testClassChangeWatcher.watchPath(path.toFile(), callback);
@@ -222,10 +225,41 @@ public void handleChanges(Collection<FileChangeEvent> changes) {
222225
}
223226
}
224227
for (Path path : context.getApplicationRoot().getTest().get().getSourcePaths()) {
225-
testClassChangeWatcher.watchPath(path.toFile(), callback);
228+
if (!Files.isDirectory(path)) {
229+
nonExistent.add(path);
230+
} else {
231+
testClassChangeWatcher.watchPath(path.toFile(), callback);
232+
}
226233
}
227234
for (Path path : context.getApplicationRoot().getTest().get().getResourcePaths()) {
228-
testClassChangeWatcher.watchPath(path.toFile(), callback);
235+
if (!Files.isDirectory(path)) {
236+
nonExistent.add(path);
237+
} else {
238+
testClassChangeWatcher.watchPath(path.toFile(), callback);
239+
}
240+
}
241+
if (!nonExistent.isEmpty()) {
242+
{
243+
testClassChangeTimer = new Timer("Test Compile Timer", true);
244+
testClassChangeTimer.schedule(new TimerTask() {
245+
@Override
246+
public void run() {
247+
boolean added = false;
248+
for (Iterator<Path> iterator = nonExistent.iterator(); iterator.hasNext();) {
249+
Path i = iterator.next();
250+
if (Files.isDirectory(i)) {
251+
iterator.remove();
252+
testClassChangeWatcher.watchPath(i.toFile(), callback);
253+
added = true;
254+
}
255+
256+
}
257+
if (added) {
258+
periodicTestCompile();
259+
}
260+
}
261+
}, 1, 1000);
262+
}
229263
}
230264
periodicTestCompile();
231265
} else {
@@ -247,22 +281,25 @@ private void periodicTestCompile() {
247281
try {
248282
ClassScanResult changedTestClassResult = compileTestClasses();
249283
ClassScanResult changedApp = checkForChangedClasses(compiler, DevModeContext.ModuleInfo::getMain, false, test);
250-
Set<String> filesChanges = new HashSet<>(checkForFileChange(s -> s.getTest().get(), test));
284+
if (changedApp.compilationHappened) {
285+
if (compileProblem != null) {
286+
testSupport.getTestRunner().testCompileFailed(compileProblem);
287+
} else {
288+
testSupport.getTestRunner().testCompileSucceeded();
289+
}
290+
}
291+
Set<String> filesChanges = new HashSet<>(checkForFileChange(s -> s.getTest().orElse(null), test));
251292
filesChanges.addAll(checkForFileChange(DevModeContext.ModuleInfo::getMain, test));
252293
boolean configFileRestartNeeded = filesChanges.stream().map(test.watchedFilePaths::get)
253294
.anyMatch(Boolean.TRUE::equals);
254295

255296
ClassScanResult merged = ClassScanResult.merge(changedTestClassResult, changedApp);
256297
if (configFileRestartNeeded) {
257-
if (compileProblem != null) {
258-
testSupport.getTestRunner().testCompileFailed(compileProblem);
259-
} else {
298+
if (compileProblem == null) {
260299
testSupport.getTestRunner().runTests(null);
261300
}
262301
} else if (merged.isChanged()) {
263-
if (compileProblem != null) {
264-
testSupport.getTestRunner().testCompileFailed(compileProblem);
265-
} else {
302+
if (compileProblem == null) {
266303
testSupport.getTestRunner().runTests(merged);
267304
}
268305
}
@@ -625,7 +662,7 @@ && sourceFileWasRecentModified(p, ignoreFirstScanChanges, firstScan))
625662
compileProblem = null;
626663
} catch (Exception e) {
627664
compileProblem = e;
628-
return new ClassScanResult();
665+
return classScanResult;
629666
}
630667
boolean timestampsChanged = false;
631668
//check to make sure no changes have occurred while the compilation was
@@ -760,13 +797,17 @@ Set<String> checkForFileChange(Function<DevModeContext.ModuleInfo, DevModeContex
760797
TimestampSet timestampSet) {
761798
Set<String> ret = new HashSet<>();
762799
for (DevModeContext.ModuleInfo module : context.getAllModules()) {
763-
final Set<Path> moduleResources = correspondingResources.computeIfAbsent(cuf.apply(module),
800+
DevModeContext.CompilationUnit compilationUnit = cuf.apply(module);
801+
if (compilationUnit == null) {
802+
continue;
803+
}
804+
final Set<Path> moduleResources = correspondingResources.computeIfAbsent(compilationUnit,
764805
m -> Collections.newSetFromMap(new ConcurrentHashMap<>()));
765806
boolean doCopy = true;
766-
PathsCollection rootPaths = cuf.apply(module).getResourcePaths();
767-
String outputPath = cuf.apply(module).getResourcesOutputPath();
807+
PathsCollection rootPaths = compilationUnit.getResourcePaths();
808+
String outputPath = compilationUnit.getResourcesOutputPath();
768809
if (rootPaths.isEmpty()) {
769-
String rootPath = cuf.apply(module).getClassesPath();
810+
String rootPath = compilationUnit.getClassesPath();
770811
if (rootPath != null) {
771812
rootPaths = PathsCollection.of(Paths.get(rootPath));
772813
}
@@ -945,10 +986,11 @@ public RuntimeUpdatesProcessor setDisableInstrumentationForIndexPredicate(
945986

946987
public RuntimeUpdatesProcessor setWatchedFilePaths(Map<String, Boolean> watchedFilePaths, boolean isTest) {
947988
if (isTest) {
948-
setWatchedFilePathsInternal(watchedFilePaths, test, s -> Arrays.asList(s.getTest().get(), s.getMain()));
989+
setWatchedFilePathsInternal(watchedFilePaths, test,
990+
s -> s.getTest().isPresent() ? asList(s.getTest().get(), s.getMain()) : singletonList(s.getMain()));
949991
} else {
950992
main.watchedFileTimestamps.clear();
951-
setWatchedFilePathsInternal(watchedFilePaths, main, s -> Collections.singletonList(s.getMain()));
993+
setWatchedFilePathsInternal(watchedFilePaths, main, s -> singletonList(s.getMain()));
952994
}
953995
return this;
954996
}

0 commit comments

Comments
 (0)