Skip to content

Commit

Permalink
Merge branch 'quarkusio:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ollelogdahl authored Jun 18, 2024
2 parents ca0c91f + 5037263 commit dfc6638
Show file tree
Hide file tree
Showing 76 changed files with 1,423 additions and 299 deletions.
4 changes: 4 additions & 0 deletions .github/quarkus-github-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -773,5 +773,9 @@ triage:
labels: [area/virtual-threads]
title: "(virtual.thread|RunOnVirtualThread)"
notify: [cescoffier, ozangunalp]
- id: podman
labels: [env/podman]
title: "podman"
notify: [maxandersen]
qe:
notify: [rsvoboda, mjurc]
14 changes: 7 additions & 7 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<opentelemetry.version>1.32.0</opentelemetry.version>
<opentelemetry-alpha.version>1.32.0-alpha</opentelemetry-alpha.version>
<opentelemetry-semconv.version>1.21.0-alpha</opentelemetry-semconv.version> <!-- keep in sync with opentelemetry-java-instrumentation in the alpha bom-->
<quarkus-http.version>5.2.2.Final</quarkus-http.version>
<quarkus-http.version>5.3.0</quarkus-http.version>
<micrometer.version>1.12.5</micrometer.version><!-- keep in sync with hdrhistogram -->
<hdrhistogram.version>2.1.12</hdrhistogram.version><!-- keep in sync with micrometer -->
<google-auth.version>0.22.0</google-auth.version>
Expand All @@ -57,11 +57,11 @@
<smallrye-open-api.version>3.10.0</smallrye-open-api.version>
<smallrye-graphql.version>2.8.4</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.3.0</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.5.2</smallrye-jwt.version>
<smallrye-jwt.version>4.5.3</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.2</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>3.0.1</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>3.12.0</smallrye-mutiny-vertx-binding.version>
<smallrye-mutiny-vertx-binding.version>3.13.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>4.21.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>2.6.0</smallrye-stork.version>
<jakarta.activation.version>2.1.3</jakarta.activation.version>
Expand Down Expand Up @@ -113,7 +113,7 @@
<wildfly-elytron.version>2.4.2.Final</wildfly-elytron.version>
<jboss-marshalling.version>2.1.4.SP1</jboss-marshalling.version>
<jboss-threads.version>3.6.1.Final</jboss-threads.version>
<vertx.version>4.5.7</vertx.version>
<vertx.version>4.5.8</vertx.version>
<httpclient.version>4.5.14</httpclient.version>
<httpcore.version>4.4.16</httpcore.version>
<httpasync.version>4.1.5</httpasync.version>
Expand All @@ -134,7 +134,7 @@
<infinispan.version>15.0.4.Final</infinispan.version>
<infinispan.protostream.version>5.0.4.Final</infinispan.protostream.version>
<caffeine.version>3.1.5</caffeine.version>
<netty.version>4.1.108.Final</netty.version>
<netty.version>4.1.110.Final</netty.version>
<brotli4j.version>1.16.0</brotli4j.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
<jboss-logging.version>3.6.0.Final</jboss-logging.version>
Expand Down Expand Up @@ -172,7 +172,7 @@
<hibernate-quarkus-local-cache.version>0.3.0</hibernate-quarkus-local-cache.version>
<flapdoodle.mongo.version>4.14.0</flapdoodle.mongo.version>
<quarkus-spring-api.version>6.1.SP2</quarkus-spring-api.version>
<quarkus-spring-data-api.version>3.2.SP1</quarkus-spring-data-api.version>
<quarkus-spring-data-api.version>3.2.SP2</quarkus-spring-data-api.version>
<quarkus-spring-security-api.version>6.2</quarkus-spring-security-api.version>
<quarkus-spring-boot-api.version>3.2</quarkus-spring-boot-api.version>
<mockito.version>5.12.0</mockito.version>
Expand Down Expand Up @@ -204,7 +204,7 @@
<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 -->
<jgit.version>6.9.0.202403050737-r</jgit.version>
<jgit.version>6.10.0.202406032230-r</jgit.version>
<!-- these two artifacts needs to be compatible together -->
<strimzi-oauth.version>0.15.0</strimzi-oauth.version>
<strimzi-oauth.nimbus.version>9.40</strimzi-oauth.nimbus.version>
Expand Down
2 changes: 1 addition & 1 deletion bom/dev-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<properties>
<vaadin.version>24.3.13</vaadin.version>
<lit.version>3.1.3</lit.version>
<lit.version>3.1.4</lit.version>
<lit-element.version>4.0.6</lit-element.version>
<lit-html.version>3.1.4</lit-html.version>
<ssr-dom-shim.version>1.2.0</ssr-dom-shim.version>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<wiremock-maven-plugin.version>7.3.0</wiremock-maven-plugin.version>

<!-- Artemis test dependencies -->
<artemis.version>2.33.0</artemis.version>
<artemis.version>2.35.0</artemis.version>

<!-- Code Coverage Properties-->
<jacoco.agent.argLine></jacoco.agent.argLine>
Expand Down
2 changes: 1 addition & 1 deletion core/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<artifactItem>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
<version>6.9.0.202403050737-r</version>
<version>6.10.0.202406032230-r</version>
<type>jar</type>
<destFileName>signed.jar</destFileName>
</artifactItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
import io.smallrye.config.SmallRyeConfigBuilder;
import io.smallrye.config.SysPropConfigSource;
import io.smallrye.config.common.AbstractConfigSource;
import io.smallrye.config.common.MapBackedConfigSource;

/**
* A configuration reader.
Expand Down Expand Up @@ -616,13 +615,7 @@ ReadResult run() {
// it's not managed by us; record it
ConfigValue configValue = withoutExpansion(() -> runtimeConfig.getConfigValue(propertyName));
if (configValue.getValue() != null) {
String configName = configValue.getNameProfiled();
// record the profile parent in the original form; if recorded in the active profile it may mess the profile ordering
if (configName.equals("quarkus.config.profile.parent")) {
runTimeValues.put(propertyName, configValue.getValue());
} else {
runTimeValues.put(configName, configValue.getValue());
}
runTimeValues.put(propertyName, configValue.getValue());
}

// in the case the user defined compound keys in YAML (or similar config source, that quotes the name)
Expand Down Expand Up @@ -1095,42 +1088,25 @@ public String getValue(final String propertyName) {
properties.add(property);
}

// TODO - Add better API to set an empty Profile, or no Profile at all
// We also need an empty profile Config to record the properties that are not on the active profile
builder = ConfigUtils.emptyConfigBuilder();
// Do not use a profile, so we can record both profile properties and main properties of the active profile
builder.getProfiles().add("");
builder.getSources().clear();
builder.getSourceProviders().clear();
builder.setAddDefaultSources(false)
.withInterceptors(ConfigCompatibility.FrontEnd.nonLoggingInstance(), ConfigCompatibility.BackEnd.instance())
.addDiscoveredCustomizers()
.withSources(sourceProperties)
.withSources(new MapBackedConfigSource(
"Reset Profile",
Map.of("quarkus.profile", "",
"quarkus.config.profile.parent", "",
"quarkus.test.profile", "",
SMALLRYE_CONFIG_PROFILE, "",
SMALLRYE_CONFIG_PROFILE_PARENT, "",
Config.PROFILE, ""),
Integer.MAX_VALUE) {
@Override
public Set<String> getPropertyNames() {
return Collections.emptySet();
}
});
.withSources(sourceProperties);

List<String> profiles = config.getProfiles();
for (String property : builder.build().getPropertyNames()) {
String activeProperty = ProfileConfigSourceInterceptor.activeName(property, profiles);
// keep the profile parent in the original form; if we use the active profile it may mess the profile ordering
if (activeProperty.equals("quarkus.config.profile.parent")) {
if (!activeProperty.equals(property)) {
properties.remove(activeProperty);
properties.add(property);
continue;
}
if (activeProperty.equals("quarkus.config.profile.parent") && !activeProperty.equals(property)) {
properties.remove(activeProperty);
}
properties.add(activeProperty);
properties.add(property);
}

return properties;
Expand All @@ -1147,6 +1123,8 @@ public Set<String> getPropertyNames() {
*/
private SmallRyeConfig getConfigForRuntimeRecording() {
SmallRyeConfigBuilder builder = ConfigUtils.emptyConfigBuilder();
// Do not use a profile, so we can record both profile properties and main properties of the active profile
builder.getProfiles().add("");
builder.getSources().clear();
builder.getSourceProviders().clear();
builder.setAddDefaultSources(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
import io.quarkus.deployment.builditem.GeneratedClassBuildItem;
import io.quarkus.deployment.builditem.MainBytecodeRecorderBuildItem;
import io.quarkus.deployment.builditem.RuntimeConfigSetupCompleteBuildItem;
import io.quarkus.gizmo.CatchBlockCreator;
import io.quarkus.gizmo.ClassCreator;
import io.quarkus.gizmo.ClassOutput;
import io.quarkus.gizmo.MethodCreator;
import io.quarkus.gizmo.TryBlock;
import io.quarkus.runtime.StartupContext;
import io.quarkus.runtime.StartupTask;
import io.quarkus.runtime.configuration.ConfigurationException;

public class RuntimeConfigSetupBuildStep {
private static final String RUNTIME_CONFIG_STARTUP_TASK_CLASS_NAME = "io.quarkus.deployment.steps.RuntimeConfigSetup";
Expand All @@ -40,17 +37,11 @@ void setupRuntimeConfig(
.interfaces(StartupTask.class).build()) {

try (MethodCreator method = clazz.getMethodCreator("deploy", void.class, StartupContext.class)) {
TryBlock tryBlock = method.tryBlock();
tryBlock.invokeVirtualMethod(
ofMethod(StartupContext.class, "setCurrentBuildStepName", void.class, String.class),
method.invokeVirtualMethod(ofMethod(StartupContext.class, "setCurrentBuildStepName", void.class, String.class),
method.getMethodParam(0), method.load("RuntimeConfigSetupBuildStep.setupRuntimeConfig"));

tryBlock.invokeStaticMethod(C_CREATE_RUN_TIME_CONFIG);
tryBlock.returnValue(null);

CatchBlockCreator cb = tryBlock.addCatch(RuntimeException.class);
cb.throwException(ConfigurationException.class, "Failed to read configuration properties",
cb.getCaughtException());
method.invokeStaticMethod(C_CREATE_RUN_TIME_CONFIG);
method.returnValue(null);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ private ContainerRuntimeUtil() {
* @return a fully resolved {@link ContainerRuntime} indicating if Docker or Podman is available and in rootless mode or not
* @throws IllegalStateException if no container runtime was found to build the image
*/
public static ContainerRuntime detectContainerRuntime() {
return detectContainerRuntime(true);
}

public static ContainerRuntime detectContainerRuntime(ContainerRuntime... orderToCheckRuntimes) {
return detectContainerRuntime(true, orderToCheckRuntimes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

import io.quarkus.bootstrap.logging.InitialConfigurator;
import io.quarkus.bootstrap.runner.RunnerClassLoader;
import io.quarkus.runtime.configuration.ConfigUtils;
import io.quarkus.runtime.configuration.ConfigurationException;
import io.quarkus.runtime.graal.DiagnosticPrinter;
import io.quarkus.runtime.util.ExceptionUtil;
import io.quarkus.runtime.util.StringUtil;
import io.smallrye.config.ConfigValidationException;
import sun.misc.Signal;
import sun.misc.SignalHandler;

Expand Down Expand Up @@ -188,16 +188,13 @@ public static void run(Application application, Class<? extends QuarkusApplicati
}
applicationLogger.warn("You can try to kill it with 'kill -9 <pid>'.");
}
} else if (ExceptionUtil.isAnyCauseInstanceOf(e, ConfigurationException.class)) {
} else if (rootCause instanceof ConfigurationException || rootCause instanceof ConfigValidationException) {
System.err.println(rootCause.getMessage());
e.printStackTrace();
} else if (rootCause instanceof PreventFurtherStepsException
&& !StringUtil.isNullOrEmpty(rootCause.getMessage())) {
System.err.println(rootCause.getMessage());
} else {
// If it is not a ConfigurationException it should be safe to call ConfigProvider.getConfig here
applicationLogger.errorv(e, "Failed to start application (with profile {0})",
ConfigUtils.getProfiles());
applicationLogger.errorv(e, "Failed to start application");
ensureConsoleLogsDrained();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,6 @@ public static Throwable getRootCause(Throwable exception) {
return chain.isEmpty() ? null : chain.get(chain.size() - 1);
}

public static <T> boolean isAnyCauseInstanceOf(Throwable exception, Class<T> classToCheck) {
Throwable curr = exception;
do {
if (classToCheck.isInstance(curr)) {
return true;
}
curr = curr.getCause();
} while (curr != null);
return false;
}

/**
* Creates and returns a new {@link Throwable} which has the following characteristics:
* <ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

import org.junit.jupiter.api.Test;

import io.quarkus.runtime.configuration.ConfigurationException;

/**
*
*/
Expand Down Expand Up @@ -61,11 +59,6 @@ public void testGetRootCause() {
assertEquals(NullPointerException.class, ExceptionUtil.getRootCause(new NullPointerException()).getClass());
}

@Test
public void testIsAnyCauseInstanceOf() {
assertTrue(ExceptionUtil.isAnyCauseInstanceOf(generateConfigurationException(), ConfigurationException.class));
}

private Throwable generateException() {
try {
try {
Expand All @@ -86,26 +79,4 @@ private Throwable generateException() {
}
throw new RuntimeException("Should not reach here");
}

private Throwable generateConfigurationException() {
try {
try {
Integer.parseInt("23.23232");
} catch (NumberFormatException nfe) {
throw new ConfigurationException("Incorrect param", nfe);
}
} catch (ConfigurationException ce) {
try {
throw new IOException("Request processing failed", ce);
} catch (IOException e) {
try {
throw new IOError(e);
} catch (IOError ie) {
return new RuntimeException("Unexpected exception", ie);
}
}
}
throw new RuntimeException("Should not reach here");
}

}
2 changes: 1 addition & 1 deletion devtools/gradle/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("com.gradle.develocity") version "3.17.4"
id("com.gradle.develocity") version "3.17.5"
}

develocity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected void processProjectState(QuarkusProject quarkusProject) throws MojoExe
final QuarkusCommandOutcome result = invoker.execute();
if (!result.isSuccess()) {
throw new MojoExecutionException(
"Failed to apply the updates.");
"Failed to apply the updates: " + result.getMessage());
}
} catch (QuarkusUpdateExitErrorException e) {
throw new MojoExecutionException(e.getMessage());
Expand Down
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<roaster-jdt.version>2.26.0.Final</roaster-jdt.version>
<maven-model-helper.version>36</maven-model-helper.version>
<eclipse-collections.version>11.1.0</eclipse-collections.version>
<jgit.version>6.9.0.202403050737-r</jgit.version>
<jgit.version>6.10.0.202406032230-r</jgit.version>

<quarkus-home-url>https://quarkus.io</quarkus-home-url>
<quarkus-base-url>https://github.com/quarkusio/quarkus</quarkus-base-url>
Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/http-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ include::{generated-dir}/config/quarkus-vertx-http-config-group-access-log-confi
|First line of the request | `%r` | `%{REQUEST_LINE}`
|HTTP status code of the response | `%s` | `%{RESPONSE_CODE}`
|Date and time, in Common Log Format format | `%t` | `%{DATE_TIME}`
|Date and time as defined by a DateTimeFormatter compliant string | | `%{time,date_fime_formatter_string}`
|Remote user that was authenticated | `%u` | `%{REMOTE_USER}`
|Requested URL path | `%U` | `%{REQUEST_URL}`
|Request relative path | `%R` | `%{REQUEST_PATH}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ Finally, the `quarkus.http.auth.permission.authenticated` permission is set to t
In this case, all paths are protected by a policy that ensures only `authenticated` users can access them.
For more information, see xref:security-authorize-web-endpoints-reference.adoc[Security Authorization Guide].

[NOTE]
====
When you do not configure a client secret with `quarkus.oidc.credentials.secret`, it is recommended to configure `quarkus.oidc.token-state-manager.encryption-secret`.
The `quarkus.oidc.token-state-manager.encryption-secret` enables the default token state manager to encrypt the user tokens in a browser cookie. If this key is not defined, and the `quarkus.oidc.credentials.secret` fallback is not configured, Quarkus uses a random key. A random key causes existing logins to be invalidated either on application restart or in environment with multiple instances of your application. Alternatively, encryption can also be disabled by setting `quarkus.oidc.token-state-manager.encryption-required` to `false`. However, you should disable secret encryption in development environments only.
The encryption secret is recommended to be 32 chars long. For example, `quarkus.oidc.token-state-manager.encryption-secret=AyM1SysPpbyDfgZld3umj1qzKObwVMk`
====

== Start and configure the Keycloak server

To start a Keycloak server, use Docker and run the following command:
Expand Down
Loading

0 comments on commit dfc6638

Please sign in to comment.