Skip to content
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

Merged
merged 26 commits into from
Feb 21, 2024

Conversation

ds-lcapellino
Copy link

@ds-lcapellino ds-lcapellino commented Feb 19, 2024

@ds-lcapellino ds-lcapellino requested a review from a team February 19, 2024 14:13
# Conflicts:
#	tx-backend/openapi/traceability-foss-backend.json
#	tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java
Copy link

github-actions bot commented Feb 19, 2024

Integration Test Results

322 tests   322 ✅  1m 10s ⏱️
 37 suites    0 💤
 37 files      0 ❌

Results for commit 0dcb40c.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 19, 2024

Unit Test Results

218 tests   218 ✅  20s ⏱️
 55 suites    0 💤
 55 files      0 ❌

Results for commit 0dcb40c.

♻️ This comment has been updated with latest results.

@@ -0,0 +1,4 @@
ALTER TABLE assets_as_planned
ADD COLUMN "tombstone" varchar NULL;

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?

Copy link
Author

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?

Copy link

github-actions bot commented Feb 19, 2024

‼️ Dependency Check findings ‼️

One or more high/critical findings have been found during dependency check. Please check the depenency report:
https://github.com/catenax-ng/tx-traceability-foss/actions/runs/7991747105

Copy link

@ds-mwesener ds-mwesener left a 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.

@ds-lcapellino ds-lcapellino marked this pull request as ready for review February 21, 2024 08:11
@@ -123,6 +123,7 @@ void saveOrUpdateAssets(AssetCallbackRepository repository, AssetBase asset) {
if (!asset.getParentRelations().isEmpty()) {
existingAsset.setParentRelations(asset.getParentRelations());
}
existingAsset.setTombstone(asset.getTombstone());

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.

Copy link
Author

@ds-lcapellino ds-lcapellino Feb 21, 2024

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

ds-lcapellino and others added 9 commits February 21, 2024 10:59
# 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
Copy link

sonarcloud bot commented Feb 21, 2024

Copy link

sonarcloud bot commented Feb 21, 2024

Quality Gate Passed Quality Gate passed for 'TX Traceability FOSS frontend'

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ds-mwesener ds-mwesener merged commit f88614f into main Feb 21, 2024
21 of 22 checks passed
@ds-mwesener ds-mwesener deleted the feature/533-enable-handling-of-tombstones-in-be branch February 21, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants