From a626eae425bcb3dc1620da144d5550333138207a Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Mon, 6 May 2024 14:34:30 +0200 Subject: [PATCH 1/2] refactor: move configuration loading logic out of the extension context --- .../edc/boot/config/ConfigurationLoader.java | 63 ++++++++ .../edc/boot/config/EnvironmentVariables.java | 35 +++++ .../edc/boot/config/SystemProperties.java | 33 +++++ .../DefaultServiceExtensionContext.java | 33 +---- .../edc/boot/system/runtime/BaseRuntime.java | 37 ++--- .../boot/config/ConfigurationLoaderTest.java | 140 ++++++++++++++++++ .../DefaultServiceExtensionContextTest.java | 118 ++------------- .../edc/boot/system/ExtensionLoaderTest.java | 15 +- .../boot/system/runtime/BaseRuntimeTest.java | 10 ++ .../DependencyInjectionExtension.java | 8 +- .../edc/junit/extensions/EdcExtension.java | 5 +- .../TestServiceExtensionContext.java | 11 +- ...nagementApiConfigurationExtensionTest.java | 4 +- .../sts/StsApiConfigurationExtensionTest.java | 4 +- .../DataPlaneSelectorApiExtensionTest.java | 3 +- ...ignalingApiConfigurationExtensionTest.java | 4 +- 16 files changed, 330 insertions(+), 193 deletions(-) create mode 100644 core/common/boot/src/main/java/org/eclipse/edc/boot/config/ConfigurationLoader.java create mode 100644 core/common/boot/src/main/java/org/eclipse/edc/boot/config/EnvironmentVariables.java create mode 100644 core/common/boot/src/main/java/org/eclipse/edc/boot/config/SystemProperties.java create mode 100644 core/common/boot/src/test/java/org/eclipse/edc/boot/config/ConfigurationLoaderTest.java diff --git a/core/common/boot/src/main/java/org/eclipse/edc/boot/config/ConfigurationLoader.java b/core/common/boot/src/main/java/org/eclipse/edc/boot/config/ConfigurationLoader.java new file mode 100644 index 00000000000..f653790f1c4 --- /dev/null +++ b/core/common/boot/src/main/java/org/eclipse/edc/boot/config/ConfigurationLoader.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.edc.boot.config; + +import org.eclipse.edc.boot.system.ServiceLocator; +import org.eclipse.edc.spi.monitor.Monitor; +import org.eclipse.edc.spi.system.ConfigurationExtension; +import org.eclipse.edc.spi.system.configuration.Config; +import org.eclipse.edc.spi.system.configuration.ConfigFactory; + +import java.util.Objects; + +/** + * Load configuration from configuration extensions, environment variables and system properties. + */ +public class ConfigurationLoader { + private final ServiceLocator serviceLocator; + private final EnvironmentVariables environmentVariables; + private final SystemProperties systemProperties; + + public ConfigurationLoader(ServiceLocator serviceLocator, EnvironmentVariables environmentVariables, SystemProperties systemProperties) { + this.serviceLocator = serviceLocator; + this.environmentVariables = environmentVariables; + this.systemProperties = systemProperties; + } + + /** + * Load configuration. + * Please note that Environment variables keys will be converted from the ENVIRONMENT_NOTATION to the dot.notation. + * + * @param monitor the monitor. + * @return the Config instance. + */ + public Config loadConfiguration(Monitor monitor) { + var config = serviceLocator.loadImplementors(ConfigurationExtension.class, false) + .stream().peek(extension -> { + extension.initialize(monitor); + monitor.info("Initialized " + extension.name()); + }) + .map(ConfigurationExtension::getConfig) + .filter(Objects::nonNull) + .reduce(Config::merge) + .orElse(ConfigFactory.empty()); + + var environmentConfig = ConfigFactory.fromEnvironment(environmentVariables.get()); + var systemPropertyConfig = ConfigFactory.fromProperties(systemProperties.get()); + + return config.merge(environmentConfig).merge(systemPropertyConfig); + } + +} diff --git a/core/common/boot/src/main/java/org/eclipse/edc/boot/config/EnvironmentVariables.java b/core/common/boot/src/main/java/org/eclipse/edc/boot/config/EnvironmentVariables.java new file mode 100644 index 00000000000..5701a053c46 --- /dev/null +++ b/core/common/boot/src/main/java/org/eclipse/edc/boot/config/EnvironmentVariables.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.edc.boot.config; + +import java.util.Map; +import java.util.function.Supplier; + + +/** + * Wrapping interface that provides Environment Variables + */ +public interface EnvironmentVariables extends Supplier> { + + /** + * Default implementation. + * + * @return the EnvironmentVariables default implementation. + */ + static EnvironmentVariables ofDefault() { + return System::getenv; + } + +} diff --git a/core/common/boot/src/main/java/org/eclipse/edc/boot/config/SystemProperties.java b/core/common/boot/src/main/java/org/eclipse/edc/boot/config/SystemProperties.java new file mode 100644 index 00000000000..f563f830400 --- /dev/null +++ b/core/common/boot/src/main/java/org/eclipse/edc/boot/config/SystemProperties.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.edc.boot.config; + +import java.util.Properties; +import java.util.function.Supplier; + +/** + * Wrapping interface that provides System Properties + */ +public interface SystemProperties extends Supplier { + + /** + * Default implementation. + * + * @return the SystemProperties default implementation. + */ + static SystemProperties ofDefault() { + return System::getProperties; + } +} diff --git a/core/common/boot/src/main/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContext.java b/core/common/boot/src/main/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContext.java index dbb3441e8c9..3b985526d9d 100644 --- a/core/common/boot/src/main/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContext.java +++ b/core/common/boot/src/main/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContext.java @@ -18,15 +18,11 @@ import org.eclipse.edc.boot.BootServicesExtension; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.monitor.Monitor; -import org.eclipse.edc.spi.system.ConfigurationExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; import org.eclipse.edc.spi.system.configuration.Config; -import org.eclipse.edc.spi.system.configuration.ConfigFactory; import java.util.HashMap; -import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.UUID; import static org.eclipse.edc.boot.BootServicesExtension.RUNTIME_ID; @@ -41,14 +37,13 @@ public class DefaultServiceExtensionContext implements ServiceExtensionContext { private static final String EDC_CONNECTOR_NAME = "edc.connector.name"; private final Map, Object> services = new HashMap<>(); - private final List configurationExtensions; + private final Config config; private boolean isReadOnly = false; private String participantId; private String runtimeId; - private Config config; - public DefaultServiceExtensionContext(Monitor monitor, List configurationExtensions) { - this.configurationExtensions = configurationExtensions; + public DefaultServiceExtensionContext(Monitor monitor, Config config) { + this.config = config; // register as service registerService(Monitor.class, monitor); } @@ -108,11 +103,6 @@ public void registerService(Class type, T service) { @Override public void initialize() { - configurationExtensions.forEach(ext -> { - ext.initialize(getMonitor()); - getMonitor().info("Initialized " + ext.name()); - }); - config = loadConfig(); participantId = getSetting(BootServicesExtension.PARTICIPANT_ID, ANONYMOUS_PARTICIPANT); if (ANONYMOUS_PARTICIPANT.equals(participantId)) { getMonitor().warning("The runtime is configured as an anonymous participant. DO NOT DO THIS IN PRODUCTION."); @@ -136,21 +126,4 @@ public void initialize() { } - // this method exists so that getting env vars can be mocked during testing - protected Map getEnvironmentVariables() { - return System.getenv(); - } - - private Config loadConfig() { - var config = configurationExtensions.stream() - .map(ConfigurationExtension::getConfig) - .filter(Objects::nonNull) - .reduce(Config::merge) - .orElse(ConfigFactory.empty()); - - var environmentConfig = ConfigFactory.fromEnvironment(getEnvironmentVariables()); - var systemPropertyConfig = ConfigFactory.fromProperties(System.getProperties()); - - return config.merge(environmentConfig).merge(systemPropertyConfig); - } } diff --git a/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java b/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java index 10ec2c6afef..c2ac2a326f7 100644 --- a/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java +++ b/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java @@ -16,6 +16,9 @@ package org.eclipse.edc.boot.system.runtime; +import org.eclipse.edc.boot.config.ConfigurationLoader; +import org.eclipse.edc.boot.config.EnvironmentVariables; +import org.eclipse.edc.boot.config.SystemProperties; import org.eclipse.edc.boot.system.DefaultServiceExtensionContext; import org.eclipse.edc.boot.system.ExtensionLoader; import org.eclipse.edc.boot.system.ServiceLocator; @@ -23,10 +26,10 @@ import org.eclipse.edc.boot.system.injection.InjectionContainer; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.monitor.Monitor; -import org.eclipse.edc.spi.system.ConfigurationExtension; import org.eclipse.edc.spi.system.MonitorExtension; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; +import org.eclipse.edc.spi.system.configuration.Config; import org.eclipse.edc.spi.system.health.HealthCheckResult; import org.eclipse.edc.spi.system.health.HealthCheckService; import org.jetbrains.annotations.NotNull; @@ -43,7 +46,7 @@ * the connector. It goes through the following steps, all of which are overridable: *
    *
  • {@link BaseRuntime#createMonitor()} : instantiates a new {@link Monitor}
  • - *
  • {@link BaseRuntime#createContext(Monitor)}: creates a new {@link DefaultServiceExtensionContext} and invokes its {@link DefaultServiceExtensionContext#initialize()} method
  • + *
  • {@link BaseRuntime#createContext(Monitor, Config)}: creates a new {@link DefaultServiceExtensionContext} and invokes its {@link DefaultServiceExtensionContext#initialize()} method
  • *
  • {@link BaseRuntime#createExtensions(ServiceExtensionContext)}: creates a list of {@code ServiceExtension} objects. By default, these are created through {@link ExtensionLoader#loadServiceExtensions(ServiceExtensionContext)}
  • *
  • {@link BaseRuntime#bootExtensions(ServiceExtensionContext, List)}: initializes the service extensions by putting them through their lifecycle. * By default this calls {@link ExtensionLoader#bootServiceExtensions(List, ServiceExtensionContext)}
  • @@ -54,6 +57,7 @@ public class BaseRuntime { private static String[] programArgs = new String[0]; private final ExtensionLoader extensionLoader; + private final ConfigurationLoader configurationLoader; private final List serviceExtensions = new ArrayList<>(); protected Monitor monitor; @@ -63,6 +67,7 @@ public BaseRuntime() { protected BaseRuntime(ServiceLocator serviceLocator) { extensionLoader = new ExtensionLoader(serviceLocator); + configurationLoader = new ConfigurationLoader(serviceLocator, EnvironmentVariables.ofDefault(), SystemProperties.ofDefault()); } public static void main(String[] args) { @@ -106,20 +111,10 @@ protected Monitor getMonitor() { } @NotNull - protected ServiceExtensionContext createServiceExtensionContext() { - var context = createContext(monitor); - initializeContext(context); - return context; - } - - /** - * Initializes the context. If {@link BaseRuntime#createContext(Monitor)} is overridden and the (custom) context - * needs to be initialized, this method should be overridden as well. - * - * @param context The context. - */ - protected void initializeContext(ServiceExtensionContext context) { + protected ServiceExtensionContext createServiceExtensionContext(Config config) { + var context = createContext(monitor, config); context.initialize(); + return context; } /** @@ -155,15 +150,12 @@ protected List> createExtensions(ServiceExt * this would likely need to be overridden. * * @param monitor a Monitor + * @param config the cofiguratiohn * @return a {@code ServiceExtensionContext} */ @NotNull - protected ServiceExtensionContext createContext(Monitor monitor) { - return new DefaultServiceExtensionContext(monitor, loadConfigurationExtensions()); - } - - protected List loadConfigurationExtensions() { - return extensionLoader.loadExtensions(ConfigurationExtension.class, false); + protected ServiceExtensionContext createContext(Monitor monitor, Config config) { + return new DefaultServiceExtensionContext(monitor, config); } /** @@ -179,7 +171,8 @@ protected Monitor createMonitor() { private void boot(boolean addShutdownHook) { monitor = createMonitor(); - var context = createServiceExtensionContext(); + var config = configurationLoader.loadConfiguration(monitor); + var context = createServiceExtensionContext(config); try { var newExtensions = createExtensions(context); diff --git a/core/common/boot/src/test/java/org/eclipse/edc/boot/config/ConfigurationLoaderTest.java b/core/common/boot/src/test/java/org/eclipse/edc/boot/config/ConfigurationLoaderTest.java new file mode 100644 index 00000000000..4b80d5cebad --- /dev/null +++ b/core/common/boot/src/test/java/org/eclipse/edc/boot/config/ConfigurationLoaderTest.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.edc.boot.config; + +import org.eclipse.edc.boot.system.ServiceLocator; +import org.eclipse.edc.spi.monitor.Monitor; +import org.eclipse.edc.spi.system.ConfigurationExtension; +import org.eclipse.edc.spi.system.configuration.ConfigFactory; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.Map; +import java.util.Properties; + +import static java.util.Collections.emptyList; +import static java.util.Collections.emptyMap; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +class ConfigurationLoaderTest { + + private final ServiceLocator serviceLocator = mock(); + private final Monitor monitor = mock(); + private final ConfigurationExtension configurationExtension = mock(); + private final EnvironmentVariables environmentVariables = mock(); + private final SystemProperties systemProperties = mock(); + + private final ConfigurationLoader loader = new ConfigurationLoader(serviceLocator, environmentVariables, systemProperties); + + @BeforeEach + void setUp() { + when(environmentVariables.get()).thenReturn(emptyMap()); + when(systemProperties.get()).thenReturn(new Properties()); + when(serviceLocator.loadImplementors(any(), anyBoolean())).thenReturn(List.of(configurationExtension)); + } + + @Test + void shouldInitializeConfigurationExtensions() { + loader.loadConfiguration(monitor); + + verify(configurationExtension).initialize(monitor); + } + + @Test + void shouldLoadEmptyConfiguration_whenNoConfigurationExtension() { + when(serviceLocator.loadImplementors(any(), anyBoolean())).thenReturn(emptyList()); + + var config = loader.loadConfiguration(monitor); + + assertThat(config).isNotNull(); + assertThat(config.getRelativeEntries()).isEmpty(); + verify(serviceLocator).loadImplementors(ConfigurationExtension.class, false); + } + + @Test + void shouldLoadConfigFromExtension() { + var extensionConfig = ConfigFactory.fromMap(Map.of("edc.test.entry1", "value1", "edc.test.entry2", "value2")); + when(configurationExtension.getConfig()).thenReturn(extensionConfig); + + var config = loader.loadConfiguration(monitor); + + assertThat(config.getString("edc.test.entry1")).isEqualTo("value1"); + assertThat(config.getString("edc.test.entry2")).isEqualTo("value2"); + } + + @Test + void shouldLoadConfigFromSystemProperties() { + var properties = new Properties(); + properties.put("edc.test.entry", "foo"); + when(systemProperties.get()).thenReturn(properties); + + var config = loader.loadConfiguration(monitor); + + assertThat(config.getString("edc.test.entry")).isEqualTo("foo"); + } + + @Test + void shouldOverrideConfig_whenSystemPropertiesOverlap() { + var extensionConfig = ConfigFactory.fromMap(Map.of("edc.test.entry1", "value1", "edc.test.entry2", "value2")); + when(configurationExtension.getConfig()).thenReturn(extensionConfig); + var properties = new Properties(); + properties.put("edc.test.entry2", "value override"); + when(systemProperties.get()).thenReturn(properties); + + var config = loader.loadConfiguration(monitor); + + assertThat(config.getString("edc.test.entry1")).isEqualTo("value1"); + assertThat(config.getString("edc.test.entry2")).isEqualTo("value override"); + } + + @Test + void shouldConvertCase_whenEnvironmentVariable() { + when(environmentVariables.get()).thenReturn(Map.of("EDC_TEST_ENTRY", "value")); + + var config = loader.loadConfiguration(monitor); + + assertThat(config.getString("edc.test.entry")).isEqualTo("value"); + } + + @Test + void shouldOverrideConfig_whenEnvironmentVariablesOverlap() { + var extensionConfig = ConfigFactory.fromMap(Map.of("edc.test.entry", "value")); + when(configurationExtension.getConfig()).thenReturn(extensionConfig); + when(environmentVariables.get()).thenReturn(Map.of("EDC_TEST_ENTRY", "value override")); + + var config = loader.loadConfiguration(monitor); + + assertThat(config.getString("edc.test.entry")).isEqualTo("value override"); + } + + @Test + void shouldOverrideEnvironmentVariablesWithSystemProperties() { + when(environmentVariables.get()).thenReturn(Map.of("EDC_TEST_ENTRY", "value")); + var properties = new Properties(); + properties.put("edc.test.entry", "value override"); + when(systemProperties.get()).thenReturn(properties); + + var config = loader.loadConfiguration(monitor); + + assertThat(config.getString("edc.test.entry")).isEqualTo("value override"); + } + +} diff --git a/core/common/boot/src/test/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContextTest.java b/core/common/boot/src/test/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContextTest.java index 8c4012081bf..17df25e4850 100644 --- a/core/common/boot/src/test/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContextTest.java +++ b/core/common/boot/src/test/java/org/eclipse/edc/boot/system/DefaultServiceExtensionContextTest.java @@ -18,14 +18,12 @@ import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.monitor.Monitor; import org.eclipse.edc.spi.system.ConfigurationExtension; +import org.eclipse.edc.spi.system.configuration.Config; import org.eclipse.edc.spi.system.configuration.ConfigFactory; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; -import java.util.List; import java.util.Map; import java.util.UUID; @@ -33,6 +31,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.eclipse.edc.boot.BootServicesExtension.RUNTIME_ID; import static org.mockito.AdditionalMatchers.and; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.mock; @@ -43,70 +42,17 @@ class DefaultServiceExtensionContextTest { private final ConfigurationExtension configuration = mock(); private final Monitor monitor = mock(); + private final Config config = mock(); private DefaultServiceExtensionContext context; @BeforeEach void setUp() { - context = new DefaultServiceExtensionContext(monitor, List.of(configuration)); - } - - @Test - void getConfig_onlyFromConfig() { - var path = "edc.test"; - - var extensionConfig = ConfigFactory.fromMap(Map.of("edc.test.entry1", "value1", "edc.test.entry2", "value2")); - when(configuration.getConfig()).thenReturn(extensionConfig); - context.initialize(); - - var config = context.getConfig(path); - - assertThat(config.getString("entry1")).isEqualTo("value1"); - assertThat(config.getString("entry2")).isEqualTo("value2"); - } - - @Test - void getConfig_withOtherProperties() { - var path = "edc.test"; - - var extensionConfig = ConfigFactory.fromMap(Map.of("edc.test.entry1", "value1", "edc.test.entry2", "value2")); - when(configuration.getConfig()).thenReturn(extensionConfig); - System.setProperty("edc.test.entry3", "foo"); - - context.initialize(); - - var config = context.getConfig(path); - try { - assertThat(config.getString("entry1")).isEqualTo("value1"); - assertThat(config.getString("entry2")).isEqualTo("value2"); - assertThat(config.getString("entry3")).isEqualTo("foo"); - } finally { - System.clearProperty("edc.test.entry3"); - } - } - - @Test - void getConfig_withOtherPropertiesOverlapping() { - var path = "edc.test"; - - var extensionConfig = ConfigFactory.fromMap(Map.of("edc.test.entry1", "value1", "edc.test.entry2", "value2")); - when(configuration.getConfig()).thenReturn(extensionConfig); - System.setProperty("edc.test.entry2", "foo"); - - context.initialize(); - - var config = context.getConfig(path); - - try { - assertThat(config.getString("entry1")).isEqualTo("value1"); - assertThat(config.getString("entry2")).isEqualTo("foo"); - } finally { - System.clearProperty("edc.test.entry2"); - } + context = new DefaultServiceExtensionContext(monitor, config); } @Test void get_setting_returns_the_setting_from_the_configuration_extension() { - when(configuration.getConfig()).thenReturn(ConfigFactory.fromMap(Map.of("key", "value"))); + when(config.getConfig(any())).thenReturn(ConfigFactory.fromMap(Map.of("key", "value"))); context.initialize(); var setting = context.getSetting("key", "default"); @@ -116,7 +62,7 @@ void get_setting_returns_the_setting_from_the_configuration_extension() { @Test void get_setting_returns_default_value_if_setting_is_not_found() { - when(configuration.getConfig()).thenReturn(ConfigFactory.empty()); + when(config.getConfig(any())).thenReturn(ConfigFactory.empty()); context.initialize(); var setting = context.getSetting("key", "default"); @@ -124,56 +70,9 @@ void get_setting_returns_default_value_if_setting_is_not_found() { assertThat(setting).isEqualTo("default"); } - @Test - @DisplayName("An environment variable in UPPER_SNAKE_CASE gets converted to dot-notation") - void loadConfig_mapsSystemPropertyToJavaPropertyFormat() { - when(configuration.getConfig()).thenReturn(ConfigFactory.fromMap(Map.of("key", "value"))); - context = Mockito.spy(context); - when(context.getEnvironmentVariables()).thenReturn(Map.of("SOME_KEY", "env-val")); - context.initialize(); - - var setting = context.getSetting("key", "default"); - var setting2 = context.getSetting("some.key", null); - - assertThat(setting).isEqualTo("value"); - assertThat(setting2).isEqualTo("env-val"); - } - - @Test - @DisplayName("An environment variable in UPPER_SNAKE_CASE should overwrite app config in dot-notation") - void loadConfig_envOverwritesAppConfig() { - when(configuration.getConfig()).thenReturn(ConfigFactory.fromMap(Map.of("some.key", "value1"))); - context = Mockito.spy(context); - when(context.getEnvironmentVariables()).thenReturn(Map.of("SOME_KEY", "value2")); - context.initialize(); - - var setting = context.getSetting("some.key", null); - - assertThat(setting).isEqualTo("value2"); - } - - @Test - @DisplayName("An environment variable in UPPER_SNAKE_CASE should get overwritten by system config in dot-notation") - void loadConfig_systemPropOverwritesEnvVar() { - - System.setProperty("some.key", "value3"); - when(configuration.getConfig()).thenReturn(ConfigFactory.fromMap(Map.of("some.key", "value1"))); - context = Mockito.spy(context); - when(context.getEnvironmentVariables()).thenReturn(Map.of("SOME_KEY", "value2")); - context.initialize(); - - var setting = context.getSetting("some.key", null); - - try { - assertThat(setting).isEqualTo("value3"); - } finally { - System.clearProperty("some.key"); - } - } - @Test void registerService_throwsWhenFrozen() { - when(configuration.getConfig()).thenReturn(ConfigFactory.empty()); + when(config.getConfig(any())).thenReturn(ConfigFactory.empty()); context.initialize(); context.freeze(); @@ -185,6 +84,7 @@ void registerService_throwsWhenFrozen() { class GetRuntimeId { @Test void shouldReturnRandomUuid_whenNotConfigured() { + when(config.getConfig(any())).thenReturn(ConfigFactory.empty()); context.initialize(); var runtimeId = context.getRuntimeId(); @@ -195,7 +95,7 @@ void shouldReturnRandomUuid_whenNotConfigured() { @Test void shouldReturnConfiguredId_whenConfigured() { - when(configuration.getConfig()).thenReturn(ConfigFactory.fromMap(Map.of(RUNTIME_ID, "runtime-id"))); + when(config.getConfig(any())).thenReturn(ConfigFactory.fromMap(Map.of(RUNTIME_ID, "runtime-id"))); context.initialize(); var runtimeId = context.getRuntimeId(); diff --git a/core/common/boot/src/test/java/org/eclipse/edc/boot/system/ExtensionLoaderTest.java b/core/common/boot/src/test/java/org/eclipse/edc/boot/system/ExtensionLoaderTest.java index d9db430dffe..8ff5551b627 100644 --- a/core/common/boot/src/test/java/org/eclipse/edc/boot/system/ExtensionLoaderTest.java +++ b/core/common/boot/src/test/java/org/eclipse/edc/boot/system/ExtensionLoaderTest.java @@ -33,6 +33,7 @@ import org.eclipse.edc.spi.system.MonitorExtension; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; +import org.eclipse.edc.spi.system.configuration.ConfigFactory; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -57,10 +58,10 @@ class ExtensionLoaderTest { - private final ServiceLocator serviceLocator = mock(ServiceLocator.class); + private final ServiceLocator serviceLocator = mock(); private final ServiceExtension coreExtension = new TestCoreExtension(); + private final ServiceExtensionContext context = mock(); private final ExtensionLoader loader = new ExtensionLoader(serviceLocator); - private final ServiceExtensionContext context = mock(ServiceExtensionContext.class); @BeforeAll public static void setup() { @@ -295,7 +296,7 @@ void bootServiceExtensions_withSingleDefaultProvider() { when(defaultProvider.testObject()).thenCallRealMethod(); - var context = new DefaultServiceExtensionContext(mock(Monitor.class), List.of()); + var context = new DefaultServiceExtensionContext(mock(Monitor.class), ConfigFactory.empty()); var list = TestFunctions.createInjectionContainers(TestFunctions.createList(defaultProvider, dependentExtension), context); @@ -314,7 +315,7 @@ void bootServiceExtensions_withSingleDefaultProvider_andNonDefault() { var nonDefaultProvider = (ProviderExtension) Mockito.spy(TestFunctions.createProviderExtension(false)); when(nonDefaultProvider.testObject()).thenCallRealMethod(); - var context = new DefaultServiceExtensionContext(mock(Monitor.class), List.of()); + var context = new DefaultServiceExtensionContext(mock(Monitor.class), ConfigFactory.empty()); var list = TestFunctions.createInjectionContainers(TestFunctions.createList(defaultProvider, dependentExtension, nonDefaultProvider), context); @@ -332,7 +333,7 @@ void bootServiceExtensions_withNonDefault() { var nonDefaultProvider = (ProviderExtension) Mockito.spy(TestFunctions.createProviderExtension(false)); when(nonDefaultProvider.testObject()).thenCallRealMethod(); - var context = new DefaultServiceExtensionContext(mock(Monitor.class), List.of()); + var context = new DefaultServiceExtensionContext(mock(Monitor.class), ConfigFactory.empty()); var list = TestFunctions.createInjectionContainers(TestFunctions.createList(dependentExtension, nonDefaultProvider), context); @@ -349,7 +350,7 @@ void bootServiceExtensions_withOptionalDependency_onlyDefault() { var defaultProvider = (ProviderDefaultServicesExtension) Mockito.spy(TestFunctions.createProviderExtension(true)); when(defaultProvider.testObject()).thenCallRealMethod(); - var context = new DefaultServiceExtensionContext(mock(Monitor.class), List.of()); + var context = new DefaultServiceExtensionContext(mock(Monitor.class), ConfigFactory.empty()); var list = TestFunctions.createInjectionContainers(TestFunctions.createList(dependentExtension, defaultProvider), context); @@ -370,7 +371,7 @@ void bootServiceExtensions_withOptionalDependency_defaultAndNonDefault() { var provider = (ProviderExtension) Mockito.spy(TestFunctions.createProviderExtension(false)); when(provider.testObject()).thenCallRealMethod(); - var context = new DefaultServiceExtensionContext(mock(Monitor.class), List.of()); + var context = new DefaultServiceExtensionContext(mock(Monitor.class), ConfigFactory.empty()); var list = TestFunctions.createInjectionContainers(TestFunctions.createList(dependentExtension, defaultProvider, provider), context); diff --git a/core/common/boot/src/test/java/org/eclipse/edc/boot/system/runtime/BaseRuntimeTest.java b/core/common/boot/src/test/java/org/eclipse/edc/boot/system/runtime/BaseRuntimeTest.java index 715c8a46e8c..6557c130368 100644 --- a/core/common/boot/src/test/java/org/eclipse/edc/boot/system/runtime/BaseRuntimeTest.java +++ b/core/common/boot/src/test/java/org/eclipse/edc/boot/system/runtime/BaseRuntimeTest.java @@ -19,6 +19,7 @@ import org.eclipse.edc.boot.system.testextensions.BaseExtension; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.monitor.Monitor; +import org.eclipse.edc.spi.system.ConfigurationExtension; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; import org.eclipse.edc.spi.system.health.HealthCheckService; @@ -78,6 +79,15 @@ void shouldSetStartupCheckProvider_whenHealthCheckServiceIsRegistered() { verify(healthCheckService).refresh(); } + @Test + void shouldLoadConfiguration() { + when(serviceLocator.loadImplementors(eq(ServiceExtension.class), anyBoolean())).thenReturn(List.of(new BaseExtension())); + + runtime.boot(); + + verify(serviceLocator).loadImplementors(ConfigurationExtension.class, false); + } + @NotNull private static ServiceExtension registerService(Class serviceClass, HealthCheckService healthCheckService) { return new ServiceExtension() { diff --git a/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/DependencyInjectionExtension.java b/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/DependencyInjectionExtension.java index f63e48e6eac..668c683892e 100644 --- a/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/DependencyInjectionExtension.java +++ b/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/DependencyInjectionExtension.java @@ -21,7 +21,7 @@ import org.eclipse.edc.boot.system.runtime.BaseRuntime; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; -import org.jetbrains.annotations.NotNull; +import org.eclipse.edc.spi.system.configuration.ConfigFactory; import org.junit.jupiter.api.extension.BeforeEachCallback; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.ParameterContext; @@ -50,7 +50,7 @@ public class DependencyInjectionExtension extends BaseRuntime implements BeforeE @Override public void beforeEach(ExtensionContext extensionContext) { monitor = mock(); - context = spy(super.createServiceExtensionContext()); + context = spy(super.createServiceExtensionContext(ConfigFactory.empty())); context.initialize(); factory = new ReflectiveObjectFactory( new InjectorImpl(Mockito::mock), @@ -91,8 +91,4 @@ public Object resolveParameter(ParameterContext parameterContext, ExtensionConte return null; } - @Override - protected @NotNull ServiceExtensionContext createServiceExtensionContext() { - return context; - } } diff --git a/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/EdcExtension.java b/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/EdcExtension.java index 55938e7065e..2328f8bcc4a 100644 --- a/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/EdcExtension.java +++ b/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/EdcExtension.java @@ -24,6 +24,7 @@ import org.eclipse.edc.spi.system.ConfigurationExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; import org.eclipse.edc.spi.system.SystemExtension; +import org.eclipse.edc.spi.system.configuration.Config; import org.eclipse.edc.spi.system.configuration.ConfigFactory; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.extension.AfterTestExecutionCallback; @@ -125,8 +126,8 @@ public T getService(Class clazz) { } @Override - protected @NotNull ServiceExtensionContext createContext(Monitor monitor) { - context = new TestServiceExtensionContext(monitor, loadConfigurationExtensions(), serviceMocks); + protected @NotNull ServiceExtensionContext createContext(Monitor monitor, Config config) { + context = new TestServiceExtensionContext(monitor, config, serviceMocks); return context; } diff --git a/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/TestServiceExtensionContext.java b/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/TestServiceExtensionContext.java index 8a7fdad3af4..aedf01eb645 100644 --- a/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/TestServiceExtensionContext.java +++ b/core/common/junit/src/main/java/org/eclipse/edc/junit/extensions/TestServiceExtensionContext.java @@ -16,12 +16,11 @@ import org.eclipse.edc.boot.system.DefaultServiceExtensionContext; import org.eclipse.edc.spi.monitor.Monitor; -import org.eclipse.edc.spi.system.ConfigurationExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; +import org.eclipse.edc.spi.system.configuration.Config; +import org.eclipse.edc.spi.system.configuration.ConfigFactory; -import java.util.Collections; import java.util.LinkedHashMap; -import java.util.List; import static java.util.Optional.ofNullable; import static org.mockito.Mockito.mock; @@ -42,13 +41,13 @@ public class TestServiceExtensionContext extends DefaultServiceExtensionContext private final LinkedHashMap, Object> serviceMocks; public static ServiceExtensionContext testServiceExtensionContext() { - var context = new TestServiceExtensionContext(mock(), Collections.emptyList(), new LinkedHashMap<>()); + var context = new TestServiceExtensionContext(mock(), ConfigFactory.empty(), new LinkedHashMap<>()); context.initialize(); return context; } - public TestServiceExtensionContext(Monitor monitor, List configurationExtensions, LinkedHashMap, Object> serviceMocks) { - super(monitor, configurationExtensions); + public TestServiceExtensionContext(Monitor monitor, Config config, LinkedHashMap, Object> serviceMocks) { + super(monitor, config); this.serviceMocks = serviceMocks; } diff --git a/extensions/common/api/management-api-configuration/src/test/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtensionTest.java b/extensions/common/api/management-api-configuration/src/test/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtensionTest.java index b846219f6cd..4f9f7213066 100644 --- a/extensions/common/api/management-api-configuration/src/test/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtensionTest.java +++ b/extensions/common/api/management-api-configuration/src/test/java/org/eclipse/edc/connector/api/management/configuration/ManagementApiConfigurationExtensionTest.java @@ -33,8 +33,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import java.util.List; - import static org.eclipse.edc.connector.api.management.configuration.ManagementApiConfigurationExtension.SETTINGS; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -77,7 +75,7 @@ void initialize_shouldConfigureAndRegisterResource() { @NotNull private DefaultServiceExtensionContext contextWithConfig(Config config) { - var context = new DefaultServiceExtensionContext(monitor, List.of(() -> config)); + var context = new DefaultServiceExtensionContext(monitor, config); context.initialize(); return context; } diff --git a/extensions/common/iam/identity-trust/identity-trust-sts/identity-trust-sts-api/src/test/java/org/eclipse/edc/api/iam/identitytrust/sts/StsApiConfigurationExtensionTest.java b/extensions/common/iam/identity-trust/identity-trust-sts/identity-trust-sts-api/src/test/java/org/eclipse/edc/api/iam/identitytrust/sts/StsApiConfigurationExtensionTest.java index 59c983bf11d..f513cd997ec 100644 --- a/extensions/common/iam/identity-trust/identity-trust-sts/identity-trust-sts-api/src/test/java/org/eclipse/edc/api/iam/identitytrust/sts/StsApiConfigurationExtensionTest.java +++ b/extensions/common/iam/identity-trust/identity-trust-sts/identity-trust-sts-api/src/test/java/org/eclipse/edc/api/iam/identitytrust/sts/StsApiConfigurationExtensionTest.java @@ -28,8 +28,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import java.util.List; - import static org.eclipse.edc.api.iam.identitytrust.sts.StsApiConfigurationExtension.SETTINGS; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -64,7 +62,7 @@ void initialize_shouldConfigureAndRegisterResource(StsApiConfigurationExtension @NotNull private DefaultServiceExtensionContext contextWithConfig(Config config) { - var context = new DefaultServiceExtensionContext(monitor, List.of(() -> config)); + var context = new DefaultServiceExtensionContext(monitor, config); context.initialize(); return context; } diff --git a/extensions/data-plane-selector/data-plane-selector-api/src/test/java/org/eclipse/edc/connector/dataplane/selector/DataPlaneSelectorApiExtensionTest.java b/extensions/data-plane-selector/data-plane-selector-api/src/test/java/org/eclipse/edc/connector/dataplane/selector/DataPlaneSelectorApiExtensionTest.java index 51b5c10bc02..fa4dd9a01fc 100644 --- a/extensions/data-plane-selector/data-plane-selector-api/src/test/java/org/eclipse/edc/connector/dataplane/selector/DataPlaneSelectorApiExtensionTest.java +++ b/extensions/data-plane-selector/data-plane-selector-api/src/test/java/org/eclipse/edc/connector/dataplane/selector/DataPlaneSelectorApiExtensionTest.java @@ -41,7 +41,6 @@ import org.junit.jupiter.api.extension.ExtendWith; import java.util.Collections; -import java.util.List; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isA; @@ -86,7 +85,7 @@ void shouldRegisterManagementContext() { @NotNull private DefaultServiceExtensionContext contextWithConfig(Config config) { - var context = new DefaultServiceExtensionContext(monitor, List.of(() -> config)); + var context = new DefaultServiceExtensionContext(monitor, config); context.initialize(); return context; } diff --git a/extensions/data-plane/data-plane-signaling/data-plane-signaling-api-configuration/src/test/java/org/eclipse/edc/connector/api/signaling/configuration/SignalingApiConfigurationExtensionTest.java b/extensions/data-plane/data-plane-signaling/data-plane-signaling-api-configuration/src/test/java/org/eclipse/edc/connector/api/signaling/configuration/SignalingApiConfigurationExtensionTest.java index f95d41dece0..fa760260130 100644 --- a/extensions/data-plane/data-plane-signaling/data-plane-signaling-api-configuration/src/test/java/org/eclipse/edc/connector/api/signaling/configuration/SignalingApiConfigurationExtensionTest.java +++ b/extensions/data-plane/data-plane-signaling/data-plane-signaling-api-configuration/src/test/java/org/eclipse/edc/connector/api/signaling/configuration/SignalingApiConfigurationExtensionTest.java @@ -31,8 +31,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import java.util.List; - import static org.eclipse.edc.connector.api.signaling.configuration.SignalingApiConfigurationExtension.SETTINGS; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -72,7 +70,7 @@ void initialize_shouldConfigureAndRegisterResource(SignalingApiConfigurationExte @NotNull private DefaultServiceExtensionContext contextWithConfig(Config config) { - var context = new DefaultServiceExtensionContext(monitor, List.of(() -> config)); + var context = new DefaultServiceExtensionContext(monitor, config); context.initialize(); return context; } From aa8cb090fca757af8060d15db5d58f2b0f5c15ab Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Mon, 6 May 2024 16:39:57 +0200 Subject: [PATCH 2/2] dependencies --- DEPENDENCIES | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index df9695ebb2c..ea9375c533d 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -16,27 +16,34 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.0, Apache maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.1, Apache-2.0, approved, #5303 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.1, Apache-2.0, approved, #7947 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.17.0, Apache-2.0, approved, #13672 +maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.17.1, Apache-2.0, approved, #13672 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.14.1, Apache-2.0 AND MIT, approved, #4303 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.1, MIT AND Apache-2.0, approved, #7932 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.17.0, , approved, #13665 +maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.17.1, , approved, #13665 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.11.0, Apache-2.0, approved, CQ23093 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.0, Apache-2.0, approved, #4105 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.1, Apache-2.0, approved, #4105 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.1, Apache-2.0, approved, #7934 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.17.0, Apache-2.0, approved, #13671 +maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.17.1, Apache-2.0, approved, #13671 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.0, Apache-2.0, approved, #5933 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.1, Apache-2.0, approved, #8802 -maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.17.0, Apache-2.0, approved, #13669 +maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.17.1, Apache-2.0, approved, #13669 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.17.0, Apache-2.0, approved, #14161 +maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.17.1, Apache-2.0, approved, #14161 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.0, Apache-2.0, approved, #4699 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.1, Apache-2.0, approved, #7930 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.17.0, Apache-2.0, approved, #14160 -maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-base/2.17.0, Apache-2.0, approved, #14194 +maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.17.1, Apache-2.0, approved, #14160 +maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-base/2.17.1, Apache-2.0, approved, #14194 maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.15.1, Apache-2.0, approved, #9236 -maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.17.0, Apache-2.0, approved, #14195 +maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.17.1, Apache-2.0, approved, #14195 maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.17.0, Apache-2.0, approved, #13668 +maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.17.1, Apache-2.0, approved, #13668 maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.15.1, Apache-2.0, approved, #7929 maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.17.0, Apache-2.0, approved, #14162 +maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.17.1, Apache-2.0, approved, #14162 maven/mavencentral/com.fasterxml.uuid/java-uuid-generator/4.1.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.github.cliftonlabs/json-simple/3.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/com.github.docker-java/docker-java-api/3.3.6, Apache-2.0, approved, #10346 @@ -78,7 +85,7 @@ maven/mavencentral/com.lmax/disruptor/3.4.4, Apache-2.0, approved, clearlydefine maven/mavencentral/com.networknt/json-schema-validator/1.0.76, Apache-2.0, approved, CQ22638 maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.28, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.37.3, Apache-2.0, approved, #11701 -maven/mavencentral/com.puppycrawl.tools/checkstyle/10.15.0, LGPL-2.1-or-later, restricted, clearlydefined +maven/mavencentral/com.puppycrawl.tools/checkstyle/10.16.0, , restricted, clearlydefined maven/mavencentral/com.samskivert/jmustache/1.15, BSD-2-Clause, approved, clearlydefined maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.12.0, Apache-2.0, approved, #11159 maven/mavencentral/com.squareup.okhttp3/okhttp/4.12.0, Apache-2.0, approved, #11156