feat: implement anonymized planned production output#1099
Conversation
|
@ReneSchroederLJ |
...org/eclipse/tractusx/puris/backend/production/controller/ProductionRequestApiController.java
Fixed
Show fixed
Hide fixed
...org/eclipse/tractusx/puris/backend/production/controller/ProductionRequestApiController.java
Dismissed
Show dismissed
Hide dismissed
...org/eclipse/tractusx/puris/backend/production/controller/ProductionRequestApiController.java
Dismissed
Show dismissed
Hide dismissed
.../production/logic/dto/anonymizedplannedproductionsamm/PlannedProductionOutputAnonymized.java
Dismissed
Show dismissed
Hide dismissed
| databaseChangeLog: | ||
| - changeSet: | ||
| id: "1" | ||
| author: ReneSchroederLJ |
There was a problem hiding this comment.
Please update with your own GitHub user as author
| } | ||
|
|
||
| @Test | ||
| void ownProductionToSamm_materialFlag_usesMprService() { |
There was a problem hiding this comment.
This test doesn't really make sense to me. ownProductionToSamm does not use the mprService
ReneSchroederLJ
left a comment
There was a problem hiding this comment.
The functionality itself works. Please change the target branch to feat/anonymized-data-exchange and rebase.
Also make sure the Unit tests are successful.
73b7522 to
3655b6e
Compare
ReneSchroederLJ
left a comment
There was a problem hiding this comment.
I found some more small issues. Please fix.
Also please resolve conflicts and add the missing openAPI changes
| return ResponseEntity.ok(samm); | ||
| } | ||
|
|
||
| @Operation(summary = "This endpoint receives the Planned Production Submodel 2.0.0 requests. " + |
There was a problem hiding this comment.
| @Operation(summary = "This endpoint receives the Planned Production Submodel 2.0.0 requests. " + | |
| @Operation(summary = "This endpoint receives the Anonymized Planned Production Submodel 1.0.0 requests. " + |
| - changeSet: | ||
| id: "1" | ||
| author: ReneSchroederLJ | ||
| author: jakoballgaier |
There was a problem hiding this comment.
revert changed author please
| assertNotNull(pos.getAllocatedPlannedProductionOutputs()); | ||
| assertEquals(1, pos.getAllocatedPlannedProductionOutputs().size()); | ||
| AllocatedPlannedProductionOutput p = pos.getAllocatedPlannedProductionOutputs().iterator().next(); | ||
| assertEquals("BPNS123456789012", p.getProductionSiteBpns()); |
There was a problem hiding this comment.
what about assertions for the other properties of production?
| assertNotNull(samm); | ||
| assertTrue(samm.getMaterialGlobalAssetIdAnonymized().startsWith("enc:")); | ||
| assertNotNull(samm.getAllocatedPlannedProductionOutputs()); | ||
| assertEquals(1, samm.getAllocatedPlannedProductionOutputs().size()); |
There was a problem hiding this comment.
Same as above. The test should make sure that all properties of production are set properly.
CHANGELOG.md
Outdated
| - Added update flow to Material Details View buttons ([#1034](https://github.com/eclipse-tractusx/puris/pull/1034)) | ||
| - Added submodel implementation for delivery information anyonymized ([#1095](https://github.com/eclipse-tractusx/puris/pull/1095)) | ||
| - Added submodel implementation for item stock anyonymized ([#1096](https://github.com/eclipse-tractusx/puris/pull/1096)) | ||
| - Added submodel implementation for planned production output anyonymized ([#1099](https://github.com/eclipse-tractusx/puris/pull/1099)) |
There was a problem hiding this comment.
| - Added submodel implementation for planned production output anyonymized ([#1099](https://github.com/eclipse-tractusx/puris/pull/1099)) | |
| - Added submodel implementation for planned production output anonymized ([#1099](https://github.com/eclipse-tractusx/puris/pull/1099)) |
fix all 3 instances please
ReneSchroederLJ
left a comment
There was a problem hiding this comment.
Works well just missed a small possible log injection.
| @PathVariable String materialNumberCx, | ||
| @PathVariable String representation | ||
| ) { | ||
| log.info("Received request for Anonymized Planned Production with materialNumberCx: {} and representation: {} from bpnl: {}", materialNumberCx, representation, bpnl); |
There was a problem hiding this comment.
Please remove this log as it happens before any pattern matching is done and presents actual risk for log injection. My bad for missing this previously.
f81e5eb
into
eclipse-tractusx:feat/anonymized-data-exchange
Description
resolves #1079
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review:
changelog.md) with PR reference and brief summary.frontend/package.json,frontend/package-lock.json)backend/pom.xml)scripts/generate_openapi_yaml.pywith running customer backend)