Skip to content

Commit

Permalink
Updating SmallRye-config to 3.5.2
Browse files Browse the repository at this point in the history
- Updating SmallRye-config to 3.5.2
- Updating SmallRye-common to 2.2.0
- Overlaying EnvconfigSource from SmallRye-config to add fix for issues OpenLiberty#27482 and OpenLiberty#27523
- Updating OLSmallRyeConfigBuilder.java to reload EnvVars upon checkpoint restore (part of fix for OpenLiberty#27523)
  • Loading branch information
jakub-pomykala committed Feb 7, 2024
1 parent ecbfce8 commit 667a55e
Show file tree
Hide file tree
Showing 6 changed files with 441 additions and 29 deletions.
16 changes: 8 additions & 8 deletions dev/cnf/dependabot/check_this_in_if_it_changes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@
<dependency>
<groupId>io.smallrye.common</groupId>
<artifactId>smallrye-common-annotation</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>io.smallrye.common</groupId>
Expand All @@ -924,7 +924,7 @@
<dependency>
<groupId>io.smallrye.common</groupId>
<artifactId>smallrye-common-classloader</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>io.smallrye.common</groupId>
Expand All @@ -934,7 +934,7 @@
<dependency>
<groupId>io.smallrye.common</groupId>
<artifactId>smallrye-common-constraint</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>io.smallrye.common</groupId>
Expand All @@ -944,7 +944,7 @@
<dependency>
<groupId>io.smallrye.common</groupId>
<artifactId>smallrye-common-expression</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>io.smallrye.common</groupId>
Expand All @@ -954,7 +954,7 @@
<dependency>
<groupId>io.smallrye.common</groupId>
<artifactId>smallrye-common-function</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>io.smallrye.config</groupId>
Expand All @@ -964,7 +964,7 @@
<dependency>
<groupId>io.smallrye.config</groupId>
<artifactId>smallrye-config-common</artifactId>
<version>3.3.0</version>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>io.smallrye.config</groupId>
Expand All @@ -974,7 +974,7 @@
<dependency>
<groupId>io.smallrye.config</groupId>
<artifactId>smallrye-config-core</artifactId>
<version>3.3.0</version>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>io.smallrye.config</groupId>
Expand All @@ -984,7 +984,7 @@
<dependency>
<groupId>io.smallrye.config</groupId>
<artifactId>smallrye-config</artifactId>
<version>3.3.0</version>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>io.smallrye.reactive</groupId>
Expand Down
16 changes: 8 additions & 8 deletions dev/cnf/oss_dependencies.maven
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,21 @@ io.prometheus:simpleclient_tracer_otel_agent:0.15.0
io.reactivex.rxjava2:rxjava:2.2.19
io.reactivex:rxjava:1.3.8
io.smallrye.common:smallrye-common-annotation:1.6.0
io.smallrye.common:smallrye-common-annotation:2.1.0
io.smallrye.common:smallrye-common-annotation:2.2.0
io.smallrye.common:smallrye-common-classloader:1.6.0
io.smallrye.common:smallrye-common-classloader:2.1.0
io.smallrye.common:smallrye-common-classloader:2.2.0
io.smallrye.common:smallrye-common-constraint:1.6.0
io.smallrye.common:smallrye-common-constraint:2.1.0
io.smallrye.common:smallrye-common-constraint:2.2.0
io.smallrye.common:smallrye-common-expression:1.6.0
io.smallrye.common:smallrye-common-expression:2.1.0
io.smallrye.common:smallrye-common-expression:2.2.0
io.smallrye.common:smallrye-common-function:1.6.0
io.smallrye.common:smallrye-common-function:2.1.0
io.smallrye.common:smallrye-common-function:2.2.0
io.smallrye.config:smallrye-config-common:2.5.1
io.smallrye.config:smallrye-config-common:3.3.0
io.smallrye.config:smallrye-config-common:3.5.2
io.smallrye.config:smallrye-config-core:2.5.1
io.smallrye.config:smallrye-config-core:3.3.0
io.smallrye.config:smallrye-config-core:3.5.2
io.smallrye.config:smallrye-config:2.5.1
io.smallrye.config:smallrye-config:3.3.0
io.smallrye.config:smallrye-config:3.5.2
io.smallrye.reactive:mutiny-reactive-streams-operators-jakarta:2.5.6
io.smallrye.reactive:mutiny-zero-flow-adapters:1.0.0
io.smallrye.reactive:mutiny:2.5.6
Expand Down
12 changes: 6 additions & 6 deletions dev/io.openliberty.io.smallrye.common2/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Bundle-SymbolicName: io.openliberty.io.smallrye.common2; singleton:=true


Export-Package: \
io.smallrye.common.*; version="2.1.0"
io.smallrye.common.*; version="2.2.0"

instrument.disabled: true

-buildpath: \
io.smallrye.common:smallrye-common-annotation;version=2.1.0;strategy=exact, \
io.smallrye.common:smallrye-common-expression;version=2.1.0;strategy=exact, \
io.smallrye.common:smallrye-common-constraint;version=2.1.0;strategy=exact, \
io.smallrye.common:smallrye-common-function;version=2.1.0;strategy=exact, \
io.smallrye.common:smallrye-common-classloader;version=2.1.0;strategy=exact
io.smallrye.common:smallrye-common-annotation;version=2.2.0;strategy=exact, \
io.smallrye.common:smallrye-common-expression;version=2.2.0;strategy=exact, \
io.smallrye.common:smallrye-common-constraint;version=2.2.0;strategy=exact, \
io.smallrye.common:smallrye-common-function;version=2.2.0;strategy=exact, \
io.smallrye.common:smallrye-common-classloader;version=2.2.0;strategy=exact
8 changes: 4 additions & 4 deletions dev/io.openliberty.io.smallrye.config3/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ Import-Package: \
*

Export-Package: \
io.smallrye.config.*;version="3.3.0"
io.smallrye.config.*;version="3.5.2"


-buildpath: \
io.openliberty.io.smallrye.common2;version=latest, \
io.smallrye.config:smallrye-config;version=3.3.0;strategy=exact, \
io.smallrye.config:smallrye-config-common;version=3.3.0;strategy=exact, \
io.smallrye.config:smallrye-config-core;version=3.3.0;strategy=exact, \
io.smallrye.config:smallrye-config;version=3.5.2;strategy=exact, \
io.smallrye.config:smallrye-config-common;version=3.5.2;strategy=exact, \
io.smallrye.config:smallrye-config-core;version=3.5.2;strategy=exact, \
io.openliberty.jakarta.cdi.4.0;version=latest, \
io.openliberty.jakarta.annotation.2.1;version=latest, \
io.openliberty.org.eclipse.microprofile.config.3.1;version=latest, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-2.0/
*
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
Expand All @@ -26,6 +26,7 @@
import com.ibm.websphere.ras.annotation.Trivial;
import com.ibm.ws.ffdc.annotation.FFDCIgnore;

import io.openliberty.checkpoint.spi.CheckpointHook;
import io.openliberty.checkpoint.spi.CheckpointPhase;
import io.openliberty.microprofile.config.internal.extension.OLSmallRyeConfigExtension.UnpauseRecording;
import io.openliberty.microprofile.config.internal.serverxml.AppPropertyConfigSource;
Expand Down Expand Up @@ -53,7 +54,17 @@ protected List<ConfigSource> getDefaultSources() {
for (ListIterator<ConfigSource> iSources = defaultSources.listIterator(); iSources.hasNext();) {
ConfigSource source = iSources.next();
if (source instanceof EnvConfigSource) {
iSources.set(new EnvConfigSource(doPrivileged((PrivilegedAction<Map<String, String>>) System::getenv), source.getOrdinal()));
EnvConfigSource envConfig = new EnvConfigSource(doPrivileged((PrivilegedAction<Map<String, String>>) System::getenv), source.getOrdinal());
// If checkpoint has been restored a new checkpointHook will be created on restore to reload the envVars map
if (!CheckpointPhase.getPhase().restored()) {
CheckpointPhase.getPhase().addSingleThreadedHook(new CheckpointHook() {
@Override
public void restore() {
envConfig.reloadEnvironment();
};
});
}
iSources.set(envConfig);
}
}

Expand Down Expand Up @@ -92,4 +103,4 @@ private SmallRyeConfig doBuild() {
}
return config;
}
}
}
Loading

0 comments on commit 667a55e

Please sign in to comment.