diff --git a/.env.dev b/.env.dev index 498abf37b..308335726 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,5 @@ # Env variables for docker-compose-dev.yaml -EDC_IMAGE=ghcr.io/sovity/edc-dev:latest -TEST_BACKEND_IMAGE=ghcr.io/sovity/test-backend:latest +EDC_IMAGE=ghcr.io/sovity/edc-dev:1051 +TEST_BACKEND_IMAGE=ghcr.io/sovity/test-backend:1051 EDC_UI_IMAGE=ghcr.io/sovity/edc-ui:latest EDC_UI_ACTIVE_PROFILE=sovity-open-source diff --git a/CHANGELOG.md b/CHANGELOG.md index c564213db..0639f6b2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ For documentation on how to update this changelog, please see [changelog_updates.md](docs/dev/changelog_updates.md). - ## [x.x.x] - UNRELEASED ### Overview @@ -12,13 +11,15 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md). #### Major Changes -- Removed Catalog Crawler as it will be added to the Authority Portal to prevent circular dependencies +- Removed Catalog Crawler as it will be added to the Authority Portal to prevent circular dependencies ([#1052](https://github.com/sovity/edc-ui/issues/1052)) #### Minor Changes #### Patch Changes -- Refactoring: Config as Java Code### Deployment Migration Notes +- Refactoring: Config as Java Code ([#1051](https://github.com/sovity/edc-ui/issues/1051)) + +### Deployment Migration Notes _No special deployment migration steps required_ @@ -30,7 +31,6 @@ _No special deployment migration steps required_ - MDS EDC CE: `ghcr.io/sovity/edc-ce-mds:{{ VERSION }}` - Connector UI Docker Image: `ghcr.io/sovity/edc-ui:{{ UI VERSION }}` - ## [10.4.1] - 2024-09-26 ### Overview @@ -73,7 +73,6 @@ _No special deployment migration steps required_ - Catalog Crawler CE: `ghcr.io/sovity/catalog-crawler-ce:10.4.1` - Connector UI Docker Image: `ghcr.io/sovity/edc-ui:4.1.5` - ## [10.4.0] - 2024-09-18 ### Overview @@ -98,7 +97,6 @@ UI and Wrapper API improvements. - Fixed time restriction upper bound "local day to datetime" conversion issues ([#815](https://github.com/sovity/edc-ui/issues/815)) - ### Deployment Migration Notes _No special deployment migration steps required_ @@ -113,7 +111,6 @@ _No special deployment migration steps required_ - Catalog Crawler CE: `ghcr.io/sovity/catalog-crawler-ce:10.4.0` - Connector UI Docker Image: `ghcr.io/sovity/edc-ui:4.1.4` - ## [10.3.0] - 2024-09-04 ### Overview @@ -191,6 +188,7 @@ This is a replacement for redacted release `10.1.0` with a few additional bug fi ##### logging-house-client extension If the extension is to be switched off, the following must now be set, as the extension is now activated by default when integrated: + - `EDC_LOGGINGHOUSE_EXTENSION_ENABLED: 'false'` #### Compatible Versions @@ -226,7 +224,7 @@ MDS 2.2 release #### Major Changes - Complex policies using AND, OR and XONE: - - Complex policy support in the Connector UI. + - Complex policy support in the Connector UI. - The `UiPolicy` model has been adjusted to support complex expressions including `AND`, `OR` and `XONE`. - The `createPolicyDefinition` has been marked as deprecated in favor of the new `createPolicyDefinitionV2` endpoint that supports complex policies. - Removed the recently rushed `createPolicyDefinitionUseCase` endpoint in favor of the new `createPolicyDefinitionV2` endpoint. diff --git a/config/src/main/java/de/sovity/edc/utils/config/ConfigProps.java b/config/src/main/java/de/sovity/edc/utils/config/ConfigProps.java index f07092304..2fa08626f 100644 --- a/config/src/main/java/de/sovity/edc/utils/config/ConfigProps.java +++ b/config/src/main/java/de/sovity/edc/utils/config/ConfigProps.java @@ -476,7 +476,7 @@ public class ConfigProps { .property("edc.connector.name") .description("Connector Name") .warnIfOverridden(true) - .defaultValueFn(props -> coalesce(MY_EDC_PARTICIPANT_ID.getRaw(props), MY_EDC_NAME_KEBAB_CASE.getRaw(props))) + .defaultValueFn(props -> firstNonNull(MY_EDC_PARTICIPANT_ID.getRaw(props), MY_EDC_NAME_KEBAB_CASE.getRaw(props))) .build().also(ALL_CE_PROPS::add); public static final ConfigProp EDC_PARTICIPANT_ID = ConfigProp.builder() @@ -484,7 +484,7 @@ public class ConfigProps { .property("edc.participant.id") .description("Participant ID / Connector ID") .warnIfOverridden(true) - .defaultValueFn(props -> coalesce(MY_EDC_PARTICIPANT_ID.getRaw(props), MY_EDC_NAME_KEBAB_CASE.getRaw(props))) + .defaultValueFn(props -> firstNonNull(MY_EDC_PARTICIPANT_ID.getRaw(props), MY_EDC_NAME_KEBAB_CASE.getRaw(props))) .build().also(ALL_CE_PROPS::add); public static final ConfigProp EDC_HOSTNAME = ConfigProp.builder() @@ -576,7 +576,7 @@ public class ConfigProps { .relevantIf(NetworkType::isProduction) .build().also(ALL_CE_PROPS::add); - public String coalesce(String... values) { + public String firstNonNull(String... values) { for (String value : values) { if (value != null) { return value; diff --git a/config/src/main/java/de/sovity/edc/utils/config/ConfigUtils.java b/config/src/main/java/de/sovity/edc/utils/config/ConfigUtils.java index e9c9efabe..fa643bb41 100644 --- a/config/src/main/java/de/sovity/edc/utils/config/ConfigUtils.java +++ b/config/src/main/java/de/sovity/edc/utils/config/ConfigUtils.java @@ -25,7 +25,6 @@ public class ConfigUtils { public static String getProtocolApiUrl(Map props) { - return UrlPathUtils.urlPathJoin( ConfigProps.MY_EDC_PROTOCOL.getRaw(props), getHost(props, ConfigProps.WEB_HTTP_PROTOCOL_PORT), @@ -34,7 +33,6 @@ public static String getProtocolApiUrl(Map props) { } public static String getManagementApiUrl(Map props) { - return UrlPathUtils.urlPathJoin( ConfigProps.MY_EDC_PROTOCOL.getRaw(props), getHost(props, ConfigProps.WEB_HTTP_MANAGEMENT_PORT), diff --git a/config/src/main/java/de/sovity/edc/utils/config/model/ConfigProp.java b/config/src/main/java/de/sovity/edc/utils/config/model/ConfigProp.java index 8fc262d06..efc312fce 100644 --- a/config/src/main/java/de/sovity/edc/utils/config/model/ConfigProp.java +++ b/config/src/main/java/de/sovity/edc/utils/config/model/ConfigProp.java @@ -40,6 +40,9 @@ public class ConfigProp { @NotNull private String description; + /** + * Turns off all required / defaulting logic, if false + */ private ConfigPropRequiredIfFn relevantIf; private boolean required; diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md index 0bf1f90b8..319b88849 100644 --- a/docs/dev/debugging.md +++ b/docs/dev/debugging.md @@ -27,6 +27,7 @@ If you used the `dev` set of files: ```bash docker compose --env-file .env.dev --file docker-compose-dev.yaml down +docker compose --env-file .env.dev --file docker-compose-dev.yaml pull docker compose --env-file .env.dev --file docker-compose-dev.yaml up ``` diff --git a/extensions/database-direct-access/src/main/java/de/sovity/edc/extension/db/directaccess/DatabaseDirectAccessExtension.java b/extensions/database-direct-access/src/main/java/de/sovity/edc/extension/db/directaccess/DatabaseDirectAccessExtension.java index 1b38d3bbc..12aac42b2 100644 --- a/extensions/database-direct-access/src/main/java/de/sovity/edc/extension/db/directaccess/DatabaseDirectAccessExtension.java +++ b/extensions/database-direct-access/src/main/java/de/sovity/edc/extension/db/directaccess/DatabaseDirectAccessExtension.java @@ -26,7 +26,6 @@ public class DatabaseDirectAccessExtension implements ServiceExtension { public static final String NAME = "DirectDatabaseAccess"; - @Override public String name() { return NAME; @@ -45,14 +44,13 @@ private void initializeDirectDatabaseAccess(ServiceExtensionContext context) { hikariConfig.setUsername(ConfigProps.EDC_DATASOURCE_DEFAULT_USER.getStringOrThrow(config)); hikariConfig.setPassword(ConfigProps.EDC_DATASOURCE_DEFAULT_PASSWORD.getStringOrThrow(config)); hikariConfig.setMinimumIdle(1); - hikariConfig.setMaximumPoolSize(config.getInteger(ConfigProps.EDC_SERVER_DB_CONNECTION_POOL_SIZE.getProperty(), 3)); + hikariConfig.setMaximumPoolSize(ConfigProps.EDC_SERVER_DB_CONNECTION_POOL_SIZE.getInt(config)); hikariConfig.setIdleTimeout(30000); hikariConfig.setPoolName("direct-database-access"); hikariConfig.setMaxLifetime(50000); - hikariConfig.setConnectionTimeout(1000); - - val dda = new DslContextFactory(new HikariDataSource(hikariConfig)); + hikariConfig.setConnectionTimeout(ConfigProps.EDC_SERVER_DB_CONNECTION_TIMEOUT_IN_MS.getInt(config)); - context.registerService(DslContextFactory.class, dda); + val dslContextFactory = new DslContextFactory(new HikariDataSource(hikariConfig)); + context.registerService(DslContextFactory.class, dslContextFactory); } } diff --git a/launchers/common/base/src/main/java/de/sovity/edc/Main.java b/launchers/common/base/src/main/java/de/sovity/edc/Main.java index 7b9dbb677..9ad0eaf8c 100644 --- a/launchers/common/base/src/main/java/de/sovity/edc/Main.java +++ b/launchers/common/base/src/main/java/de/sovity/edc/Main.java @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2023 sovity GmbH + * + * 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: + * sovity GmbH - init + * + */ + package de.sovity.edc; import de.sovity.edc.utils.config.ConfigProps;