Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.8.1 backports 1 #24881

Merged
merged 63 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4257cdb
Bump flyway.version from 8.5.4 to 8.5.5
dependabot[bot] Mar 29, 2022
cf81158
Add all existing project source directory in application model
glefloch Mar 30, 2022
97b17e0
Consistently sort database vendors in alphabetical order in datasourc…
yrodiere Mar 30, 2022
d297fa9
DB2, MSSQL are not open source
yrodiere Mar 30, 2022
27f33a7
Consistently mention all supported databases in database lists in dat…
yrodiere Mar 30, 2022
67e39c0
Style consistency in datasource documentation
yrodiere Mar 30, 2022
a1e9977
Basic documentation of Oracle's JDBC URL format
yrodiere Mar 30, 2022
3a5f63b
Fix a few typos in datasource documentation
yrodiere Mar 30, 2022
82e6dcc
Add SPI that allows extensions to listen on dev mode events
geoand Mar 30, 2022
afe3822
Docs: Replace reference to db store in QuartzBuildTimeConfig.java
VanillaSpoon Mar 30, 2022
72edf8a
Support arrays in RESTEasy Reactive Resource methods
geoand Mar 31, 2022
eea7996
Fix autodetection of Java version for project creation using CLI
gsmet Mar 30, 2022
4daa135
Allow control of resume on 404 behavior via build item
geoand Mar 31, 2022
8520a02
Arc - make sure exceptions from async events are always among suppres…
manovotn Mar 31, 2022
96ba426
Re-enable Gradle multisource project test
glefloch Mar 31, 2022
9abea3b
Update the image version used by the MongoDB dev service
edeandrea Mar 31, 2022
25a8d30
Improve dynamic resolution of MessageBodyWriter providers
geoand Apr 1, 2022
939a4e6
Skip Keycloak DevService if quarkus.oidc.provider is set
sberyozkin Apr 1, 2022
3c5203a
Update Infinispan to 13.0.8
abstractj Apr 1, 2022
7d6fb92
Switch quarkusIntTest task dependency from check to test
glefloch Apr 2, 2022
eb9721d
Fix Banner check on filesystem containing special chars
andreaTP Mar 30, 2022
fc68e4d
Ensure that the request handler are invoked on a duplication context,…
cescoffier Apr 1, 2022
91251ed
Fix Bootstrap Config to use default Config Sources (System and Env)
radcortez Mar 31, 2022
ea36fab
Make sure Kafka serde autodetection doesn't override connector config…
Ladicek Mar 16, 2022
28af6e4
Use single key JWK Set if neither kid nor x5t header is set
sberyozkin Mar 31, 2022
e791917
Bump spring-api jar version
geoand Apr 4, 2022
133deae
Add closeBootstrappedApp mojo param to QuarkusBootstrapMojo
aloubyansky Mar 30, 2022
dbeb333
Remove non-existing constraints from quarkus-bom
aloubyansky Apr 5, 2022
926f63f
ComponentsProviderGenerator - lower group limit for addRemovedBeans()
mkouba Apr 4, 2022
7b8dcda
Maven 3.8.5 compatibility, update maven-invoker to 3.1.0
famod Apr 3, 2022
95fe752
Support sending url encoded forms as Form in REST Client Reactive
michalszynkiewicz Apr 5, 2022
6475537
Support modules with non-empty default classifier
aloubyansky Apr 4, 2022
b7791e6
Documentation - Fix typo in word 'kubectl'
michalvavrik Apr 5, 2022
bbcb77d
Fix AsyncObserverExceptionHandler example
famod Apr 5, 2022
c2445c4
Check quarkus.http.root-path for security policy paths
sberyozkin Apr 4, 2022
0e771cb
Update to NOT exclude Oracle dev services
edeandrea Apr 6, 2022
1ab4b13
Fix websockets codestart package name
prtnv Apr 3, 2022
c9057a5
Provide link for Vert.x API @ConsumerEvent alternative
michalvavrik Apr 6, 2022
a0c40c7
Guard against a NPE in LoggingSetupRecorder
gsmet Apr 6, 2022
82192d6
Ensure that user provided Json providers can override the included ones
geoand Apr 6, 2022
b657bca
Added Twitter OIDC provider config
FroMage Apr 5, 2022
313cd5e
Added debug logs to OIDC
FroMage Apr 5, 2022
03d39fc
Fix CodeFlowTest
sberyozkin Apr 6, 2022
9f41d3b
Only add existing classes directory to Gradle application model
glefloch Apr 7, 2022
7e93345
Fix jaxb substitutions
zakkak Apr 7, 2022
0f98d20
Make sure container image labels configuration are considered by Jib
geoand Apr 8, 2022
66e135c
The OIDC Response mode is corrected in the query string when specified
gastaldi Apr 8, 2022
cb966dd
Fix potential NPE when PKCE secret is missing
gastaldi Apr 8, 2022
cb469a6
Fix potential NPE in createTokenEncSecretKey
gastaldi Apr 8, 2022
8b8d3e6
doc: fix: missing artifactId in security jwt build
manusa Apr 9, 2022
ec95cab
Add stork properties to all properties page
aureamunoz Apr 6, 2022
72c6504
Fix typo
youngminz Apr 10, 2022
46ff8c8
Fix potential IllegalAccessError in Spring Data JPA projection handling
geoand Apr 11, 2022
ec81fad
Change SmallRye GraphQL (+client) extensions' status to stable
jmartisk Apr 11, 2022
649717d
Bump flyway.version from 8.5.5 to 8.5.6
dependabot[bot] Apr 6, 2022
71dfd41
Bump flyway.version from 8.5.6 to 8.5.7
dependabot[bot] Apr 7, 2022
51f7095
Correct Mutual TLS abbreviation - decapitalize first letter
michalvavrik Apr 8, 2022
7142f9b
Update SmallRye Reactive Converters to version 2.7.0
cescoffier Apr 9, 2022
abbfcb4
docs: add 'gradle' to sample Dockerfile for building with Gradle
VanillaSpoon Apr 9, 2022
edd3bd4
Bump kubernetes-client-bom from 5.12.1 to 5.12.2
manusa Apr 6, 2022
9572208
Avoid XStream causing illegal access issues for internal JDK collections
geoand Apr 11, 2022
8e8c48c
Removed deprecated (and also useless) method from XStream call
geoand Apr 11, 2022
393de9c
Add tests around "new-ish" collection types used with @ParameterizedTest
snazy Mar 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ jobs:
java-version: 11,
os-name: "ubuntu-latest"
}
- {
name: "11 mvn 3.8.5",
java-version: 11,
os-name: "ubuntu-latest",
mvn-version: 3.8.5
}
- {
name: "11 Windows",
java-version: 11,
Expand All @@ -382,6 +388,11 @@ jobs:
with:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
- name: Switch Maven version
if: "matrix.java.mvn-version != ''"
run: |
echo 'distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${{matrix.java.mvn-version}}/apache-maven-${{matrix.java.mvn-version}}-bin.zip' >> .mvn/wrapper/maven-wrapper.properties
./mvnw -version
- name: Build
# Important: keep -pl ... in sync with "Calculate run flags"!
run: ./mvnw $COMMON_MAVEN_ARGS $JVM_TEST_MAVEN_ARGS install -pl 'integration-tests/maven'
Expand Down
43 changes: 12 additions & 31 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<smallrye-jwt.version>3.3.3</smallrye-jwt.version>
<smallrye-context-propagation.version>1.2.2</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>2.6.0</smallrye-reactive-types-converter.version>
<smallrye-reactive-types-converter.version>2.7.0</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>2.19.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>3.15.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>1.1.0</smallrye-stork.version>
Expand Down Expand Up @@ -133,7 +133,7 @@
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<junit-pioneer.version>1.5.0</junit-pioneer.version>
<testng.version>6.14.2</testng.version>
<infinispan.version>13.0.6.Final</infinispan.version>
<infinispan.version>13.0.8.Final</infinispan.version>
<infinispan.protostream.version>4.4.1.Final</infinispan.protostream.version>
<caffeine.version>2.9.3</caffeine.version>
<netty.version>4.1.74.Final</netty.version>
Expand All @@ -154,10 +154,10 @@
<kotlin.coroutine.version>1.6.0</kotlin.coroutine.version>
<kotlin-serialization.version>1.3.2</kotlin-serialization.version>
<dekorate.version>2.9.0</dekorate.version>
<maven-invoker.version>3.0.1</maven-invoker.version>
<maven-invoker.version>3.1.0</maven-invoker.version>
<awaitility.version>4.2.0</awaitility.version>
<jboss-logmanager.version>1.0.9</jboss-logmanager.version>
<flyway.version>8.5.4</flyway.version>
<flyway.version>8.5.7</flyway.version>
<yasson.version>1.0.11</yasson.version>
<liquibase.version>4.9.0</liquibase.version>
<snakeyaml.version>1.30</snakeyaml.version>
Expand All @@ -167,9 +167,9 @@
<proton-j.version>0.33.10</proton-j.version>
<okhttp.version>3.14.9</okhttp.version>
<hibernate-quarkus-local-cache.version>0.1.0</hibernate-quarkus-local-cache.version>
<kubernetes-client.version>5.12.1</kubernetes-client.version>
<kubernetes-client.version>5.12.2</kubernetes-client.version>
<flapdoodle.mongo.version>3.3.0</flapdoodle.mongo.version>
<quarkus-spring-api.version>5.2.SP4</quarkus-spring-api.version>
<quarkus-spring-api.version>5.2.SP6</quarkus-spring-api.version>
<quarkus-spring-data-api.version>2.1.SP2</quarkus-spring-data-api.version>
<quarkus-spring-security-api.version>5.3.Final</quarkus-spring-security-api.version>
<quarkus-spring-boot-api.version>2.1.SP1</quarkus-spring-boot-api.version>
Expand Down Expand Up @@ -2090,16 +2090,6 @@
<artifactId>quarkus-resteasy-reactive</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-kotlin-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-kotlin-common-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-kotlin</artifactId>
Expand Down Expand Up @@ -5038,6 +5028,12 @@
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-invoker</artifactId>
<version>${maven-invoker.version}</version>
<exclusions>
<exclusion>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
Expand Down Expand Up @@ -5521,16 +5517,6 @@
<artifactId>quarkus-hibernate-search-orm-elasticsearch-aws-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-amazon-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-amazon-common-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-amazon-dynamodb</artifactId>
Expand Down Expand Up @@ -5691,11 +5677,6 @@
<artifactId>quarkus-vault</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vault-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vault-deployment</artifactId>
Expand Down
1 change: 1 addition & 0 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<mssql.image>mcr.microsoft.com/mssql/server:2019-CU15-ubuntu-20.04</mssql.image>
<mysql.image>docker.io/mysql:8.0</mysql.image>
<oracle.image>docker.io/gvenzl/oracle-xe:21-slim</oracle.image>
<mongo.image>docker.io/mongo:4.4.13</mongo.image>

<!-- Align various dependencies that are not really part of the bom-->
<junit4.version>4.13.2</junit4.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ public void run() {
ResultHandle bootstrapBuilder = null;
if (bootstrapConfigSetupNeeded()) {
bootstrapBuilder = readBootstrapConfig.invokeStaticMethod(CU_CONFIG_BUILDER_WITH_ADD_DISCOVERED_AND_BOOTSRAP,
readBootstrapConfig.load(false), readBootstrapConfig.load(true), readBootstrapConfig.load(false),
readBootstrapConfig.load(true), readBootstrapConfig.load(true), readBootstrapConfig.load(false),
readBootstrapConfig.load(launchMode));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package io.quarkus.deployment.dev;

import io.quarkus.bootstrap.app.RunningQuarkusApplication;

/**
* SPI that can be used by extensions that need to run code in various phases of dev mode
*/
public interface DevModeListener {

int DEFAULT_ORDER = 0;

void afterFirstStart(RunningQuarkusApplication application);

void beforeShutdown();

/**
* Determines the order with which the listeners are executed. Classes with a lower order are executed
* first during start (the order is reverse for shutdown)
*/
default int order() {
return DEFAULT_ORDER;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
Expand Down Expand Up @@ -81,6 +82,7 @@ public class IsolatedDevModeMain implements BiConsumer<CuratedApplication, Map<S
private Thread shutdownThread;
private final FSWatchUtil fsWatchUtil = new FSWatchUtil();
private static volatile ConsoleStateManager.ConsoleContext consoleContext;
private final List<DevModeListener> listeners = new ArrayList<>();

private synchronized void firstStart(QuarkusClassLoader deploymentClassLoader, List<CodeGenData> codeGens) {

Expand Down Expand Up @@ -145,6 +147,20 @@ public void accept(String args) {
RuntimeUpdatesProcessor.INSTANCE.setConfiguredInstrumentationEnabled(
runner.getConfigValue("quarkus.live-reload.instrumentation", Boolean.class).orElse(false));
firstStartCompleted = true;

for (DevModeListener listener : ServiceLoader.load(DevModeListener.class)) {
listeners.add(listener);
}
listeners.sort(Comparator.comparingInt(DevModeListener::order));

for (DevModeListener listener : ServiceLoader.load(DevModeListener.class)) {
try {
listener.afterFirstStart(runner);
} catch (Exception e) {
log.warn("Unable to invoke 'afterFirstStart' of " + listener.getClass(), e);
}
}

} catch (Throwable t) {
Throwable rootCause = t;
while (rootCause.getCause() != null) {
Expand Down Expand Up @@ -331,6 +347,15 @@ public void close() {
//don't attempt to restart in the exit code handler
restarting = true;
fsWatchUtil.shutdown();

for (int i = listeners.size() - 1; i >= 0; i--) {
try {
listeners.get(i).beforeShutdown();
} catch (Exception e) {
log.warn("Unable to invoke 'beforeShutdown' of " + listeners.get(i).getClass(), e);
}
}

try {
stop();
if (RuntimeUpdatesProcessor.INSTANCE == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.AbstractMap;
import java.util.Enumeration;
import java.util.Map;
import java.util.Scanner;
import java.util.jar.JarFile;

import org.jboss.logging.Logger;

Expand Down Expand Up @@ -103,20 +101,22 @@ private Map.Entry<URL, Boolean> getBanner(BannerConfig config) throws IOExceptio
}
}

private boolean isQuarkusCoreBanner(URL url) throws IOException {
protected boolean isQuarkusCoreBanner(URL url) {
if (!"jar".equals(url.getProtocol())) {
return false;
}

String thisClassName = this.getClass().getName();
String jarPath = url.getPath().substring(0, url.getPath().lastIndexOf('!'));

// We determine whether the banner is the default by checking to see if the jar that contains it also
// contains this class. This way although somewhat complicated guarantees that any rename of artifacts
// won't affect the check
try (JarFile jarFile = new JarFile(Paths.get(new URI(jarPath)).toFile())) {
return jarFile.getJarEntry(thisClassName.replace('.', '/') + ".class") != null;
} catch (URISyntaxException e) {
try {
return ClassPathUtils.processAsPath(url, p -> {
// We determine whether the banner is the default by checking to see if the jar that contains it also
// contains this class. This way although somewhat complicated guarantees that any rename of artifacts
// won't affect the check
Path resolved = p.resolve("/" + thisClassName.replace('.', '/') + ".class");
return Files.exists(resolved);
});
} catch (UncheckedIOException ex) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package io.quarkus.deployment.pkg.steps;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

import org.junit.jupiter.api.Test;

import io.quarkus.deployment.steps.BannerProcessor;
import io.quarkus.fs.util.ZipUtils;

public class BannerProcessorTest {

class MyBannerProcessor extends BannerProcessor {
public boolean test(Path path) throws Exception {
return this.isQuarkusCoreBanner(path.toUri().toURL());
}
}

@Test
public void checkQuarkusCoreBannerOnFilesystemWithSpecialCharacters() throws Exception {
MyBannerProcessor processor = new MyBannerProcessor();

assertFalse(processor.test(Paths.get("tmp", "Descărcări", "test", "something!")));

final Path tmpDir = Files.createTempDirectory("Descărcări");
final Path zipPath = tmpDir.resolve("BannerProcessorTest.jar");

try {
try (FileSystem ignored = ZipUtils.newZip(zipPath)) {
}

try (FileSystem fs = ZipUtils.newFileSystem(zipPath)) {
assertFalse(processor.test(fs.getPath("/")));
}

try (final FileSystem fs = ZipUtils.newFileSystem(zipPath)) {
Path classFile = fs.getPath(MyBannerProcessor.class.getName().replace('.', '/') + ".class");
Files.createDirectories(classFile.getParent());
Files.write(classFile, "".getBytes(StandardCharsets.UTF_8));
}

try (FileSystem fs = ZipUtils.newFileSystem(zipPath)) {
assertTrue(processor.test(fs.getPath("/")));
}
} finally {
Files.deleteIfExists(zipPath);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ public static SmallRyeConfigBuilder configBuilder(final boolean runTime, final b
if (launchMode.isDevOrTest() && (runTime || bootstrap)) {
builder.withSources(new RuntimeOverrideConfigSource(classLoader));
}
if (runTime) {
if (runTime || bootstrap) {
builder.addDefaultSources();
builder.withDefaultValue(UUID_KEY, UUID.randomUUID().toString());
builder.withSources(new DotEnvConfigSourceProvider());
builder.withSources(
new PropertiesConfigSource(loadRuntimeDefaultValues(), "Runtime Defaults", Integer.MIN_VALUE + 50));
} else {
List<ConfigSource> sources = new ArrayList<>();
sources.addAll(classPathSources(META_INF_MICROPROFILE_CONFIG_PROPERTIES, classLoader));
Expand All @@ -121,10 +123,6 @@ public static SmallRyeConfigBuilder configBuilder(final boolean runTime, final b
if (addDiscovered) {
builder.addDiscoveredSources();
}
if (runTime || bootstrap) {
Map<String, String> runtimeDefaults = loadRuntimeDefaultValues();
builder.withSources(new PropertiesConfigSource(runtimeDefaults, "Runtime Defaults", Integer.MIN_VALUE + 50));
}
return builder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public static <T> Level getLogLevel(String categoryName, Map<String, T> categori
T categoryConfig = categories.get(categoryName);
if (categoryConfig != null) {
final InheritableLevel inheritableLevel = levelExtractor.apply(categoryConfig);
if (!inheritableLevel.isInherited()) {
if (inheritableLevel != null && !inheritableLevel.isInherited()) {
return inheritableLevel.getLevel();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.quarkus.cli.create;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

import io.quarkus.cli.common.OutputOptionMixin;
import io.quarkus.devtools.project.BuildTool;
Expand All @@ -17,13 +17,13 @@ public class TargetLanguageGroup {

static class VersionCandidates extends ArrayList<String> {
VersionCandidates() {
super(List.copyOf(CreateProjectHelper.JAVA_VERSIONS_LTS));
super(CreateProjectHelper.JAVA_VERSIONS_LTS.stream().map(String::valueOf).collect(Collectors.toList()));
}
}

@CommandLine.Option(names = {
"--java" }, description = "Target Java version.\n Valid values: ${COMPLETION-CANDIDATES}", completionCandidates = VersionCandidates.class, defaultValue = CreateProjectHelper.DEFAULT_JAVA_VERSION)
String javaVersion = CreateProjectHelper.DEFAULT_JAVA_VERSION;
"--java" }, description = "Target Java version.\n Valid values: ${COMPLETION-CANDIDATES}", completionCandidates = VersionCandidates.class, defaultValue = CreateProjectHelper.DETECT_JAVA_RUNTIME_VERSION)
String javaVersion = CreateProjectHelper.DETECT_JAVA_RUNTIME_VERSION;

@CommandLine.Option(names = { "--kotlin" }, description = "Use Kotlin")
boolean kotlin = false;
Expand Down
Loading