Skip to content

Commit

Permalink
Merge pull request #39034 from gsmet/3.8.1-backports-2
Browse files Browse the repository at this point in the history
3.8.1 backports 2
  • Loading branch information
gsmet authored Feb 28, 2024
2 parents 90b63ff + e42a281 commit 3a4e21d
Show file tree
Hide file tree
Showing 16 changed files with 232 additions and 105 deletions.
6 changes: 3 additions & 3 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<quartz.version>2.3.2</quartz.version>
<h2.version>2.2.224</h2.version> <!-- When updating, needs to be matched in io.quarkus.hibernate.orm.runtime.config.DialectVersions -->
<postgresql-jdbc.version>42.7.2</postgresql-jdbc.version>
<mariadb-jdbc.version>3.3.2</mariadb-jdbc.version>
<mariadb-jdbc.version>3.3.3</mariadb-jdbc.version>
<mysql-jdbc.version>8.3.0</mysql-jdbc.version>
<mssql-jdbc.version>12.4.2.jre11</mssql-jdbc.version>
<adal4j.version>1.6.7</adal4j.version>
Expand All @@ -145,7 +145,7 @@
<infinispan.protostream.version>4.6.5.Final</infinispan.protostream.version>
<caffeine.version>3.1.5</caffeine.version>
<netty.version>4.1.106.Final</netty.version>
<brotli4j.version>1.12.0</brotli4j.version>
<brotli4j.version>1.14.0</brotli4j.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
<jboss-logging.version>3.5.3.Final</jboss-logging.version>
<mutiny.version>2.5.7</mutiny.version>
Expand Down Expand Up @@ -189,7 +189,7 @@
<jna.version>5.8.0</jna.version><!-- should satisfy both testcontainers and mongodb -->
<antlr.version>4.13.0</antlr.version><!-- needs to align with same property in build-parent/pom.xml -->
<quarkus-security.version>2.0.3.Final</quarkus-security.version>
<keycloak.version>23.0.6</keycloak.version>
<keycloak.version>23.0.7</keycloak.version>
<logstash-gelf.version>1.15.1</logstash-gelf.version>
<checker-qual.version>3.42.0</checker-qual.version>
<error-prone-annotations.version>2.24.0</error-prone-annotations.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 @@ -106,7 +106,7 @@

<!-- The image to use for tests that run Keycloak -->
<!-- IMPORTANT: If this is changed you must also update bom/application/pom.xml and KeycloakBuildTimeConfig/DevServicesConfig in quarkus-oidc/deployment to match the version -->
<keycloak.version>23.0.6</keycloak.version>
<keycloak.version>23.0.7</keycloak.version>
<keycloak.wildfly.version>19.0.3</keycloak.wildfly.version>
<keycloak.docker.image>quay.io/keycloak/keycloak:${keycloak.version}</keycloak.docker.image>
<keycloak.docker.legacy.image>quay.io/keycloak/keycloak:${keycloak.wildfly.version}-legacy</keycloak.docker.legacy.image>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.quarkus.gradle.extension;

import static io.quarkus.runtime.LaunchMode.*;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -38,6 +40,7 @@
import io.quarkus.gradle.tasks.QuarkusGradleUtils;
import io.quarkus.gradle.tooling.ToolingUtils;
import io.quarkus.runtime.LaunchMode;
import io.smallrye.config.SmallRyeConfig;

public abstract class QuarkusPluginExtension extends AbstractQuarkusExtension {
private final SourceSetExtension sourceSetExtension;
Expand Down Expand Up @@ -67,10 +70,14 @@ public void manifest(Action<Manifest> action) {

public void beforeTest(Test task) {
try {
final Map<String, Object> props = task.getSystemProperties();
Map<String, Object> props = task.getSystemProperties();
ApplicationModel appModel = getApplicationModel(TEST);

SmallRyeConfig config = buildEffectiveConfiguration(appModel.getAppArtifact()).config();
config.getOptionalValue(TEST.getProfileKey(), String.class)
.ifPresent(value -> props.put(TEST.getProfileKey(), value));

final ApplicationModel appModel = getApplicationModel(LaunchMode.TEST);
final Path serializedModel = ToolingUtils.serializeAppModel(appModel, task, true);
Path serializedModel = ToolingUtils.serializeAppModel(appModel, task, true);
props.put(BootstrapConstants.SERIALIZED_TEST_APP_MODEL, serializedModel.toString());

StringJoiner outputSourcesDir = new StringJoiner(",");
Expand All @@ -79,10 +86,10 @@ public void beforeTest(Test task) {
}
props.put(BootstrapConstants.OUTPUT_SOURCES_DIR, outputSourcesDir.toString());

final SourceSetContainer sourceSets = getSourceSets();
final SourceSet mainSourceSet = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME);
SourceSetContainer sourceSets = getSourceSets();
SourceSet mainSourceSet = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME);

final File outputDirectoryAsFile = getLastFile(mainSourceSet.getOutput().getClassesDirs());
File outputDirectoryAsFile = getLastFile(mainSourceSet.getOutput().getClassesDirs());

Path projectDirPath = projectDir.toPath();

Expand Down Expand Up @@ -167,15 +174,15 @@ public Set<File> combinedOutputSourceDirs() {
}

public AppModelResolver getAppModelResolver() {
return getAppModelResolver(LaunchMode.NORMAL);
return getAppModelResolver(NORMAL);
}

public AppModelResolver getAppModelResolver(LaunchMode mode) {
return new AppModelGradleResolver(project, mode);
}

public ApplicationModel getApplicationModel() {
return getApplicationModel(LaunchMode.NORMAL);
return getApplicationModel(NORMAL);
}

public ApplicationModel getApplicationModel(LaunchMode mode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* Eventually used to construct a map with the <em>effective</em> config options from all the sources above and expose
* the Quarkus config objects like {@link PackageConfig}, {@link ClassLoadingConfig} and the underlying {@link SmallRyeConfig}.
*/
final class EffectiveConfig {
public final class EffectiveConfig {
private final Map<String, String> fullConfig;

private final SmallRyeConfig config;
Expand Down Expand Up @@ -84,7 +84,7 @@ private EffectiveConfig(Builder builder) {
this.fullConfig = generateFullConfigMap(config);
}

SmallRyeConfig config() {
public SmallRyeConfig config() {
return config;
}

Expand Down Expand Up @@ -126,7 +126,7 @@ static Builder builder() {
return new Builder();
}

Map<String, String> configMap() {
public Map<String, String> configMap() {
return fullConfig;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ For more information, see xref:security-oidc-bearer-token-authentication.adoc#in
[[keycloak-initialization]]
=== Keycloak initialization

The `quay.io/keycloak/keycloak:23.0.6` image which contains a Keycloak distribution powered by Quarkus is used to start a container by default.
The `quay.io/keycloak/keycloak:23.0.7` image which contains a Keycloak distribution powered by Quarkus is used to start a container by default.
`quarkus.keycloak.devservices.image-name` can be used to change the Keycloak image name.
For example, set it to `quay.io/keycloak/keycloak:19.0.3-legacy` to use a Keycloak distribution powered by WildFly.
Be aware that a Quarkus-based Keycloak distribution is only available starting from Keycloak `20.0.0`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.Optional;

import com.microsoft.azure.functions.ExecutionContext;
import com.microsoft.azure.functions.HttpMethod;
import com.microsoft.azure.functions.HttpRequestMessage;
import com.microsoft.azure.functions.HttpResponseMessage;
import com.microsoft.azure.functions.annotation.AuthorizationLevel;
Expand All @@ -16,10 +15,8 @@ public class Function extends BaseFunction {

@FunctionName(QUARKUS_HTTP)
public HttpResponseMessage run(
@HttpTrigger(name = "req", dataType = "binary", methods = { HttpMethod.GET, HttpMethod.HEAD, HttpMethod.POST,
HttpMethod.PUT,
HttpMethod.OPTIONS }, route = "{*path}", authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
final ExecutionContext context) {
@HttpTrigger(name = "req", dataType = "binary", route = "{*path}", authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
ExecutionContext context) {

return dispatch(request);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ private JibContainerBuilder createContainerBuilderFromFastJar(String baseJvmImag
// which would mean AppCDS would not be taken into account at all
entrypoint = List.of(RUN_JAVA_PATH);
envVars.put("JAVA_APP_JAR", workDirInContainer + "/" + JarResultBuildStep.QUARKUS_RUN_JAR);
envVars.put("JAVA_APP_DIR", workDirInContainer.toString());
envVars.put("JAVA_OPTS_APPEND", String.join(" ", determineEffectiveJvmArguments(jibConfig, appCDSResult)));
} else {
List<String> effectiveJvmArguments = determineEffectiveJvmArguments(jibConfig, appCDSResult);
Expand Down
8 changes: 8 additions & 0 deletions extensions/devservices/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
</exclusion>
</exclusions>
</dependency>
<!--
This should be removed once we upgrade to commons-compress 1.26.1 (or similar).
See https://github.com/quarkusio/quarkus/issues/38990
-->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit4-mock</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class DevServicesConfig {
* ends with `-legacy`.
* Override with `quarkus.keycloak.devservices.keycloak-x-image`.
*/
@ConfigItem(defaultValue = "quay.io/keycloak/keycloak:23.0.6")
@ConfigItem(defaultValue = "quay.io/keycloak/keycloak:23.0.7")
public String imageName;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public interface OtlpExporterTracesConfig {
* OTLP defines the encoding of telemetry data and the protocol used to exchange data between the client and the
* server. Depending on the exporter, the available protocols will be different.
* <p>
* Currently, only {@code grpc} and {@code http} are allowed.
* Currently, only {@code grpc} and {@code http/protobuf} are allowed.
*/
@WithDefault(Protocol.GRPC)
Optional<String> protocol();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,20 @@ private void logAppropriateWarning(GrpcStatus status,
+ statusMessage);
} else {
if (status == null) {
logger.log(
Level.WARNING,
"Failed to export "
+ type
+ "s. Server responded with error message: "
+ statusMessage);
if (statusMessage == null) {
logger.log(
Level.WARNING,
"Failed to export "
+ type
+ "s. Perhaps the collector does not support collecting traces using grpc? Try configuring 'quarkus.otel.exporter.otlp.traces.protocol=http/protobuf'");
} else {
logger.log(
Level.WARNING,
"Failed to export "
+ type
+ "s. Server responded with error message: "
+ statusMessage);
}
} else {
logger.log(
Level.WARNING,
Expand Down
Loading

0 comments on commit 3a4e21d

Please sign in to comment.