Skip to content

Commit d4e24c2

Browse files
authored
feat: Clean up the 0.7.x deprecated instances (#2335)
* feat: remove deprecation 0.7.X * feat: remove deprecation 0.7.X * feat: remove deprecation 0.7.X
1 parent c29f1b6 commit d4e24c2

File tree

23 files changed

+48
-491
lines changed

23 files changed

+48
-491
lines changed

charts/tractusx-connector-memory/templates/deployment-runtime.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ spec:
261261
## BDRS CLIENT ##
262262
#################
263263

264-
- name: "TX_IAM_IATP_BDRS_SERVER_URL"
264+
- name: "TX_EDC_IAM_IATP_BDRS_SERVER_URL"
265265
value: {{ .Values.runtime.bdrs.server.url | required ".Values.runtime.bdrs.server.url is required" | quote }}
266266
{{- if .Values.runtime.bdrs.cache_validity_seconds }}
267-
- name: "TX_IAM_IATP_BDRS_CACHE_VALIDITY"
267+
- name: "TX_EDC_IAM_IATP_BDRS_CACHE_VALIDITY"
268268
value: {{ .Values.runtime.bdrs.cache_validity_seconds | quote}}
269269
{{- end}}
270270

@@ -308,7 +308,7 @@ spec:
308308
###########
309309

310310
# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/develop/edc-extensions/hashicorp-vault
311-
- name: "EDC_VAULT_SECRETS"
311+
- name: "TX_EDC_VAULT_SECRETS"
312312
value: {{ .Values.vault.secrets | quote}}
313313

314314

charts/tractusx-connector/templates/deployment-controlplane.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ spec:
259259
## BDRS CLIENT ##
260260
#################
261261

262-
- name: "TX_IAM_IATP_BDRS_SERVER_URL"
262+
- name: "TX_EDC_IAM_IATP_BDRS_SERVER_URL"
263263
value: {{ .Values.controlplane.bdrs.server.url | required ".Values.controlplane.bdrs.server.url is required" | quote }}
264264
{{- if .Values.controlplane.bdrs.cache_validity_seconds }}
265-
- name: "TX_IAM_IATP_BDRS_CACHE_VALIDITY"
265+
- name: "TX_EDC_IAM_IATP_BDRS_CACHE_VALIDITY"
266266
value: {{ .Values.controlplane.bdrs.cache_validity_seconds | quote}}
267267
{{- end}}
268268

edc-controlplane/edc-controlplane-base/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ dependencies {
4848
implementation(project(":edc-extensions:cx-policy"))
4949
implementation(project(":edc-extensions:cx-policy-legacy"))
5050
implementation(project(":edc-extensions:data-flow-properties-provider"))
51-
implementation(project(":edc-extensions:dataplane:dataplane-selector-configuration"))
5251
implementation(project(":edc-extensions:dcp:tx-dcp"))
5352
implementation(project(":edc-extensions:dcp:tx-dcp-sts-dim"))
5453
implementation(project(":edc-extensions:edr:edr-api-v2"))

edc-controlplane/edc-runtime-memory/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension. When in doubt, check the extensions' README that will likely be in [t
3030

3131
```shell
3232
docker run \
33-
-e EDC_VAULT_SECRETS="key1:secret1;key2:secret2" \
33+
-e TX_EDC_VAULT_SECRETS="key1:secret1;key2:secret2" \
3434
-p 8080:8080 -p 8181:8181 -p 8282:8282 -p 9090:9090 -p 9999:9999 \
3535
-v ${CONFIGURATION_PROPERTIES_FILE:-/dev/null}:/app/configuration.properties \
3636
-v ${LOGGING_PROPERTIES_FILE:-/dev/null}:/app/logging.properties \

edc-controlplane/edc-runtime-memory/src/main/java/org/eclipse/tractusx/edc/vault/memory/VaultSeedExtension.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.eclipse.edc.spi.security.Vault;
2828
import org.eclipse.edc.spi.system.ServiceExtension;
2929
import org.eclipse.edc.spi.system.ServiceExtensionContext;
30-
import org.eclipse.tractusx.edc.core.utils.ConfigUtil;
3130

3231
import java.util.stream.Stream;
3332

@@ -37,8 +36,6 @@ public class VaultSeedExtension implements ServiceExtension {
3736

3837
@Setting(value = "Secrets with which the vault gets initially populated. Specify as comma-separated list of key:secret pairs.")
3938
public static final String VAULT_MEMORY_SECRETS_PROPERTY = "tx.edc.vault.secrets";
40-
@Deprecated(since = "0.7.1")
41-
public static final String VAULT_MEMORY_SECRETS_PROPERTY_DEPRECATED = "edc.vault.secrets";
4239
public static final String NAME = "Vault Seed Extension";
4340

4441
@Inject
@@ -51,7 +48,8 @@ public String name() {
5148

5249
@Provider
5350
public Vault createInMemVault(ServiceExtensionContext context) {
54-
var seedSecrets = ConfigUtil.propertyCompatibility(context, VAULT_MEMORY_SECRETS_PROPERTY, VAULT_MEMORY_SECRETS_PROPERTY_DEPRECATED, (String) null);
51+
52+
var seedSecrets = context.getSetting(VAULT_MEMORY_SECRETS_PROPERTY, null);
5553
if (seedSecrets != null) {
5654
Stream.of(seedSecrets.split(";"))
5755
.filter(pair -> pair.contains(":"))

edc-extensions/bdrs-client/src/main/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientExtension.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import java.util.function.Supplier;
3737

3838
import static org.eclipse.tractusx.edc.core.utils.ConfigUtil.missingMandatoryProperty;
39-
import static org.eclipse.tractusx.edc.core.utils.ConfigUtil.propertyCompatibility;
4039
import static org.eclipse.tractusx.edc.identity.mapper.BdrsClientExtension.NAME;
4140

4241
@Extension(value = NAME)
@@ -46,18 +45,12 @@ public class BdrsClientExtension implements ServiceExtension {
4645
public static final int DEFAULT_BDRS_CACHE_VALIDITY = 15 * 60; // 15 minutes
4746
@Setting(value = "Base URL of the BDRS service", required = true)
4847
public static final String BDRS_SERVER_URL_PROPERTY = "tx.edc.iam.iatp.bdrs.server.url";
49-
@Deprecated(since = "0.7.1")
50-
public static final String BDRS_SERVER_URL_PROPERTY_DEPRECATED = "tx.iam.iatp.bdrs.server.url";
5148

5249
@Setting(value = "Base URL of the CredentialService, that belongs to this connector runtime. If not specified, the URL is resolved from this participant's DID document.")
5350
public static final String CREDENTIAL_SERVICE_BASE_URL_PROPERTY = "tx.edc.iam.iatp.credentialservice.url";
54-
@Deprecated(since = "0.7.1")
55-
public static final String CREDENTIAL_SERVICE_BASE_URL_PROPERTY_DEPRECATED = "tx.iam.iatp.credentialservice.url";
5651

5752
@Setting(value = "Validity period in seconds for the cached BPN/DID mappings. After this period a new resolution request will hit the server.", defaultValue = DEFAULT_BDRS_CACHE_VALIDITY + "")
5853
public static final String BDRS_SERVER_CACHE_VALIDITY_PERIOD = "tx.edc.iam.iatp.bdrs.cache.validity";
59-
@Deprecated(since = "0.7.1")
60-
public static final String BDRS_SERVER_CACHE_VALIDITY_PERIOD_DEPRECATED = "tx.iam.iatp.bdrs.cache.validity";
6154

6255
// this setting is already defined in IdentityAndTrustExtension
6356
public static final String CONNECTOR_DID_PROPERTY = "edc.iam.issuer.id";
@@ -84,9 +77,9 @@ public String name() {
8477

8578
@Provider
8679
public BdrsClient getBdrsClient(ServiceExtensionContext context) {
87-
var baseUrl = propertyCompatibility(context, BDRS_SERVER_URL_PROPERTY, BDRS_SERVER_URL_PROPERTY_DEPRECATED);
80+
var baseUrl = context.getConfig().getString(BDRS_SERVER_URL_PROPERTY);
8881
var monitor = context.getMonitor();
89-
var cacheValidity = propertyCompatibility(context, BDRS_SERVER_CACHE_VALIDITY_PERIOD, BDRS_SERVER_CACHE_VALIDITY_PERIOD_DEPRECATED, DEFAULT_BDRS_CACHE_VALIDITY);
82+
var cacheValidity = context.getSetting(BDRS_SERVER_CACHE_VALIDITY_PERIOD, DEFAULT_BDRS_CACHE_VALIDITY);
9083

9184
// get DID
9285
var ownDid = context.getConfig().getString(CONNECTOR_DID_PROPERTY, null);
@@ -96,7 +89,7 @@ public BdrsClient getBdrsClient(ServiceExtensionContext context) {
9689

9790
// get CS URL
9891
Supplier<String> urlSupplier;
99-
var configuredUrl = propertyCompatibility(context, CREDENTIAL_SERVICE_BASE_URL_PROPERTY, CREDENTIAL_SERVICE_BASE_URL_PROPERTY_DEPRECATED, (String) null);
92+
var configuredUrl = context.getSetting(CREDENTIAL_SERVICE_BASE_URL_PROPERTY, null);
10093
if (configuredUrl != null) {
10194
urlSupplier = () -> configuredUrl;
10295
} else {

edc-extensions/bdrs-client/src/test/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientImplExtensionTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
import static org.assertj.core.api.Assertions.assertThatThrownBy;
3838
import static org.eclipse.tractusx.edc.identity.mapper.BdrsClientExtension.BDRS_SERVER_URL_PROPERTY;
39-
import static org.eclipse.tractusx.edc.identity.mapper.BdrsClientExtension.BDRS_SERVER_URL_PROPERTY_DEPRECATED;
4039
import static org.eclipse.tractusx.edc.identity.mapper.BdrsClientExtension.CONNECTOR_DID_PROPERTY;
4140
import static org.eclipse.tractusx.edc.identity.mapper.BdrsClientExtension.CREDENTIAL_SERVICE_BASE_URL_PROPERTY;
4241
import static org.mockito.ArgumentMatchers.anyString;
@@ -63,7 +62,7 @@ void setup(ServiceExtensionContext context) {
6362
@Test
6463
void createClient_whenUrlMissing_expectException(ServiceExtensionContext context, BdrsClientExtension extension) {
6564
var cfg = mock(Config.class);
66-
when(cfg.getString(eq(BDRS_SERVER_URL_PROPERTY_DEPRECATED))).thenThrow(new EdcException(BDRS_SERVER_URL_PROPERTY));
65+
when(cfg.getString(eq(BDRS_SERVER_URL_PROPERTY))).thenThrow(new EdcException(BDRS_SERVER_URL_PROPERTY));
6766
when(context.getConfig()).thenReturn(cfg);
6867
when(cfg.getString(eq(BDRS_SERVER_URL_PROPERTY), isNull())).thenReturn(null);
6968
when(cfg.getString(eq(CONNECTOR_DID_PROPERTY), isNull())).thenReturn("did:web:self");

edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/DataPlaneProxyConsumerApiExtension.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
import static java.util.Optional.ofNullable;
4646
import static java.util.concurrent.Executors.newFixedThreadPool;
47-
import static org.eclipse.tractusx.edc.core.utils.ConfigUtil.propertyCompatibility;
4847

4948
/**
5049
* Instantiates the Proxy Data API for the consumer-side data plane.
@@ -65,16 +64,8 @@ public class DataPlaneProxyConsumerApiExtension implements ServiceExtension {
6564

6665
@Setting(value = "Data plane proxy API consumer port", type = "int")
6766
private static final String CONSUMER_PORT = "tx.edc.dpf.consumer.proxy.port";
68-
@Deprecated(since = "0.7.1")
69-
private static final String CONSUMER_PORT_DEPRECATED = "tx.dpf.consumer.proxy.port";
7067
@Setting(value = "Thread pool size for the consumer data plane proxy gateway", type = "int")
7168
private static final String THREAD_POOL_SIZE = "tx.edc.dpf.consumer.proxy.thread.pool";
72-
@Deprecated(since = "0.7.1")
73-
private static final String THREAD_POOL_SIZE_DEPRECATED = "tx.dpf.consumer.proxy.thread.pool";
74-
@Deprecated(since = "0.7.1")
75-
private static final String AUTH_SETTING_APIKEY_ALIAS_DEPRECATED = "edc.api.auth.key.alias";
76-
@Deprecated(since = "0.7.1")
77-
private static final String AUTH_SETTING_APIKEY_DEPRECATED = "edc.api.auth.key";
7869

7970
@Configuration
8071
private DataPlaneProxyConsumerApiConfiguration apiConfiguration;
@@ -104,11 +95,11 @@ public String name() {
10495
@Override
10596
public void initialize(ServiceExtensionContext context) {
10697
// when deprecated port will be purged, just assign `apiConfiguration.port()` to `port`
107-
var port = propertyCompatibility(context, CONSUMER_PORT, CONSUMER_PORT_DEPRECATED, DEFAULT_PROXY_PORT);
98+
var port = context.getSetting(CONSUMER_PORT, DEFAULT_PROXY_PORT);
10899
var portMapping = new PortMapping(PROXY, port, apiConfiguration.path());
109100
portMappingRegistry.register(portMapping);
110101

111-
var poolSize = propertyCompatibility(context, THREAD_POOL_SIZE, THREAD_POOL_SIZE_DEPRECATED, DEFAULT_THREAD_POOL);
102+
var poolSize = context.getSetting(THREAD_POOL_SIZE, DEFAULT_THREAD_POOL);
112103
executorService = newFixedThreadPool(poolSize);
113104

114105
var authenticationService = createAuthenticationService(context);
@@ -130,9 +121,9 @@ public void shutdown() {
130121

131122
private AuthenticationService createAuthenticationService(ServiceExtensionContext context) {
132123

133-
var apiKey = ofNullable(propertyCompatibility(context, AUTH_SETTING_CONSUMER_PROXY_APIKEY_ALIAS, AUTH_SETTING_APIKEY_ALIAS_DEPRECATED, null))
124+
var apiKey = ofNullable(context.getSetting(AUTH_SETTING_CONSUMER_PROXY_APIKEY_ALIAS, null))
134125
.map(alias -> vault.resolveSecret(alias))
135-
.orElseGet(() -> propertyCompatibility(context, AUTH_SETTING_CONSUMER_PROXY_APIKEY, AUTH_SETTING_APIKEY_DEPRECATED, UUID.randomUUID().toString()));
126+
.orElseGet(() -> context.getSetting(AUTH_SETTING_CONSUMER_PROXY_APIKEY, UUID.randomUUID().toString()));
136127
return new TokenBasedAuthenticationService(context.getMonitor().withPrefix("ConsumerProxyAPI"), apiKey);
137128
}
138129

edc-extensions/dataplane/dataplane-selector-configuration/README.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

edc-extensions/dataplane/dataplane-selector-configuration/build.gradle.kts

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)