diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d338bf7a8..326c5dfad4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,12 +21,20 @@ _**For better traceability add the corresponding GitHub issue number in each cha EdcContractAgreementsResponse eclipse-tractusx/traceability-foss#963 - Added missing @context values in edc asset creation eclipse-tractusx/traceability-foss#978 - Switch to `dct:type` `https://w3id.org/catenax/taxonomy#` for notification asset creation eclipse-tractusx/traceability-foss#978 +- Shells in Job response will contain all submodel descriptors returned by provider, instead filtered by aspect-type parameter. #510 ## Added - Added endpoint for dedicated removal of policy from BPNL. #559 - Integration Test Policy Store API Unhappy Path. #519 +## [5.1.4] - 2024-05-27 + +### Fixed + +- Fixed submodel request path by introducing configuration property `irs-edc-client.submodel.submodel-suffix` which will + be appended to the href URL. + ## [5.1.3] - 2024-05-17 ### Fixed @@ -46,7 +54,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha - Updated default accepted policy to latest traceability framework agreement #596 - BPN summary was removed from Job response #568 -- Shells in Job response will contain all submodel descriptors returned by provider, instead filtered by aspect-type parameter. #510 + ## [5.1.1] - 2024-05-08 @@ -682,7 +690,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha - **Select Aspects you need** You are able to select the needed aspects for which you want to collect the correct endpoint information. -[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/5.1.3...HEAD +[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/5.1.4...HEAD +[5.1.4]: https://github.com/eclipse-tractusx/item-relationship-service/compare/5.1.3...5.1.4 [5.1.3]: https://github.com/eclipse-tractusx/item-relationship-service/compare/5.1.2...5.1.3 [5.1.2]: https://github.com/eclipse-tractusx/item-relationship-service/compare/5.1.1...5.1.2 [5.1.1]: https://github.com/eclipse-tractusx/item-relationship-service/compare/5.1.0...5.1.1 diff --git a/charts/item-relationship-service/CHANGELOG.md b/charts/item-relationship-service/CHANGELOG.md index cf8ba0b369..3392764545 100644 --- a/charts/item-relationship-service/CHANGELOG.md +++ b/charts/item-relationship-service/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [7.1.4] - 2024-05-27 + +### Added +- Added configuration property `edc.submodel.suffix`. + +### Changed + +- Update IRS version to 5.1.4 + ## [7.1.3] - 2024-05-17 ### Changed diff --git a/charts/item-relationship-service/Chart.yaml b/charts/item-relationship-service/Chart.yaml index b505b6030b..5eb5360ab9 100644 --- a/charts/item-relationship-service/Chart.yaml +++ b/charts/item-relationship-service/Chart.yaml @@ -35,12 +35,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 7.1.3 +version: 7.1.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "5.1.3" +appVersion: "5.1.4" dependencies: - name: common repository: https://charts.bitnami.com/bitnami diff --git a/charts/item-relationship-service/templates/configmap-spring-app-config.yaml b/charts/item-relationship-service/templates/configmap-spring-app-config.yaml index 1fbb9c2e46..92b09f6f6b 100644 --- a/charts/item-relationship-service/templates/configmap-spring-app-config.yaml +++ b/charts/item-relationship-service/templates/configmap-spring-app-config.yaml @@ -115,6 +115,7 @@ data: submodel: request-ttl: {{ tpl .Values.edc.submodel.request.ttl . | default "PT10M" | quote }} urn-prefix: {{ tpl (.Values.edc.submodel.urnprefix | default "/urn") . | quote }} + submodel-suffix: {{ tpl (.Values.edc.submodel.suffix | default "/$value") . | quote }} catalog: acceptedPolicies: diff --git a/charts/item-relationship-service/values.yaml b/charts/item-relationship-service/values.yaml index 4646065ffe..4d828a8670 100644 --- a/charts/item-relationship-service/values.yaml +++ b/charts/item-relationship-service/values.yaml @@ -185,6 +185,7 @@ edc: request: ttl: PT10M # Requests to dataplane will time out after this duration (see https://en.wikipedia.org/wiki/ISO_8601#Durations) urnprefix: /urn + suffix: /$value catalog: # IRS will only negotiate contracts for offers with a policy as defined in the allowedNames list. # If a requested asset does not provide one of these policies, a tombstone will be created and this node will not be processed. diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 9fe1f21fd3..14f8be9325 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -3,7 +3,7 @@ info: description: The API of the Item Relationship Service (IRS) for retrieving item graphs along the value chain of CATENA-X partners. title: IRS API - version: 5.1.3 + version: 5.1.4 servers: - url: http://localhost:8080 security: diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/IrsApplication.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/IrsApplication.java index 852835ad63..e37f31b068 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/IrsApplication.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/IrsApplication.java @@ -59,7 +59,7 @@ public class IrsApplication { /** * The IRS API version. */ - public static final String API_VERSION = "5.1.3"; + public static final String API_VERSION = "5.1.4"; /** * The URL prefix for IRS API URLs. diff --git a/irs-api/src/main/resources/application.yml b/irs-api/src/main/resources/application.yml index 870775f826..93b9a76f7a 100644 --- a/irs-api/src/main/resources/application.yml +++ b/irs-api/src/main/resources/application.yml @@ -148,6 +148,7 @@ irs-edc-client: submodel: request-ttl: ${EDC_SUBMODEL_REQUEST_TTL:PT10M} # How long to wait for an async EDC submodel retrieval to finish, ISO 8601 Duration urn-prefix: ${EDC_SUBMODEL_URN_PREFIX:/urn} # A prefix used to identify URNs correctly in the submodel endpoint address + submodel-suffix: "/$value" timeout: read: PT90S # HTTP read timeout for the submodel client connect: PT90S # HTTP connect timeout for the submodel client diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java index 47ce8f4fa1..00b0000a76 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java @@ -55,6 +55,9 @@ import org.eclipse.tractusx.irs.testing.wiremock.SubmodelFacadeWiremockSupport; public class WiremockSupport { + + public static final String SUBMODEL_SUFFIX = "/\\$value"; + public static EndpointDataReference createEndpointDataReference(final String contractAgreementId) { final EDRAuthCode edrAuthCode = EDRAuthCode.builder() .cid(contractAgreementId) @@ -126,7 +129,7 @@ static void verifyNegotiationCalls(final int times) { } static void successfulDataRequests(final String assetId, final String fileName) { - stubFor(get(urlPathMatching(DtrWiremockSupport.DATAPLANE_PUBLIC_PATH + "/" + assetId)).willReturn( + stubFor(get(urlPathMatching(DtrWiremockSupport.DATAPLANE_PUBLIC_PATH + "/" + assetId+ SUBMODEL_SUFFIX)).willReturn( responseWithStatus(200).withBodyFile(fileName))); } diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcConfiguration.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcConfiguration.java index a5dc23d0ff..68c1b5f46e 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcConfiguration.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcConfiguration.java @@ -105,6 +105,7 @@ public static class SubmodelConfig { private Duration requestTtl; private String urnPrefix; + private String submodelSuffix; } } diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelFacade.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelFacade.java index 8913c52127..8a97831019 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelFacade.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelFacade.java @@ -56,7 +56,9 @@ public class EdcSubmodelFacade { public SubmodelDescriptor getSubmodelPayload(final String connectorEndpoint, final String submodelDataplaneUrl, final String assetId, final String bpn) throws EdcClientException { try { - return client.getSubmodelPayload(connectorEndpoint, submodelDataplaneUrl, assetId, bpn) + final String fullSubmodelDataplaneUrl = submodelDataplaneUrl + config.getSubmodel().getSubmodelSuffix(); + log.debug("Requesting Submodel for URL: '{}'", fullSubmodelDataplaneUrl); + return client.getSubmodelPayload(connectorEndpoint, fullSubmodelDataplaneUrl, assetId, bpn) .get(config.getAsyncTimeoutMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { log.debug("InterruptedException occurred.", e);