From 3ceb9ead4b7a1b5a26cb5c9a65d87e9a8d0f4911 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:42:04 +0200 Subject: [PATCH] build(deps): bump edc from 0.2.1 to 0.3.0 in /connector (#109) * build(deps): bump edc from 0.2.1 to 0.3.0 in /connector Bumps `edc` from 0.2.1 to 0.3.0. Updates `org.eclipse.edc:runtime-metamodel` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:control-plane-core` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:dsp` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:configuration-filesystem` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:vault-filesystem` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:iam-mock` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:management-api` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:api-observability` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:transfer-data-plane` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:transfer-pull-http-receiver` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:data-plane-selector-api` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:data-plane-selector-core` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:data-plane-selector-client` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:data-plane-api` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:data-plane-core` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) Updates `org.eclipse.edc:data-plane-http` from 0.2.1 to 0.3.0 - [Release notes](https://github.com/eclipse-edc/Connector/releases) - [Commits](https://github.com/eclipse-edc/Connector/compare/v0.2.1...v0.3.0) --- updated-dependencies: - dependency-name: org.eclipse.edc:runtime-metamodel dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:control-plane-core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:dsp dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:configuration-filesystem dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:vault-filesystem dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:iam-mock dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:management-api dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:api-observability dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:transfer-data-plane dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:transfer-pull-http-receiver dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:data-plane-selector-api dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:data-plane-selector-core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:data-plane-selector-client dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:data-plane-api dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:data-plane-core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.eclipse.edc:data-plane-http dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Add missing dependency * Adapt dataplanes response body --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ndr_brt --- connector/build.gradle.kts | 1 + connector/gradle/libs.versions.toml | 3 ++- .../management-controllers/dataplane-controller.ts | 9 ++++++--- tests/controllers/management-tests/dataplanes.test.ts | 9 ++++++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/connector/build.gradle.kts b/connector/build.gradle.kts index e3892a2b..c56b2152 100644 --- a/connector/build.gradle.kts +++ b/connector/build.gradle.kts @@ -10,6 +10,7 @@ repositories { dependencies { implementation(libs.edc.runtime.metamodel) + implementation(libs.edc.control.plane.api.client) implementation(libs.edc.control.plane.core) implementation(libs.edc.dsp) implementation(libs.edc.configuration.filesystem) diff --git a/connector/gradle/libs.versions.toml b/connector/gradle/libs.versions.toml index f656802d..067f31ef 100644 --- a/connector/gradle/libs.versions.toml +++ b/connector/gradle/libs.versions.toml @@ -2,11 +2,12 @@ format.version = "1.1" [versions] -edc = "0.2.1" +edc = "0.3.0" shadow = "8.1.1" [libraries] edc-runtime-metamodel = { module = "org.eclipse.edc:runtime-metamodel", version.ref = "edc" } +edc-control-plane-api-client = { module = "org.eclipse.edc:control-plane-api-client", version.ref = "edc" } edc-control-plane-core = { module = "org.eclipse.edc:control-plane-core", version.ref = "edc" } edc-dsp = { module = "org.eclipse.edc:dsp", version.ref = "edc" } edc-configuration-filesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" } diff --git a/src/controllers/management-controllers/dataplane-controller.ts b/src/controllers/management-controllers/dataplane-controller.ts index 107d8e31..e47eb38d 100644 --- a/src/controllers/management-controllers/dataplane-controller.ts +++ b/src/controllers/management-controllers/dataplane-controller.ts @@ -1,8 +1,10 @@ import { EdcConnectorClientContext } from "../../context"; import { + expand, expandArray, Dataplane, DataplaneInput, + IdResponse, EDC_CONTEXT, } from "../../entities"; import { Inner } from "../../inner"; @@ -22,7 +24,7 @@ export class DataplaneController { async register( input: DataplaneInput, context?: EdcConnectorClientContext, - ): Promise { + ): Promise { const actualContext = context || this.#context!; return this.#inner.request(actualContext.management, { @@ -33,12 +35,13 @@ export class DataplaneController { ...input, "@context": this.defaultContextValues, }, - }); + }) + .then((body) => expand(body, () => new IdResponse())); } async list(context?: EdcConnectorClientContext): Promise { const actualContext = context || this.#context!; - + return this.#inner .request(actualContext.management, { path: "/v2/dataplanes", diff --git a/tests/controllers/management-tests/dataplanes.test.ts b/tests/controllers/management-tests/dataplanes.test.ts index 37b6d1de..dd98ec24 100644 --- a/tests/controllers/management-tests/dataplanes.test.ts +++ b/tests/controllers/management-tests/dataplanes.test.ts @@ -1,3 +1,4 @@ +import * as crypto from "node:crypto"; import { EdcConnectorClient } from "../../../src"; describe("DataplaneController", () => { @@ -12,8 +13,9 @@ describe("DataplaneController", () => { describe("register", () => { it("succesfully register a dataplane", async () => { + const id = crypto.randomUUID(); const input = { - id: "consumer-dataplane", + "@id": id, url: "http://provider-connector:9192/control/transfer", allowedSourceTypes: ["HttpData"], allowedDestTypes: ["HttpProxy", "HttpData"], @@ -22,9 +24,10 @@ describe("DataplaneController", () => { }, }; - const registration = await dataplanes.register(input); + const idResponse = await dataplanes.register(input); - expect(registration).toBeUndefined(); + expect(idResponse.id).toBe(id); + expect(idResponse.createdAt).toBeGreaterThan(0); }); });