diff --git a/.env b/.env index 54dae6834..67ff1b07e 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # Env variables for docker-compose.yaml -EDC_IMAGE=ghcr.io/sovity/edc-dev:7.2.1 -TEST_BACKEND_IMAGE=ghcr.io/sovity/test-backend:7.2.1 +EDC_IMAGE=ghcr.io/sovity/edc-dev:7.2.2 +TEST_BACKEND_IMAGE=ghcr.io/sovity/test-backend:7.2.2 EDC_UI_IMAGE=ghcr.io/sovity/edc-ui:2.4.0 EDC_UI_ACTIVE_PROFILE=sovity-open-source diff --git a/CHANGELOG.md b/CHANGELOG.md index 96ca45449..765b2397d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,35 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md). #### Compatible Versions +## [7.2.2] - 2024-03-13 + +### Overview + +Bugfix + +### EDC UI + +https://github.com/sovity/edc-ui/releases/tag/v2.4.0 + +### EDC Extensions + +#### Patch Changes + +- DspCatalogService: Stable Contract Offer IDs removed + +### Deployment Migration Notes + +_No special deployment migration steps required_ + +#### Compatible Versions + +- Connector Backend Docker Images: + - Dev EDC: `ghcr.io/sovity/edc-dev:7.2.2` + - sovity EDC CE: `ghcr.io/sovity/edc-ce:7.2.2` + - MDS EDC CE: `ghcr.io/sovity/edc-ce-mds:7.2.2` +- Connector UI Docker Image: `ghcr.io/sovity/edc-ui:2.4.0` + + ## [7.2.1] - 2024-02-21 ### Overview diff --git a/utils/catalog-parser/src/main/java/de/sovity/edc/utils/catalog/mapper/DspDataOfferBuilder.java b/utils/catalog-parser/src/main/java/de/sovity/edc/utils/catalog/mapper/DspDataOfferBuilder.java index f5ef31736..119d9d102 100644 --- a/utils/catalog-parser/src/main/java/de/sovity/edc/utils/catalog/mapper/DspDataOfferBuilder.java +++ b/utils/catalog-parser/src/main/java/de/sovity/edc/utils/catalog/mapper/DspDataOfferBuilder.java @@ -22,7 +22,6 @@ import jakarta.json.Json; import jakarta.json.JsonObject; import lombok.RequiredArgsConstructor; -import lombok.val; import org.eclipse.edc.jsonld.spi.JsonLd; import org.jetbrains.annotations.NotNull; @@ -67,9 +66,6 @@ private DspDataOffer buildDataOffer(JsonObject dataset) { @NotNull private DspContractOffer buildContractOffer(JsonObject json) { - val stableId = DspContractOfferUtils.buildStableId(json); - val withStableId = Json.createObjectBuilder(json).remove(Prop.ID).add(Prop.ID, stableId).build(); - - return new DspContractOffer(stableId, withStableId); + return new DspContractOffer(JsonLdUtils.id(json), json); } } diff --git a/utils/catalog-parser/src/test/java/de/sovity/edc/utils/catalog/DspCatalogServiceTest.java b/utils/catalog-parser/src/test/java/de/sovity/edc/utils/catalog/DspCatalogServiceTest.java index 4a34cb5a1..88fa35cb2 100644 --- a/utils/catalog-parser/src/test/java/de/sovity/edc/utils/catalog/DspCatalogServiceTest.java +++ b/utils/catalog-parser/src/test/java/de/sovity/edc/utils/catalog/DspCatalogServiceTest.java @@ -72,7 +72,7 @@ void testCatalogMapping() { assertThat(offer.getContractOffers()).hasSize(1); var co = offer.getContractOffers().get(0); - assertThat(co.getContractOfferId()).isEqualTo("contract-id:asset-id:ODJjMDNjMmM4YzQ5NmE0OTg4ZjVjOTY4OGU2MmMyN2UxYjIxZDAwZQ=="); + assertThat(co.getContractOfferId()).isEqualTo("policy-1"); assertThat(toJson(co.getPolicyJsonLd())).contains("ALWAYS_TRUE"); assertThat(offer.getDistributions()).hasSize(1); diff --git a/utils/catalog-parser/src/test/java/de/sovity/edc/utils/catalog/mapper/DspContractOfferUtilsTest.java b/utils/catalog-parser/src/test/java/de/sovity/edc/utils/catalog/mapper/DspContractOfferUtilsTest.java deleted file mode 100644 index 21ceeed8d..000000000 --- a/utils/catalog-parser/src/test/java/de/sovity/edc/utils/catalog/mapper/DspContractOfferUtilsTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package de.sovity.edc.utils.catalog.mapper; - -import jakarta.json.Json; -import lombok.val; -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; - -class DspContractOfferUtilsTest { - @Test - void testCanConvertTheRandomIdToStableId() { - // arrange - val contractOffer = Json.createObjectBuilder() - .add("@id", "part1:part2:part3") - .add("somefield", "somevalue") - .build(); - - // act - val result = DspContractOfferUtils.buildStableId(contractOffer); - - // assert - assertThat(result).isEqualTo("part1:part2:MjliNzcwMjdjMzA2YzE3ZGYyZWNhZjY2OGI3OTYxY2U5OTY1YmExNw=="); - } -} diff --git a/utils/catalog-parser/src/test/resources/de/sovity/edc/utils/catalog/catalogResponse.json b/utils/catalog-parser/src/test/resources/de/sovity/edc/utils/catalog/catalogResponse.json index 613b7ac49..d069f7302 100644 --- a/utils/catalog-parser/src/test/resources/de/sovity/edc/utils/catalog/catalogResponse.json +++ b/utils/catalog-parser/src/test/resources/de/sovity/edc/utils/catalog/catalogResponse.json @@ -5,7 +5,7 @@ "@id": "test-1.0", "@type": "dcat:Dataset", "odrl:hasPolicy": { - "@id": "contract-id:asset-id:policy-id", + "@id": "policy-1", "@type": "odrl:Set", "odrl:permission": { "odrl:target": "test-1.0",