From 2b9cb78f3f94a725209fa4fafc2a2be1c6e84104 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 6 Jun 2024 16:32:55 +0200 Subject: [PATCH 1/6] chore(tests):[#529] Correct typo in javadoc --- .../tractusx/irs/data/LocalTestDataConfiguration.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java index 0d1c64d635..053954ff4f 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java @@ -33,9 +33,11 @@ import org.springframework.context.annotation.Profile; /** - * Local spring configuration for loading test data from resrouces. + * Local spring configuration for loading test data from resources. */ -@Profile({ "local", "stubtest" }) +@Profile({ "local", + "stubtest" +}) @Configuration @RequiredArgsConstructor public class LocalTestDataConfiguration { From acce5e41420850021d80510a8816b41c099a73fa Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 13:53:28 +0200 Subject: [PATCH 2/6] chore(docs):[#529] Add semantic model links to documentation --- COMPATIBILITY_MATRIX.md | 28 +++++++++---------- ...#212-Update-SingleLevelBomAsBuilt-2-0-0.md | 2 +- docs/src/docs/arc42/glossary.adoc | 2 +- .../introduction-goals/requirements.adoc | 2 +- .../irs-iterative/scenario-2.adoc | 2 +- .../scope-context/technical-context.adoc | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/COMPATIBILITY_MATRIX.md b/COMPATIBILITY_MATRIX.md index 89a9fdce32..a420848fe8 100644 --- a/COMPATIBILITY_MATRIX.md +++ b/COMPATIBILITY_MATRIX.md @@ -4,20 +4,20 @@ Full changelog of IRS: [changelog](CHANGELOG.md) ## [Unreleased] -| Dependency | Version | Helm | Comments | -|---------------------------|------------------------------|-------|-----------------| -| EDC | 0.7.0 | 0.7.0 | | -| Semantics Hub | 0.3.1 | 0.2.1 | REST connection | -| DTR | 0.4.1 | 0.4.9 | REST connection | -| Discovery Finder | 0.2.5 | - | REST connection | -| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | | -| Helm | 3.9.3 | - | - | -| Kubernetes | 1.29 | - | - | -| SingleLevelBomAsBuilt | [ 2.0.0; 3.0.0 ] | - | Model version | -| SingleLevelBomAsPlanned | [ 2.0.0; 3.0.0 ] | - | Model version | -| SingleLevelBomAsSpecified | 2.0.0 | - | Model version | -| SingleLevelUsageAsBuilt | 3.0.0 | - | Model version | -| SingleLevelUsageAsPlanned | 2.0.0 | - | Model version | +| Dependency | Version | Helm | Comments | +|-----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|-------|-----------------| +| EDC | 0.7.0 | 0.7.0 | | +| Semantics Hub | 0.3.1 | 0.2.1 | REST connection | +| DTR | 0.4.1 | 0.4.9 | REST connection | +| Discovery Finder | 0.2.5 | - | REST connection | +| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | | +| Helm | 3.9.3 | - | - | +| Kubernetes | 1.29 | - | - | +| [SingleLevelBomAsBuilt](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built) | [ 2.0.0; 3.0.0 ] | - | Model version | +| [SingleLevelBomAsPlanned](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_planned) | [ 2.0.0; 3.0.0 ] | - | Model version | +| [SingleLevelBomAsSpecified](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_specified) | 2.0.0 | - | Model version | +| [SingleLevelUsageAsBuilt](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_usage_as_built) | 3.0.0 | - | Model version | +| [SingleLevelUsageAsPlanned](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_usage_as_planned) | 2.0.0 | - | Model version | ## [CATENA-X Release 24.05](https://eclipse-tractusx.github.io/CHANGELOG/) - [5.1.3](https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/5.1.3) - 2024-05-17 diff --git a/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md b/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md index b2f4a4389a..13afd8ad7a 100644 --- a/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md +++ b/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md @@ -2,7 +2,7 @@ # Problem Statement -SingleLevelBomAsBuilt 2.0.0 introduces a new boolean property `hasAlternatives`. +[SingleLevelBomAsBuilt 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built/2.0.0) introduces a new boolean property `hasAlternatives`. The model now allows to reference items that are not available as AsBuilt Twins - (e.g. Serial items or batches) but as AsPlanned twins. Sometimes, however, it is not known what exact AsPlanned twin is needed to build the BoM asBuilt because there are different alternative twins to choose from. In that case, all potential alternatives have to be referenced. To indicate that ambiguity, the property "hasAlternative" has been added to the aspect model. diff --git a/docs/src/docs/arc42/glossary.adoc b/docs/src/docs/arc42/glossary.adoc index a1753da1e1..d23ffbf1a9 100644 --- a/docs/src/docs/arc42/glossary.adoc +++ b/docs/src/docs/arc42/glossary.adoc @@ -35,6 +35,6 @@ https://github.com/eclipse-tractusx/ssi-docu/blob/main/docs/architecture/cx-3-2/ |Shell | | see "Asset Administration Shell" |Traversal Aspect | | aka Edge: Aspect which the IRS uses for traversal through the data chain. Identified by a parent-child or a child-parent relationship. -Samples: SingleLevelBomAsPlanned, SingleLevelBomAsBuilt and SingleLevelUsageAsBuilt +Samples: https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_planned[SingleLevelBomAsPlanned], https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built[SingleLevelBomAsBuilt] and https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_usage_as_built[SingleLevelUsageAsBuilt] |Verifiable Credential | VC | For more information see: https://github.com/eclipse-tractusx/ssi-docu/tree/main/docs/architecture/cx-3-2/3.%20Verifiable%20Credentials[Verifiable Credentials] |=== \ No newline at end of file diff --git a/docs/src/docs/arc42/introduction-goals/requirements.adoc b/docs/src/docs/arc42/introduction-goals/requirements.adoc index 141c95eeb8..bd87ab0682 100644 --- a/docs/src/docs/arc42/introduction-goals/requirements.adoc +++ b/docs/src/docs/arc42/introduction-goals/requirements.adoc @@ -9,7 +9,7 @@ The IRS is a: - Data chain provider == Substantial Features -- provide a top-down BoM asBuilt tree structure along the submodel "SingleLevelBomAsBuilt" +- provide a top-down BoM asBuilt tree structure along the submodel https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built["SingleLevelBomAsBuilt"] - usage of EDC consumer for communicating with the Catena-X network - functionality of IRS provider will be handled by providers submodel servers - federated IRS service diff --git a/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc b/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc index 07164adb6a..8cfdf270f1 100644 --- a/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc +++ b/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc @@ -12,7 +12,7 @@ include::../../../../uml-diagrams/runtime-view/job-execution.puml[] After a job has been created (see Scenario 1: Create Job), the first transfer containing the root item ID is passed to the ExecutorService. The transfer is then started asynchronously and retrieves the necessary information from the Catena-X network, first by fetching the AAS information from the DigitalTwin registry and then calling the SubmodelProviders for the submodel payload. -At least the aspect SingleLevelBomAsBuilt is required for the tree to be built. If the customer that started the job provided more aspects to be fetched, they will be retrieved here too. +At least the aspect https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built[SingleLevelBomAsBuilt] is required for the tree to be built. If the customer that started the job provided more aspects to be fetched, they will be retrieved here too. The result of each transfer is stored in the BlobStore. After the transfer process has finished, any subsequent child IDs will be extracted and new transfer processes will be scheduled for those via the ExecutorService. This cycle repeats until all leafs were reached, the specified max depth has been reached, or the job was canceled externally. diff --git a/docs/src/docs/arc42/scope-context/technical-context.adoc b/docs/src/docs/arc42/scope-context/technical-context.adoc index cfb65d299f..1656f83cb9 100644 --- a/docs/src/docs/arc42/scope-context/technical-context.adoc +++ b/docs/src/docs/arc42/scope-context/technical-context.adoc @@ -13,7 +13,7 @@ We provide a REST API that can be consumed by any system registered in the Caten In order to consume the Restful application IRS, the security aspect should be taken in consideration. IRS is a Spring Boot based application and is secured with the OpenID connector provider with OAuth2 protocol. This means for the consumers (users) that they need to authenticate themselves in order to be authorized to get access to the IRS. They generate a bearer token that they get from OAuth2 provider and attach it to the HTTP header parameter Authorization. === Registry API -The IRS acts as a consumer of the component Asset Administration Shell Registry. The IRS contains a Restful client (REST template) that build a REST call to the mentioned Digital Twin Registry API based on its known URL (the AAS registry URL is configured in the IRS Restful API). The request contains the given "globalAssetId" by the consumer. Like described in the above section, the security aspect is required in order to achieve a REST call against the AAS Registry. As a response, the IRS gets the corresponding asset administration shell descriptor. The last one contains a list of submodel descriptors which can be filtered by the aspect type entered by the consumer. An aspect type like SingleLevelBomAsBuilt, SerialPart etc. And as mentioned above, the transport protocol HTTP(S) is used for the REST call communication. +The IRS acts as a consumer of the component Asset Administration Shell Registry. The IRS contains a Restful client (REST template) that build a REST call to the mentioned Digital Twin Registry API based on its known URL (the AAS registry URL is configured in the IRS Restful API). The request contains the given "globalAssetId" by the consumer. Like described in the above section, the security aspect is required in order to achieve a REST call against the AAS Registry. As a response, the IRS gets the corresponding asset administration shell descriptor. The last one contains a list of submodel descriptors which can be filtered by the aspect type entered by the consumer. An aspect type like https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built[SingleLevelBomAsBuilt], https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.serial_part[SerialPart] etc. And as mentioned above, the transport protocol HTTP(S) is used for the REST call communication. ==== Discovery Service In a decentralized system, the digital twin registry is moved behind an EDC. To access the registry of a data provider, a new set of central services was introduces. These discovery services consist of BPN Discovery, Discovery Finder and EDC Discovery. From 5f92e6ff514c05bcb02c15776510eb81d22a4a7e Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 17 Jun 2024 15:59:55 +0200 Subject: [PATCH 3/6] chore(testdata):[#529] Fiximport script --- local/testing/testdata/transform-and-upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/testing/testdata/transform-and-upload.py b/local/testing/testdata/transform-and-upload.py index ed81839dc6..a2745e02e4 100644 --- a/local/testing/testdata/transform-and-upload.py +++ b/local/testing/testdata/transform-and-upload.py @@ -656,7 +656,7 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he dataplane_url = dataplane_urls[contract_number % len(dataplane_urls)] edc_asset_id = edc_asset_ids[contract_number % len(edc_asset_ids)] - submodel_name = tmp_key[tmp_key.index("#") + 1: len(tmp_key)] + submodel_name = tmp_key submodel_identification = uuid.uuid4().urn semantic_id = tmp_key if is_ess and tmp_data["bpnl"] in bpnl_fail: From aec3de7df80f407f4b0b7ed150f516bc185620fd Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 19 Jun 2024 13:31:50 +0200 Subject: [PATCH 4/6] chore(test):[#529] add documentation for compatibility tests (the tests themselves will be added in separate branch/PR) --- ...-E2E-tests-aspect-version-compatibility.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md new file mode 100644 index 0000000000..a9e4abaf6e --- /dev/null +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -0,0 +1,91 @@ + +# #529 E2E Tests for Aspect Version Compatibility + +Story: [[TESTING] Integration E2E Tests for backward compatibility (Happy + Unhappy Path) #529](https://github.com/eclipse-tractusx/item-relationship-service/issues/529) + + + +## SingleLevelBomAsBuilt Version Compatibility + + +Test data: +- [CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json) + + +Structure of test data: +- SingleLevelBomAsBuilt 3.0.0, BPNL00000007QG00, urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68 + - SerialPart 1.0.1 + - SingleLevelBomAsBuilt 3.1.0, BPNL00000007RI31, urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528 + - futureAddedField + - SerialPart 2.0.0 + - SerialPart 3.0.0 + - SingleLevelBomAsBuilt 2.0.0, BPNL00000003CSAP, urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c + - SerialPart 2.0.0 + - SingleLevelBomAsBuilt 2.0.0, BPNL00000007RNYV, urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc + - SerialPart 2.0.0 + +Test: + +- [Cucumber test - scenario "SingleLevelBomAsBuilt Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) + + +## SingleLevelBomAsPlanned Version Compatibility + +Test data: +- [CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json) + +Structure of test data: +- SingleLevelBomAsPlanned 3.0.0, BPNL00000007QG00, urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd + - SingleLevelBomAsPlanned 3.1.0, BPNL00000007QG00, urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1 + - futureAddedField + - PartAsPlanned 2.0.0 Test part 1 + - SingleLevelBomAsPlanned 2.0.0, BPNL00000007QG00, urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb + - PartAsPlanned 2.0.0 Test part 2 + - SingleLevelBomAsPlanned 2.0.0, BPNL00000007QG00, urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88 + - PartAsPlanned 2.0.0 Test part 3 + + +Test: +- [Cucumber test - scenario "SingleLevelBomAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) + + +## SingleLevelUsageAsBuilt Version Compatibility + +Tests without submodel aspects because there are already tests for SerialPart in the SingleLevelBomAsBuilt tests. + + +Test data: +- [CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json) + + +Structure of test data: +- SingleLevelUsageAsBuilt 3.0.0, BPNL00000007QG00, urn:uuid:677582a5-bdca-45e1-a671-7a98ff5ddcb7 + - SingleLevelUsageAsBuilt 3.1.0, BPNL00000007QG00, urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc + - futureAddedField + - SingleLevelUsageAsBuilt 2.0.0, BPNL00000007QG00, urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b + + +Test: +- [Cucumber test - scenario "SingleLevelBomAsBuilt Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) + + +## SingleLevelUsageAsPlanned Version Compatibility + +Tests without submodel aspects because there are already tests for PartAsPlanned in the SingleLevelBomAsPlanned tests. + +Test data: +- [CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json) + + +Structure of test data: +- SingleLevelUsageAsPlanned 3.0.0, BPNL00000007QG00, urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647 + - SingleLevelUsageAsPlanned 3.1.0, BPNL00000007QG00, urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32 + - futureAddedField + - SingleLevelUsageAsPlanned 2.0.0, BPNL00000007QG00, urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6 + + +Test: +- [Cucumber test - scenario "SingleLevelUsageAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) + + + From e3126c54dfb967be47e6667335a5242aee9e790e Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 19 Jun 2024 13:42:32 +0200 Subject: [PATCH 5/6] Update #529-E2E-tests-aspect-version-compatibility.md chore(docs): #529: correct path --- .../#529-E2E-tests-aspect-version-compatibility.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index a9e4abaf6e..42960f9ce7 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -46,7 +46,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature) ## SingleLevelUsageAsBuilt Version Compatibility @@ -66,7 +66,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsBuilt Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsBuilt Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature) ## SingleLevelUsageAsPlanned Version Compatibility @@ -85,7 +85,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelUsageAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelUsageAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature) From c52100f668e7bea590293d8109312e2760ce5580 Mon Sep 17 00:00:00 2001 From: ds-mkanal <100209308+mkanal@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:05:03 +0200 Subject: [PATCH 6/6] fix(compatibility):[#] fix release version of EDC COMPATIBILITY_MATRIX.md --- COMPATIBILITY_MATRIX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COMPATIBILITY_MATRIX.md b/COMPATIBILITY_MATRIX.md index a420848fe8..a2b4903d12 100644 --- a/COMPATIBILITY_MATRIX.md +++ b/COMPATIBILITY_MATRIX.md @@ -23,7 +23,7 @@ Full changelog of IRS: [changelog](CHANGELOG.md) | Dependency | Version | Helm | Comments | |---------------------------|------------------------------|-------|-----------------| -| EDC | 0.7.0 | 0.7.0 | | +| EDC | 0.7.1 | 0.7.1 | | | Semantics Hub | 0.3.1 | 0.2.1 | REST connection | | DTR | 0.4.1 | 0.4.9 | REST connection | | Discovery Finder | 0.2.5 | - | REST connection |