Skip to content

Commit

Permalink
Merge pull request #44581 from gsmet/3.17.0-backports-1
Browse files Browse the repository at this point in the history
[3.17] 3.17.0 backports 1
  • Loading branch information
gsmet authored Nov 20, 2024
2 parents 323ba29 + 9ea9a9f commit 4c3b5f6
Show file tree
Hide file tree
Showing 128 changed files with 2,520 additions and 710 deletions.
16 changes: 8 additions & 8 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
<smallrye-config.version>3.10.1</smallrye-config.version>
<smallrye-health.version>4.1.0</smallrye-health.version>
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
<smallrye-open-api.version>4.0.2</smallrye-open-api.version>
<smallrye-open-api.version>4.0.3</smallrye-open-api.version>
<smallrye-graphql.version>2.11.0</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.6.1</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.6.0</smallrye-jwt.version>
<smallrye-fault-tolerance.version>6.6.2</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.6.1</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.15.0</smallrye-mutiny-vertx-binding.version>
<smallrye-mutiny-vertx-binding.version>3.16.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>4.25.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>2.7.0</smallrye-stork.version>
<jakarta.activation.version>2.1.3</jakarta.activation.version>
Expand Down Expand Up @@ -110,12 +110,12 @@
<wildfly-elytron.version>2.6.0.Final</wildfly-elytron.version>
<jboss-marshalling.version>2.2.1.Final</jboss-marshalling.version>
<jboss-threads.version>3.8.0.Final</jboss-threads.version>
<vertx.version>4.5.10</vertx.version>
<vertx.version>4.5.11</vertx.version>
<httpclient.version>4.5.14</httpclient.version>
<httpcore.version>4.4.16</httpcore.version>
<httpasync.version>4.1.5</httpasync.version>
<cronutils.version>9.2.1</cronutils.version>
<quartz.version>2.3.2</quartz.version>
<quartz.version>2.5.0</quartz.version>
<h2.version>2.3.230</h2.version> <!-- When updating, needs to be matched in io.quarkus.hibernate.orm.runtime.config.DialectVersions
and the dependency jts-core needs to be updated in extensions/jdbc/jdbc-h2/runtime/pom.xml -->
<postgresql-jdbc.version>42.7.4</postgresql-jdbc.version>
Expand All @@ -129,10 +129,10 @@
<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.5</junit.jupiter.version>
<infinispan.version>15.0.10.Final</infinispan.version>
<infinispan.version>15.0.11.Final</infinispan.version>
<infinispan.protostream.version>5.0.12.Final</infinispan.protostream.version>
<caffeine.version>3.1.8</caffeine.version>
<netty.version>4.1.111.Final</netty.version>
<netty.version>4.1.115.Final</netty.version>
<brotli4j.version>1.16.0</brotli4j.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package io.quarkus.deployment.builditem;

import io.quarkus.builder.item.MultiBuildItem;
import io.quarkus.deployment.pkg.NativeConfig;

/**
* A build item that indicates whether native monitoring is enabled and which option from {@link NativeConfig.MonitoringOption}.
* To be used in the native image generation.
*/
public final class NativeMonitoringBuildItem extends MultiBuildItem {
private final NativeConfig.MonitoringOption option;

public NativeMonitoringBuildItem(NativeConfig.MonitoringOption option) {
this.option = option;
}

public NativeConfig.MonitoringOption getOption() {
return this.option;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* register the following:
* <p>
* - Superclasses
* - Subclasses
* - Component types of collections
* - Types used in bean properties (if method reflection is enabled)
* - Field types (if field reflection is enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@
import io.smallrye.config.EnvConfigSource;
import io.smallrye.config.ProfileConfigSourceInterceptor;
import io.smallrye.config.PropertiesConfigSource;
import io.smallrye.config.PropertyName;
import io.smallrye.config.SecretKeys;
import io.smallrye.config.SmallRyeConfig;
import io.smallrye.config.SmallRyeConfigBuilder;
import io.smallrye.config.SmallRyeConfigBuilderCustomizer;
import io.smallrye.config.SysPropConfigSource;
import io.smallrye.config.common.AbstractConfigSource;

Expand Down Expand Up @@ -626,35 +628,27 @@ ReadResult run() {
objectsByClass.put(mapping.getKlass(), config.getConfigMapping(mapping.getKlass(), mapping.getPrefix()));
}

// Build Time Values Recording
for (ConfigClass mapping : buildTimeMappings) {
Set<String> mappedProperties = ConfigMappings.mappedProperties(mapping, allProperties);
for (String property : mappedProperties) {
Set<PropertyName> buildTimeNames = getMappingsNames(buildTimeMappings);
Set<PropertyName> buildTimeRunTimeNames = getMappingsNames(buildTimeRunTimeMappings);
Set<PropertyName> runTimeNames = getMappingsNames(runTimeMappings);
for (String property : allProperties) {
PropertyName name = new PropertyName(property);
if (buildTimeNames.contains(name)) {
unknownBuildProperties.remove(property);
ConfigValue value = config.getConfigValue(property);
if (value.getRawValue() != null) {
allBuildTimeValues.put(value.getNameProfiled(), value.getRawValue());
}
}
}

// Build Time and Run Time Values Recording
for (ConfigClass mapping : buildTimeRunTimeMappings) {
Set<String> mappedProperties = ConfigMappings.mappedProperties(mapping, allProperties);
for (String property : mappedProperties) {
if (buildTimeRunTimeNames.contains(name)) {
unknownBuildProperties.remove(property);
ConfigValue value = config.getConfigValue(property);
if (value.getRawValue() != null) {
allBuildTimeValues.put(value.getNameProfiled(), value.getRawValue());
buildTimeRunTimeValues.put(value.getNameProfiled(), value.getRawValue());
}
}
}

// Run Time Values Recording
for (ConfigClass mapping : runTimeMappings) {
Set<String> mappedProperties = ConfigMappings.mappedProperties(mapping, allProperties);
for (String property : mappedProperties) {
if (runTimeNames.contains(name)) {
unknownBuildProperties.remove(property);
ConfigValue value = runtimeConfig.getConfigValue(property);
if (value.getRawValue() != null) {
Expand Down Expand Up @@ -1119,6 +1113,17 @@ private SmallRyeConfig getConfigForRuntimeRecording() {
builder.getProfiles().add("");
builder.getSources().clear();
builder.getSourceProviders().clear();
builder.withCustomizers(new SmallRyeConfigBuilderCustomizer() {
@Override
public void configBuilder(final SmallRyeConfigBuilder builder) {
builder.getMappingsBuilder().getMappings().clear();
}

@Override
public int priority() {
return Integer.MAX_VALUE;
}
});
builder.setAddDefaultSources(false)
// Customizers may duplicate sources, but not much we can do about it, we need to run them
.addDiscoveredCustomizers()
Expand Down Expand Up @@ -1216,6 +1221,14 @@ private static void getDefaults(
patternMap.getChild(childName));
}
}

private static Set<PropertyName> getMappingsNames(final List<ConfigClass> configMappings) {
Set<String> names = new HashSet<>();
for (ConfigClass configMapping : configMappings) {
names.addAll(ConfigMappings.getProperties(configMapping).keySet());
}
return PropertiesUtil.toPropertyNames(names);
}
}

public static final class ReadResult {
Expand Down
Loading

0 comments on commit 4c3b5f6

Please sign in to comment.