Skip to content

Commit

Permalink
Merge pull request #263 from catenax-ng/main
Browse files Browse the repository at this point in the history
fix: TRACEFOSS-XXX handling manufacturerName null situation from IrsJobResponse
  • Loading branch information
ds-mwesener authored Aug 21, 2023
2 parents f9b0af1 + 72cb842 commit 818388e
Show file tree
Hide file tree
Showing 7 changed files with 715 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/e2e-tests-xray_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
node-version: 18.x

- name: Cypress run all tests
uses: cypress-io/github-action@v5.8.3 # use the explicit version number
uses: cypress-io/github-action@v5.8.4 # use the explicit version number
with:
start: npm start
wait-on: "http://localhost:4200"
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
node-version: 18.x

- name: Cypress run all tests
uses: cypress-io/github-action@v5.8.3 # use the explicit version number
uses: cypress-io/github-action@v5.8.4 # use the explicit version number
with:
start: npm start
wait-on: "http://localhost:4200"
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
run: npx playwright install --with-deps webkit

- name: Cypress run all tests
uses: cypress-io/github-action@v5.8.3 # use the explicit version number
uses: cypress-io/github-action@v5.8.4 # use the explicit version number
with:
start: npm start
wait-on: "http://localhost:4200"
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Removed

## [6.0.1-rc2]
### Added
- OAuth2 client credentials rest template interceptor
- Configuration for left and right policies to use registry client library
- TRG Github Action Pipeline for quality checks
- ErrorMessage field to investigation and alerts

### Changed
- Changed digitalTwinRegistryRestTemplate to use token in requests
- Update asBuild test data to 1.5.3 and asPlanned to 1.5.1
- Changed transfer notification logic not to break iteration loop when sending notifications to bpn with more than 1 connector endpoints
- added handling for null manufacturerName in IrsJobResponse, if null is passed it is replaced with "UNKNOWN_MANUFACTURER"

### Removed


## [6.0.0 - 2023-07-21]

### Added
Expand Down
20 changes: 15 additions & 5 deletions docs/src/uml-diagrams/concept/TRACEFOSS-1423/domain-model.puml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@ abstract Asset {

idShort : String
van : String

detailSemanticModels : List<DetailSemanticModel>
}

note left
Rename Descriptions to Relations
Rename Descriptions to Relation
end note


class DetailSemanticModel {
semanticDataModelType : SemanticDataModelType
}
note left
DetailSemanticModel contains detail semantic models
end note


class Relation {
* id : String
idShort : String
Expand Down Expand Up @@ -95,8 +106,7 @@ Asset <|.. PartAsPlanned

Asset }o-- Relation : childRelations
Asset }o-- Relation : parentRelations

AsBuiltAspectModel -- TractionBatteryCode

PartAsPlanned -- PartSiteInformationAsPlanned
Asset }o- DetailSemanticModel : detailSemanticModels
DetailSemanticModel <|.. TractionBatteryCode
DetailSemanticModel <|.. PartSiteInformationAsPlanned
@enduml
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ SPDX-License-Identifier: Apache-2.0
<feign.version>12.3</feign.version>
<jakarta-ws-rs.version>3.1.0</jakarta-ws-rs.version>
<jruby.version>9.4.3.0</jruby.version>
<resilience4j.version>2.0.2</resilience4j.version>
<schedlock.version>4.42.0</schedlock.version>
<resilience4j.version>2.1.0</resilience4j.version>
<schedlock.version>5.5.0</schedlock.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<jetbrains-annotation.version>24.0.1</jetbrains-annotation.version>
<feign-form.version>3.8.0</feign-form.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public record JobDetailResponse(
Map<String, String> bpns
) {

private static final String UNKNOWN_MANUFACTURER_NAME = "UNKNOWN_MANUFACTURER";
private static final String SINGLE_LEVEL_USAGE_AS_BUILT = "SingleLevelUsageAsBuilt";
private static final String SINGLE_LEVEL_BOM_AS_BUILT = "SingleLevelBomAsBuilt";
private static final String SINGLE_LEVEL_BOM_AS_PLANNED = "SingleLevelBomAsPlanned";
Expand All @@ -60,6 +61,10 @@ static JobDetailResponse of(
@JsonProperty("bpns") @JsonSetter(nulls = Nulls.AS_EMPTY) List<Bpn> bpns
) {
Map<String, String> bpnsMap = bpns.stream()
.map(bpn -> new Bpn(
bpn.manufacturerId(),
bpn.manufacturerName() == null ? UNKNOWN_MANUFACTURER_NAME : bpn.manufacturerName()
))
.collect(Collectors.toMap(Bpn::manufacturerId, Bpn::manufacturerName));

//TODO: replace the generic payload (SemanticDataModel.class) with the actual models. This can be achieved by
Expand Down
Loading

0 comments on commit 818388e

Please sign in to comment.