Skip to content

Commit

Permalink
chore: fix compile issue after api context refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood committed Jun 4, 2024
1 parent 0ecd5d9 commit dd8accb
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 14 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ jobs:
run: |
./gradlew checkstyleMain checkstyleTest
verify-javadoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java

- name: Run Javadoc
run: ./gradlew javadoc

unit-tests:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.28, Apache-2.0, approved, clea
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.30.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.37.3, Apache-2.0, approved, #11701
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.39.1, Apache-2.0, approved, #14830
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.39.3, Apache-2.0, approved, #14830
maven/mavencentral/com.nimbusds/oauth2-oidc-sdk/10.7.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.nimbusds/oauth2-oidc-sdk/11.9.1, Apache-2.0, approved, #12667
maven/mavencentral/com.puppycrawl.tools/checkstyle/10.17.0, , restricted, clearlydefined
maven/mavencentral/com.puppycrawl.tools/checkstyle/10.17.0, LGPL-2.1-or-later, 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
Expand Down Expand Up @@ -394,13 +395,11 @@ maven/mavencentral/org.eclipse.edc/data-plane-http-oauth2/0.7.1-SNAPSHOT, Apache
maven/mavencentral/org.eclipse.edc/data-plane-http-spi/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-http/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-public-api-v2/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-selector-api/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-selector-client/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-selector-control-api/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-selector-core/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-selector-spi/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-self-registration/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-signaling-api-configuration/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-signaling-api/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-signaling-client/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/data-plane-signaling-transform/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
Expand Down Expand Up @@ -475,6 +474,7 @@ maven/mavencentral/org.eclipse.edc/keys-lib/0.7.1-SNAPSHOT, Apache-2.0, approved
maven/mavencentral/org.eclipse.edc/keys-spi/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/ldp-verifiable-credentials/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/management-api-configuration/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/management-api-lib/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/management-api-test-fixtures/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/management-api/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/micrometer-core/0.7.1-SNAPSHOT, Apache-2.0, approved, technology.edc
Expand Down Expand Up @@ -546,7 +546,7 @@ maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.21, EPL-2.0 OR Apache-2.0,
maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty
maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.21, EPL-2.0 OR Apache-2.0, approved, rt.jetty
maven/mavencentral/org.flywaydb/flyway-core/10.13.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.flywaydb/flyway-database-postgresql/10.13.0, , restricted, clearlydefined
maven/mavencentral/org.flywaydb/flyway-database-postgresql/10.13.0, NOASSERTION, restricted, clearlydefined
maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish
maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish
maven/mavencentral/org.glassfish.hk2/hk2-locator/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish
Expand Down
1 change: 1 addition & 0 deletions edc-controlplane/edc-controlplane-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies {
runtimeOnly(libs.edc.api.management)
runtimeOnly(libs.edc.api.controlplane)
runtimeOnly(libs.edc.api.management.config)
runtimeOnly(libs.edc.api.control.config)
runtimeOnly(libs.edc.api.core)
runtimeOnly(libs.edc.api.observability)
runtimeOnly(libs.edc.dsp)
Expand Down
2 changes: 2 additions & 0 deletions edc-dataplane/edc-dataplane-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies {
runtimeOnly(libs.edc.dpf.api.control)
runtimeOnly(libs.edc.dpf.api.signaling)

runtimeOnly(libs.edc.api.control.config)
runtimeOnly(libs.edc.dpf.api.public.v2)
runtimeOnly(libs.edc.core.connector)
runtimeOnly(libs.edc.boot)
Expand All @@ -55,4 +56,5 @@ dependencies {
runtimeOnly(libs.bundles.edc.monitoring)
runtimeOnly(libs.edc.ext.http)
runtimeOnly(libs.edc.api.observability)
runtimeOnly(libs.edc.api.core)
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

package org.eclipse.tractusx.edc.api.bpn;

import org.eclipse.edc.connector.api.management.configuration.ManagementApiConfiguration;
import org.eclipse.edc.jsonld.spi.JsonLd;
import org.eclipse.edc.runtime.metamodel.annotation.Extension;
import org.eclipse.edc.runtime.metamodel.annotation.Inject;
import org.eclipse.edc.spi.system.ServiceExtension;
import org.eclipse.edc.spi.system.ServiceExtensionContext;
import org.eclipse.edc.web.spi.WebService;
import org.eclipse.edc.web.spi.configuration.ApiContext;
import org.eclipse.tractusx.edc.validation.businesspartner.spi.BusinessPartnerStore;

import static org.eclipse.tractusx.edc.edr.spi.CoreConstants.TX_NAMESPACE;
Expand All @@ -37,8 +37,6 @@ public class BusinessPartnerGroupApiExtension implements ServiceExtension {
@Inject
private WebService webService;
@Inject
private ManagementApiConfiguration apiConfiguration;
@Inject
private JsonLd jsonLdService;
@Inject
private BusinessPartnerStore businessPartnerStore;
Expand All @@ -47,7 +45,7 @@ public class BusinessPartnerGroupApiExtension implements ServiceExtension {
public void initialize(ServiceExtensionContext context) {
jsonLdService.registerNamespace(TX_PREFIX, TX_NAMESPACE);

webService.registerResource(apiConfiguration.getContextAlias(), new BusinessPartnerGroupApiController(businessPartnerStore));
webService.registerResource(ApiContext.MANAGEMENT, new BusinessPartnerGroupApiController(businessPartnerStore));

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ public String name() {
@Override
public void initialize(ServiceExtensionContext context) {
var port = propertyCompatibility(context, CONSUMER_PORT, CONSUMER_PORT_DEPRECATED, DEFAULT_PROXY_PORT);
var config = context.getConfig(CONSUMER_CONFIG_KEY);

configurer.configure(context, webServer, createApiContext(port));
configurer.configure(config, webServer, createApiContext(port));

var poolSize = propertyCompatibility(context, THREAD_POOL_SIZE, THREAD_POOL_SIZE_DEPRECATED, DEFAULT_THREAD_POOL);
executorService = newFixedThreadPool(poolSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.Objects;

/**
* This is a carbon-copy of the {@link org.eclipse.edc.api.auth.token.TokenBasedAuthenticationService}.
* This is a carbon-copy of the upstream EDC org.eclipse.edc.api.auth.token.TokenBasedAuthenticationService.
*
* @deprecated this is a shim that we need to use until upstream EDC has made the TokenBasedAuthenticationService available for standalone use.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.eclipse.tractusx.edc.api.edr.v2;

import jakarta.json.Json;
import org.eclipse.edc.connector.api.management.configuration.ManagementApiConfiguration;
import org.eclipse.edc.connector.controlplane.services.spi.contractnegotiation.ContractNegotiationService;
import org.eclipse.edc.edr.spi.store.EndpointDataReferenceStore;
import org.eclipse.edc.jsonld.spi.JsonLd;
Expand All @@ -31,6 +30,7 @@
import org.eclipse.edc.transform.spi.TypeTransformerRegistry;
import org.eclipse.edc.validator.spi.JsonObjectValidatorRegistry;
import org.eclipse.edc.web.spi.WebService;
import org.eclipse.edc.web.spi.configuration.ApiContext;
import org.eclipse.tractusx.edc.api.edr.v2.transform.JsonObjectFromEndpointDataReferenceEntryTransformer;
import org.eclipse.tractusx.edc.edr.spi.service.EdrService;

Expand All @@ -43,8 +43,6 @@ public class EdrCacheApiExtension implements ServiceExtension {

@Inject
private WebService webService;
@Inject
private ManagementApiConfiguration apiConfig;

@Inject
private EdrService edrService;
Expand All @@ -71,6 +69,6 @@ public void initialize(ServiceExtensionContext context) {
jsonLdService.registerNamespace(TX_PREFIX, TX_NAMESPACE);
var mgmtApiTransformerRegistry = transformerRegistry.forContext("management-api");
mgmtApiTransformerRegistry.register(new JsonObjectFromEndpointDataReferenceEntryTransformer(Json.createBuilderFactory(Map.of())));
webService.registerResource(apiConfig.getContextAlias(), new EdrCacheApiController(edrStore, mgmtApiTransformerRegistry, validatorRegistry, monitor, edrService, contractNegotiationService));
webService.registerResource(ApiContext.MANAGEMENT, new EdrCacheApiController(edrStore, mgmtApiTransformerRegistry, validatorRegistry, monitor, edrService, contractNegotiationService));
}
}
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ edc-core-edrstore = { module = "org.eclipse.edc:edr-store-core", version.ref = "
edc-controlplane-callback-staticendpoint = { module = "org.eclipse.edc:callback-static-endpoint", version.ref = "edc" }
edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" }
edc-api-management-config = { module = "org.eclipse.edc:management-api-configuration", version.ref = "edc" }
edc-api-control-config = { module = "org.eclipse.edc:control-api-configuration", version.ref = "edc" }
edc-api-management = { module = "org.eclipse.edc:management-api", version.ref = "edc" }
edc-api-core = { module = "org.eclipse.edc:api-core", version.ref = "edc" }
edc-api-management-test-fixtures = { module = "org.eclipse.edc:management-api-test-fixtures", version.ref = "edc" }
Expand Down
4 changes: 4 additions & 0 deletions samples/multi-tenancy/src/test/resources/tenants.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ edc.tenants.one.web.http.protocol.port=18282
edc.tenants.one.web.http.protocol.path=/protocol
edc.tenants.one.web.http.control.port=18283
edc.tenants.one.web.http.control.path=/control
edc.tenants.one.web.http.management.port=18284
edc.tenants.one.web.http.management.path=/management
edc.tenants.one.tx.edc.iam.iatp.bdrs.server.url=http://bdrs.test.com
edc.tenants.one.edc.iam.issuer.id=did:web:tenant1
edc.tenants.two.edc.any=any
Expand All @@ -33,5 +35,7 @@ edc.tenants.two.web.http.protocol.port=28282
edc.tenants.two.web.http.protocol.path=/protocol
edc.tenants.two.web.http.control.port=28283
edc.tenants.two.web.http.control.path=/control
edc.tenants.two.web.http.management.port=28284
edc.tenants.two.web.http.management.path=/management
edc.tenants.two.tx.edc.iam.iatp.bdrs.server.url=http://bdrs.test.com
edc.tenants.two.edc.iam.issuer.id=did:web:tenant2

0 comments on commit dd8accb

Please sign in to comment.