-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/533 enable handling of tombstones in be #994
Feature/533 enable handling of tombstones in be #994
Conversation
# Conflicts: # tx-backend/openapi/traceability-foss-backend.json # tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java
Integration Test Results322 tests 322 ✅ 1m 10s ⏱️ Results for commit 0dcb40c. ♻️ This comment has been updated with latest results. |
Unit Test Results218 tests 218 ✅ 20s ⏱️ Results for commit 0dcb40c. ♻️ This comment has been updated with latest results. |
...clipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltViewEntity.java
Fixed
Show fixed
Hide fixed
...se/tractusx/traceability/integration/assets/infrastructure/base/IrsCallbackControllerIT.java
Fixed
Show fixed
Hide fixed
...se/tractusx/traceability/integration/assets/infrastructure/base/IrsCallbackControllerIT.java
Fixed
Show fixed
Hide fixed
@@ -0,0 +1,4 @@ | |||
ALTER TABLE assets_as_planned | |||
ADD COLUMN "tombstone" varchar NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to limit the varchar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be difficult since there is a whole JSON Object stored to that column. Because that value comes From IRS, we can trust the input.
Also from the docs: "use the VARCHAR(n) only when you want PostgreSQL to check the length." https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-char-varchar-text/
Do we really want to check the length and throw an error if it's too long?
|
...kend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java
Outdated
Show resolved
Hide resolved
...e/tractusx/traceability/assets/infrastructure/base/irs/model/response/JobDetailResponse.java
Outdated
Show resolved
Hide resolved
...e/tractusx/traceability/assets/infrastructure/base/irs/model/response/JobDetailResponse.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, please fix comments.
...kend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java
Outdated
Show resolved
Hide resolved
@@ -123,6 +123,7 @@ void saveOrUpdateAssets(AssetCallbackRepository repository, AssetBase asset) { | |||
if (!asset.getParentRelations().isEmpty()) { | |||
existingAsset.setParentRelations(asset.getParentRelations()); | |||
} | |||
existingAsset.setTombstone(asset.getTombstone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not check everything so far. What happens if asset does not exist with the tombstone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing asset in that case would come from the import file via data ingestion process. If there is no tombstone present, the publishing to the network was successful and the tombstone value would be null
...org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/mapper/TombstoneMapper.java
Outdated
Show resolved
Hide resolved
...se/tractusx/traceability/integration/assets/infrastructure/base/IrsCallbackControllerIT.java
Outdated
Show resolved
Hide resolved
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md # tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsServiceTest.java # tx-backend/src/test/resources/stubs/irs/get/jobs/id/response_200.json # tx-backend/src/test/resources/stubs/irs/get/jobs/id/response_200_downward_asPlanned.json # tx-models/src/main/java/assets/response/base/response/AssetBaseResponse.java # tx-models/src/main/java/assets/response/base/response/SemanticDataModelResponse.java
…ombstones-in-be' into feature/533-enable-handling-of-tombstones-in-be
|
|
resolves eclipse-tractusx#533