Skip to content

Commit

Permalink
Merge pull request #40561 from gsmet/3.10.1-backports-1
Browse files Browse the repository at this point in the history
[3.10] 3.10.1 backports 1
  • Loading branch information
gsmet committed May 11, 2024
2 parents aa799f8 + 68b7e76 commit b96e9cd
Show file tree
Hide file tree
Showing 132 changed files with 1,972 additions and 478 deletions.
28 changes: 11 additions & 17 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<jandex.version>3.1.7</jandex.version>
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<javax.inject.version>1</javax.inject.version>
<parsson.version>1.1.5</parsson.version>
<parsson.version>1.1.6</parsson.version>
<resteasy-microprofile.version>2.1.5.Final</resteasy-microprofile.version>
<resteasy-spring-web.version>3.1.2.Final</resteasy-spring-web.version>
<resteasy.version>6.2.7.Final</resteasy.version>
Expand All @@ -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.1.Final</quarkus-http.version>
<quarkus-http.version>5.2.2.Final</quarkus-http.version>
<micrometer.version>1.12.4</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 @@ -55,7 +55,7 @@
<smallrye-health.version>4.1.0</smallrye-health.version>
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
<smallrye-open-api.version>3.10.0</smallrye-open-api.version>
<smallrye-graphql.version>2.8.2</smallrye-graphql.version>
<smallrye-graphql.version>2.8.3</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.3.0</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.5.1</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.0</smallrye-context-propagation.version>
Expand Down Expand Up @@ -85,7 +85,7 @@
<jakarta.xml.bind-api.version>4.0.2</jakarta.xml.bind-api.version>
<jaxb-runtime.version>4.0.5</jaxb-runtime.version>
<asm.version>9.7</asm.version>
<commons-io.version>2.16.0</commons-io.version>
<commons-io.version>2.16.1</commons-io.version>
<jboss-metadata-web.version>16.0.0.Final</jboss-metadata-web.version>
<maven-toolchain.version>3.0-alpha-2</maven-toolchain.version>
<plexus-component-annotations.version>2.1.0</plexus-component-annotations.version>
Expand All @@ -95,19 +95,19 @@
<jackson-bom.version>2.17.0</jackson-bom.version>
<commons-logging-jboss-logging.version>1.0.0.Final</commons-logging-jboss-logging.version>
<commons-lang3.version>3.14.0</commons-lang3.version>
<commons-codec.version>1.16.1</commons-codec.version>
<commons-codec.version>1.17.0</commons-codec.version>
<classmate.version>1.7.0</classmate.version>
<!-- WARNING: When updating, also align other properties on this version:
bytebuddy.version (just below), hibernate-orm.version-for-documentation (in docs/pom.xml)
and both hibernate-orm.version and antlr.version in build-parent/pom.xml
WARNING again for diffs that don't provide enough context: when updating, see above -->
<hibernate-orm.version>6.4.4.Final</hibernate-orm.version>
<hibernate-orm.version>6.4.7.Final</hibernate-orm.version>
<bytebuddy.version>1.14.11</bytebuddy.version> <!-- Version controlled by Hibernate ORM's needs -->
<hibernate-commons-annotations.version>6.0.6.Final</hibernate-commons-annotations.version> <!-- version controlled by Hibernate ORM -->
<hibernate-reactive.version>2.2.2.Final</hibernate-reactive.version>
<hibernate-validator.version>8.0.1.Final</hibernate-validator.version>
<!-- When updating, align hibernate-search.version-for-documentation in docs/pom.xml -->
<hibernate-search.version>7.1.0.Final</hibernate-search.version>
<hibernate-search.version>7.1.1.Final</hibernate-search.version>
<narayana.version>7.0.1.Final</narayana.version>
<agroal.version>2.3</agroal.version>
<jboss-transaction-spi.version>8.0.0.Final</jboss-transaction-spi.version>
Expand All @@ -116,7 +116,6 @@
<wildfly.openssl-java.version>2.2.5.Final</wildfly.openssl-java.version>
<wildfly.openssl-linux.version>2.2.2.Final</wildfly.openssl-linux.version>
<jboss-logging-annotations.version>2.2.1.Final</jboss-logging-annotations.version>
<slf4j.version>2.0.6</slf4j.version>
<slf4j-jboss-logmanager.version>2.0.0.Final</slf4j-jboss-logmanager.version>
<wildfly-common.version>1.7.0.Final</wildfly-common.version>
<wildfly-client-config.version>1.0.1.Final</wildfly-client-config.version>
Expand All @@ -140,8 +139,8 @@
<shrinkwrap.version>1.2.6</shrinkwrap.version>
<hamcrest.version>2.2</hamcrest.version><!-- The version needs to be compatible with both REST Assured and Awaitility -->
<junit.jupiter.version>5.10.2</junit.jupiter.version>
<infinispan.version>15.0.1.Final</infinispan.version>
<infinispan.protostream.version>5.0.2.Final</infinispan.protostream.version>
<infinispan.version>15.0.2.Final</infinispan.version>
<infinispan.protostream.version>5.0.3.Final</infinispan.protostream.version>
<caffeine.version>3.1.5</caffeine.version>
<netty.version>4.1.108.Final</netty.version>
<brotli4j.version>1.16.0</brotli4j.version>
Expand All @@ -155,7 +154,7 @@
<!-- Scala is used by Kafka so we need to choose a compatible version -->
<scala.version>2.13.13</scala.version>
<aws-lambda-java.version>1.2.3</aws-lambda-java.version>
<aws-lambda-java-events.version>3.11.4</aws-lambda-java-events.version>
<aws-lambda-java-events.version>3.11.5</aws-lambda-java-events.version>
<aws-xray.version>2.15.2</aws-xray.version>
<azure-functions-java-library.version>3.1.0</azure-functions-java-library.version>
<azure-functions-java-spi.version>1.0.0</azure-functions-java-spi.version>
Expand All @@ -166,7 +165,7 @@
<dekorate.version>4.1.2</dekorate.version> <!-- Please check with Java Operator SDK team before updating -->
<maven-invoker.version>3.2.0</maven-invoker.version>
<awaitility.version>4.2.1</awaitility.version>
<jboss-logmanager.version>3.0.4.Final</jboss-logmanager.version>
<jboss-logmanager.version>3.0.6.Final</jboss-logmanager.version>
<flyway.version>10.10.0</flyway.version>
<yasson.version>3.0.3</yasson.version>
<!-- liquibase-mongodb is not released everytime with liquibase anymore, but the two versions need to be compatible -->
Expand Down Expand Up @@ -5064,11 +5063,6 @@
<artifactId>asm-util</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.slf4j</groupId>
<artifactId>slf4j-jboss-logmanager</artifactId>
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 @@ -28,7 +28,7 @@
<vaadin-router.version>1.7.5</vaadin-router.version>
<lit-state.version>1.7.0</lit-state.version>
<echarts.version>5.5.0</echarts.version>
<codeblock.version>1.0.12</codeblock.version>
<codeblock.version>1.0.13</codeblock.version>
<es-module-shims.version>1.8.3</es-module-shims.version>
<path-to-regexp.version>2.4.0</path-to-regexp.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,13 @@ ReadResult run() {
// it's not managed by us; record it
ConfigValue configValue = withoutExpansion(() -> runtimeConfig.getConfigValue(propertyName));
if (configValue.getValue() != null) {
runTimeValues.put(configValue.getNameProfiled(), configValue.getValue());
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());
}
}

// in the case the user defined compound keys in YAML (or similar config source, that quotes the name)
Expand Down Expand Up @@ -1045,6 +1051,7 @@ private Converter<?> getConverter(SmallRyeConfig config, Field field, ConverterT
* want to record properties set by the compiling JVM (or other properties that are only related to the build).
*/
private Set<String> getAllProperties(final Set<String> registeredRoots) {
// Collects all properties from allowed sources
Set<String> sourcesProperties = new HashSet<>();
for (ConfigSource configSource : config.getConfigSources()) {
if (configSource instanceof SysPropConfigSource || configSource instanceof EnvConfigSource
Expand Down Expand Up @@ -1120,7 +1127,16 @@ public Set<String> getPropertyNames() {

String[] profiles = config.getProfiles().toArray(String[]::new);
for (String property : builder.build().getPropertyNames()) {
properties.add(ProfileConfigSourceInterceptor.activeName(property, profiles));
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;
}
}
properties.add(activeProperty);
}

return properties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,18 @@ public final class ConfigCompatibility {
ConfigCompatibility::quarkusPackageIncludedOptionalDependencies),
entry(List.of("quarkus", "package", "include-dependency-list"),
ConfigCompatibility::quarkusPackageIncludeDependencyList),
entry(List.of("quarkus", "package", "decompiler", "version"),
ConfigCompatibility::quarkusPackageDecompilerVersion),
entry(List.of("quarkus", "package", "decompiler", "enabled"),
ConfigCompatibility::quarkusPackageDecompilerEnabled),
entry(List.of("quarkus", "package", "decompiler", "jar-directory"),
ConfigCompatibility::quarkusPackageDecompilerJarDirectory),
entry(List.of("quarkus", "package", "vineflower", "version"),
ConfigCompatibility::quarkusPackageVineflowerVersion),
ConfigCompatibility::quarkusPackageDecompilerVersion),
entry(List.of("quarkus", "package", "vineflower", "enabled"),
ConfigCompatibility::quarkusPackageVineflowerEnabled),
ConfigCompatibility::quarkusPackageDecompilerEnabled),
entry(List.of("quarkus", "package", "vineflower", "jar-directory"),
ConfigCompatibility::quarkusPackageVineflowerJarDirectory),
ConfigCompatibility::quarkusPackageDecompilerJarDirectory),
entry(List.of("quarkus", "package", "manifest", "attributes", "*"),
ConfigCompatibility::quarkusPackageManifestAttributes),
entry(List.of("quarkus", "package", "manifest", "sections", "*", "*"),
Expand Down Expand Up @@ -102,9 +108,10 @@ public final class ConfigCompatibility {
ConfigCompatibility::quarkusPackageJarManifestSections),
entry(List.of("quarkus", "package", "jar", "manifest", "add-implementation-entries"),
ConfigCompatibility::quarkusPackageJarManifestAddImplementationEntries),
entry(List.of("quarkus", "package", "decompiler", "enabled"), ConfigCompatibility::quarkusPackageDecompilerEnabled),
entry(List.of("quarkus", "package", "decompiler", "jar-directory"),
ConfigCompatibility::quarkusPackageDecompilerJarDirectory));
entry(List.of("quarkus", "package", "jar", "decompiler", "enabled"),
ConfigCompatibility::quarkusPackageJarDecompilerEnabled),
entry(List.of("quarkus", "package", "jar", "decompiler", "jar-directory"),
ConfigCompatibility::quarkusPackageJarDecompilerJarDirectory));

/**
* The interceptor at the front of the chain which handles hiding deprecated properties from the iterator.
Expand Down Expand Up @@ -271,17 +278,17 @@ private static List<String> quarkusPackageIncludedOptionalDependencies(ConfigSou
return List.of("quarkus.package.jar.included-optional-dependencies");
}

private static List<String> quarkusPackageVineflowerVersion(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
private static List<String> quarkusPackageDecompilerVersion(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
// always hide this ignored property
return List.of();
}

private static List<String> quarkusPackageVineflowerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
private static List<String> quarkusPackageDecompilerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
// simple mapping to a new name
return List.of("quarkus.package.decompiler.enabled");
}

private static List<String> quarkusPackageVineflowerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
private static List<String> quarkusPackageDecompilerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
// simple mapping to a new name
return List.of("quarkus.package.decompiler.jar-directory");
}
Expand Down Expand Up @@ -500,26 +507,30 @@ private static ConfigValue quarkusPackageJarManifestAddImplementationEntries(Con
}
}

private static ConfigValue quarkusPackageDecompilerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.vineflower.enabled");
private static ConfigValue quarkusPackageJarDecompilerEnabled(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.decompiler.enabled");
if (oldVal == null) {
// on to the default value
return ctxt.proceed(ni.getName());
} else {
// map old name to new name
return oldVal.withName(ni.getName());
oldVal = ctxt.restart("quarkus.package.vineflower.enabled");
if (oldVal == null) {
// on to the default value
return ctxt.proceed(ni.getName());
}
}
// map old name to new name
return oldVal.withName(ni.getName());
}

private static ConfigValue quarkusPackageDecompilerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.vineflower.jar-directory");
private static ConfigValue quarkusPackageJarDecompilerJarDirectory(ConfigSourceInterceptorContext ctxt, NameIterator ni) {
ConfigValue oldVal = ctxt.restart("quarkus.package.decompiler.jar-directory");
if (oldVal == null) {
// on to the default value
return ctxt.proceed(ni.getName());
} else {
// map old name to new name
return oldVal.withName(ni.getName());
oldVal = ctxt.restart("quarkus.package.vineflower.jar-directory");
if (oldVal == null) {
// on to the default value
return ctxt.proceed(ni.getName());
}
}
// map old name to new name
return oldVal.withName(ni.getName());
}

// utilities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public void accept(Path path) {

final ApplicationModel existingModel = appModel.getAppModel(appRoot);
System.setProperty("quarkus.package.jar.type", "mutable-jar");
System.setProperty("quarkus.native.enabled", "false");
try (CuratedApplication bootstrap = QuarkusBootstrap.builder()
.setAppArtifact(existingModel.getAppArtifact())
.setExistingModel(existingModel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import io.quarkus.deployment.annotations.BuildProducer;
Expand Down Expand Up @@ -46,8 +45,8 @@ public void set(List<SetClassPathSystemPropBuildItem> setCPItems,

}
}
String classPathValue = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString())
.collect(Collectors.joining(":"));
recorder.set(classPathValue);
List<String> allJarPaths = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString())
.toList();
recorder.set(allJarPaths);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,12 @@ private static Set<String> staticSafeServices(Set<String> services) {
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
Set<String> staticSafe = new HashSet<>();
for (String service : services) {
// SmallRye Config services are always safe, but they cannot be annotated with @StaticInitSafe
if (service.startsWith("io.smallrye.config.")) {
staticSafe.add(service);
continue;
}

try {
Class<?> serviceClass = classloader.loadClass(service);
if (serviceClass.isAnnotationPresent(StaticInitSafe.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ public static void run(Application application, Class<? extends QuarkusApplicati
} else {
for (Integer port : ports) {
applicationLogger
.warnf("Use 'netstat -anop | grep %d' to identify the process occupying the port.", port);
.warnf("Use 'ss -anop | grep %d' or 'netstat -anop | grep %d' to identify the process occupying the port.",
port);
}
applicationLogger.warn("You can try to kill it with 'kill -9 <pid>'.");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package io.quarkus.runtime;

import java.util.List;

import io.quarkus.runtime.annotations.Recorder;

@Recorder
public class ClassPathSystemPropertyRecorder {

public void set(String value) {
System.setProperty("java.class.path", value);
public void set(List<String> allJarPaths) {
System.setProperty("java.class.path", String.join(":", allJarPaths));
}
}
Loading

0 comments on commit b96e9cd

Please sign in to comment.