Skip to content

Commit

Permalink
Merge pull request #570 from catenax-ng/main
Browse files Browse the repository at this point in the history
Sync to eclipse-traxtusx
  • Loading branch information
ds-jhartmann authored Apr 30, 2024
2 parents 0a145bb + cc1bec8 commit 0927804
Show file tree
Hide file tree
Showing 35 changed files with 40,968 additions and 46,429 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/tavern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,28 @@ on:
global-asset-id-asBuilt:
type: string
description: Global-asset-id to use for the asBuilt tests.
default: 'urn:uuid:6d505432-8b31-4966-9514-4b753372683f'
default: 'urn:uuid:8724338c-5c85-4c34-91eb-e2735d58fb0d'
required: true
bpn-asBuilt:
type: string
description: BPN to use for the asBuilt global-asset-id.
default: 'BPNL00000003AVTH'
required: true
global-asset-id-ess-asBuilt:
type: string
description: Global-asset-id to use for the asBuilt tests.
default: 'urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7'
required: true
bpn-ess-asBuilt:
type: string
description: BPN to use for the asBuilt global-asset-id.
default: 'BPNL00000003CRHK'
required: true
bpn-ess-incident:
type: string
description: Incident BPN to search for which violates against environmental and social standards.
default: 'BPNS00000003B6LU'
required: true
execution-ticket:
type: string
description: JIRA execution ticket to safe results in.
Expand Down Expand Up @@ -68,6 +83,9 @@ jobs:
REGULAR_USER_API_KEY_ESS: ${{ secrets.INT_REGULAR_USER_API_KEY }}
ADMIN_USER_API_KEY_ESS: ${{ secrets.INT_ADMIN_USER_API_KEY }}
GLOBAL_ASSET_ID_AS_PLANNED: ${{ github.event.inputs.global-asset-id-asPlanned || 'urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e' }}
GLOBAL_ASSET_ID_ESS_AS_BUILT: ${{ github.event.inputs.global-asset-id-ess-asBuilt || 'urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7' }}
BPN_ESS_AS_BUILT: ${{ github.event.inputs.bpn-ess-asBuilt || 'BPNL00000003CRHK' }}
BPN_ESS_INCIDENT: ${{ github.event.inputs.bpn-ess-incident || 'BPNS00000003B6LU' }}
BPN_AS_PLANNED: ${{ github.event.inputs.bpn-asPlanned || 'BPNL00000003AYRE' }}
GLOBAL_ASSET_ID_AS_BUILT: ${{ github.event.inputs.global-asset-id-asBuilt || 'urn:uuid:6d505432-8b31-4966-9514-4b753372683f' }}
BPN_AS_BUILT: ${{ github.event.inputs.bpn-asBuilt || 'BPNL00000003AVTH' }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dependency-reduced-pom.xml
### Local files ###
dev/local/*
/local/testing/api-tests/variable.env
/local/testing/api-tests/variable.ps1
local/testing/api-tests/__pycache__/

### Cucumber ###
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha
## Changed

- Removed obsolete entries from acceptedPolicies configuration. #530
- Support of building relationships based on SingleLevelUsageAsBuilt v3.0.0 #558
- Support of building relationships based on SingleLevelBomAsPlanned v3.0.0 #558

### Fixed

Expand Down
31 changes: 12 additions & 19 deletions COMPATIBILITY_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@ Full changelog of IRS: [changelog](CHANGELOG.md)

## [Unreleased]

| Dependency | Version | Helm | Comments |
|----------------------------|------------------------------|------------|-----------------|
| EDC | 0.5.3 | 0.5.3 | |
| EDC PostgresSQL | 15.1.0-debian-11-r12 | 12.1.6 | Optional |
| MIW | 0.1.0 | 0.1.0 | REST connection |
| Semantics Hub | 0.1.29 | v0.2.11-M1 | REST connection |
| DTR | 0.3.14-M1 | 0.3.22 | REST connection |
| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | |
| SingleLevelBomAsBuilt | 2.0.0 | - | Model version |
| SingleLevelBomAsPlanned | 2.0.0 | - | Model version |
| SingleLevelBomAsSpecified | 1.0.0 | - | Model version |
| SingleLevelUsageAsBuilt | 2.0.0 | - | Model version |
| PartAsPlanned | 2.0.0 | - | Model Version |
| SingleLevelBomAsPlanned | 3.0.0 | - | Model Version |
| SerialPart | 3.0.0 | - | Model Version |
| Batch | 3.0.0 | - | Model Version |
| JustInSequencePart | 3.0.0 | - | Model Version |
| SingleLevelBomAsBuilt | 3.0.0 | - | Model Version |
| PartSiteInformationAsBuilt | 1.0.0 | - | Model Version |
| Dependency | Version | Helm | Comments |
|---------------------------|------------------------------|------------|-----------------|
| EDC | 0.5.3 | 0.5.3 | |
| EDC PostgresSQL | 15.1.0-debian-11-r12 | 12.1.6 | Optional |
| MIW | 0.1.0 | 0.1.0 | REST connection |
| Semantics Hub | 0.1.29 | v0.2.11-M1 | REST connection |
| DTR | 0.3.14-M1 | 0.3.22 | REST connection |
| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | |
| SingleLevelBomAsBuilt | [ 2.0.0; 3.0.0 ] | - | Model version |
| SingleLevelBomAsPlanned | [ 2.0.0; 3.0.0 ] | - | Model version |
| SingleLevelBomAsSpecified | 1.0.0 | - | Model version |
| SingleLevelUsageAsBuilt | 3.0.0 | - | Model version |

## [4.9.0] - 2024-04-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public ItemContainer process(final ItemContainer.ItemContainerBuilder itemContai
getSubmodels(submodelDescriptor, itemContainerBuilder, itemId.getGlobalAssetId(),
itemId.getBpn(), jobData.isAuditContractNegotiation())));
}
log.debug("Unfiltered SubmodelDescriptor: {}", aasSubmodelDescriptors);
log.debug("Filtered SubmodelDescriptor: {}", filteredSubmodelDescriptorsByAspectType);
log.trace("Unfiltered SubmodelDescriptor: {}", aasSubmodelDescriptors);
log.trace("Filtered SubmodelDescriptor: {}", filteredSubmodelDescriptorsByAspectType);

shell.payload().setSubmodelDescriptors(filteredSubmodelDescriptorsByAspectType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ public void completeTransferProcess(final String jobId, final TransferProcess pr
log.info("Job {} has no remaining transfers, transitioning to TRANSFERS_FINISHED", jobId);
newJob.transitionTransfersFinished();
} else {
log.info("Job {} has {} remaining transfers, cannot finish it: {}", jobId, remainingTransfers.size(),
newJob.build());
log.info("Job {} has {} remaining transfers, cannot finish it.", jobId, remainingTransfers.size());
}
return newJob.build();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class JsonValidatorService {
* @return the validation result, containing the validation errors if applicable
*/
public ValidationResult validate(final String jsonSchema, final String jsonPayload) throws InvalidSchemaException {
log.debug("Trying to validate JSON ({}) with schema ({})", jsonPayload, jsonSchema);
log.trace("Trying to validate JSON ({}) with schema ({})", jsonPayload, jsonSchema);

final JsonSchema schemaFromString = loadSchema(jsonSchema);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.given;
import static org.eclipse.tractusx.irs.util.TestMother.EXISTING_GLOBAL_ASSET_ID;
import static org.eclipse.tractusx.irs.util.TestMother.productDescriptionAspectName;
import static org.eclipse.tractusx.irs.util.TestMother.registerJob;
import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithDepthAndAspect;
Expand Down Expand Up @@ -134,7 +135,7 @@ void registerJobWithCollectAspectsShouldIncludeSubmodels() throws InvalidSchemaE
when(jsonValidatorService.validate(any(), any())).thenReturn(ValidationResult.builder().valid(true).build());
when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(
List.of("https://connector.endpoint.nl"));
final RegisterJob registerJob = registerJob("urn:uuid:1398cd56-682b-4c94-93ac-4807f9bfca41", 100,
final RegisterJob registerJob = registerJob(EXISTING_GLOBAL_ASSET_ID, 100,
List.of(serialPartAspectName, productDescriptionAspectName, singleLevelBomAsBuiltAspectName),
true, false, Direction.DOWNWARD);
when(connectorEndpointsService.fetchConnectorEndpoints(registerJob.getKey().getBpn())).thenReturn(
Expand Down Expand Up @@ -192,7 +193,7 @@ void registerJobWithDepthShouldBuildTreeUntilGivenDepth() {
@Test
void registerJobWithUpwardDirectionShouldBuildRelationships() {
// given
final RegisterJob registerJob = registerJobWithDirection("urn:uuid:1398cd56-682b-4c94-93ac-4807f9bfca41",
final RegisterJob registerJob = registerJobWithDirection(EXISTING_GLOBAL_ASSET_ID,
Direction.UPWARD);
when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(
List.of("http://localhost/discovery"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public class TestMother {
public static final String materialForRecyclingAspectName = "urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling";
public static final String productDescriptionAspectName = "urn:samm:io.catenax.battery.product_description:1.0.1#ProductDescription";

public static final String EXISTING_GLOBAL_ASSET_ID = "urn:uuid:5e1908ed-e176-4f57-9616-1415097d0fdf";

Faker faker = new Faker();

public static RegisterJob registerJobWithoutDepthAndAspect() {
Expand All @@ -89,7 +91,7 @@ public static RegisterJob registerJobWithoutDepth() {
}

public static RegisterJob registerJobWithDepthAndAspect(final Integer depth, final List<String> aspectTypes) {
return registerJob("urn:uuid:1398cd56-682b-4c94-93ac-4807f9bfca41", depth, aspectTypes, false, false,
return registerJob(EXISTING_GLOBAL_ASSET_ID, depth, aspectTypes, false, false,
Direction.DOWNWARD);
}

Expand All @@ -98,20 +100,20 @@ public static RegisterJob registerJobWithDirection(final String globalAssetId, f
}

public static RegisterJob registerJobWithUrl(final String callbackUrl) {
final RegisterJob registerJob = registerJob("urn:uuid:1398cd56-682b-4c94-93ac-4807f9bfca41", 100, List.of(),
final RegisterJob registerJob = registerJob(EXISTING_GLOBAL_ASSET_ID, 100, List.of(),
false, false, Direction.DOWNWARD);
registerJob.setCallbackUrl(callbackUrl);
return registerJob;
}

public static RegisterJob registerJobWithDepthAndAspectAndCollectAspects(final Integer depth,
final List<String> aspectTypes) {
return registerJob("urn:uuid:1398cd56-682b-4c94-93ac-4807f9bfca41", depth, aspectTypes, true, false,
return registerJob(EXISTING_GLOBAL_ASSET_ID, depth, aspectTypes, true, false,
Direction.DOWNWARD);
}

public static RegisterJob registerJobWithLookupBPNs() {
return registerJob("urn:uuid:1398cd56-682b-4c94-93ac-4807f9bfca41", null,
return registerJob(EXISTING_GLOBAL_ASSET_ID, null,
List.of(singleLevelBomAsBuiltAspectName), false, true, Direction.DOWNWARD);
}

Expand Down
34 changes: 14 additions & 20 deletions irs-api/src/test/resources/singleLevelUsageAsBuilt.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
{
"catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d",
"customers": [
{
"parentItems": [
{
"catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d",
"quantity": {
"quantityNumber": 2.5,
"measurementUnit": "unit:litre"
},
"createdOn": "2022-02-03T14:48:54.709Z",
"lastModifiedOn": "2022-02-03T14:48:54.709Z"
}
],
"businessPartner": "BPNL50096894aNXY",
"createdOn": "2022-02-03T14:48:54.709Z",
"lastModifiedOn": "2022-02-03T14:48:54.709Z"
}
]
}
"catenaXId" : "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d",
"parentItems" : [ {
"catenaXId" : "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d",
"isOnlyPotentialParent" : false,
"quantity" : {
"value" : 20.0,
"unit" : "unit:piece"
},
"createdOn" : "2022-02-03T14:48:54.709Z",
"businessPartner" : "BPNL50096894aNXY",
"lastModifiedOn" : "2022-02-03T14:48:54.709Z"
} ],
"customers" : [ "BPNL50096894aNXY" ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private static <T> BiFunction<T, Throwable, Boolean> completingOnFirstSuccessful

return (value, throwable) -> {

log.debug("value: '{}', throwable: {}", value, throwable);
log.trace("value: '{}', throwable: {}", value, throwable);

final boolean notFinishedByOtherFuture = !overallFuture.isDone();
log.debug("notFinishedByOtherFuture {} ", notFinishedByOtherFuture);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"relationships": [
{
"catenaXId": "urn:uuid:6d505432-8b31-4966-9514-4b753372683f",
"catenaXId": "urn:uuid:8724338c-5c85-4c34-91eb-e2735d58fb0d",
"linkedItem": {
"quantity": {
"quantityNumber": 2.5,
"quantityNumber": 20.0,
"measurementUnit": {
"datatypeURI": null,
"lexicalValue": "unit:litre"
"lexicalValue": "unit:piece"
}
},
"lifecycleContext": "asBuilt",
"assembledOn": "2022-02-03T14:48:54.709Z",
"lastModifiedOn": "2022-02-03T14:48:54.709Z",
"childCatenaXId": "urn:uuid:4db3b19e-1152-4e4e-8b4b-63c2f4fccc5c",
"childCatenaXId": "urn:uuid:e7777066-e453-4431-beb3-4e99d042f923",
"hasAlternatives": false
},
"aspectType": "SingleLevelUsageAsBuilt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
{
"submodels": [
{
"identification": "urn:uuid:e336fdab-1c22-4968-ba91-a5b011ed0e9b",
"aspectType": "urn:bamm:io.catenax.just_in_sequence_part:1.0.0#JustInSequencePart",
"payload": {
"localIdentifiers": [
{
"value": "59144578DSQ",
"key": "jisNumber"
}
],
"manufacturingInformation": {
"date": "2022-02-04T14:48:54",
"country": "HUR"
},
"catenaXId": "urn:uuid:805daf66-3f24-4fa8-9b00-f940fb0b3f19",
"partTypeInformation": {
"manufacturerPartId": "123-0.740-3434-A",
"customerPartId": "PRT-12345",
"classification": "product",
"nameAtManufacturer": "Door Key",
"nameAtCustomer": "Door Key"
}
"submodels": [
{
"identification": "urn:uuid:52d1ed27-2729-4ff8-bb3f-d10ff0dcaf76",
"aspectType": "urn:samm:io.catenax.just_in_sequence_part:3.0.0#JustInSequencePart",
"contractAgreementId": "NGFkNjljZjctNzRhYy00MzYzLWJkNGUtZjBjYjc5MTFhNDY2:dXJuOnV1aWQ6MTU5MGU0ZDgtNjRiOS00NDUyLThjZGYtZjgyMjFmNGNlNzEz:OTU4MjFhY2QtNmQxMS00MjQ3LTkxZWEtZDk3ODAwMzRkMzIw",
"payload": {
"localIdentifiers": [
{
"value": "82227044FBE",
"key": "jisNumber"
}
],
"manufacturingInformation": {
"date": "2022-02-04T14:48:54",
"country": "HUR",
"sites": [
{
"catenaXsiteId": "BPNS00000000BJTL",
"function": "production"
}
]
},
"catenaXId": "urn:uuid:c6d2d642-a055-4ddf-87e3-1a3b02c689e3",
"partTypeInformation": {
"manufacturerPartId": "123-0.740-3434-A",
"customerPartId": "PRT-12345",
"partClassification": [
{
"classificationDescription": "Standard data element types with associated classification scheme for electric components.",
"classificationStandard": "IEC",
"classificationID": "61360- 2:2012 "
}
],
"nameAtManufacturer": "Mirror left",
"nameAtCustomer": "side element A"
}
]
}
}
]
}
Loading

0 comments on commit 0927804

Please sign in to comment.