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

chore(contracts):1105 provided tables for all types of contracts to save th… #1191

Merged
merged 47 commits into from
Jul 18, 2024

Conversation

ds-mwesener
Copy link
Contributor

@ds-mwesener ds-mwesener commented Jul 9, 2024

…em accordingly.

Description

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

resolves #1105

Copy link
Contributor

github-actions bot commented Jul 9, 2024

✅ No Dependency Check findings were found

Copy link
Contributor

github-actions bot commented Jul 9, 2024

Integration Test Results

347 tests   346 ✅  1m 52s ⏱️
 41 suites    1 💤
 41 files      0 ❌

Results for commit bc9e917.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jul 9, 2024

Unit Test Results

209 tests   209 ✅  21s ⏱️
 58 suites    0 💤
 58 files      0 ❌

Results for commit bc9e917.

♻️ This comment has been updated with latest results.

@Setter
@NoArgsConstructor
@Entity
@SuperBuilder

Check notice

Code scanning / CodeQL

Use of default toString() Note

Default toString(): AssetAsBuiltViewEntity inherits toString() from Object, and so is not suitable for printing.
Default toString(): AssetAsBuiltEntity inherits toString() from Object, and so is not suitable for printing.
@Setter
@NoArgsConstructor
@Entity
@SuperBuilder

Check notice

Code scanning / CodeQL

Use of default toString() Note

Default toString(): AssetAsPlannedEntity inherits toString() from Object, and so is not suitable for printing.
@ds-mwesener ds-mwesener changed the title chore(irs):1105 provided tables for all types of contracts to save th… chore(contracts):1105 provided tables for all types of contracts to save th… Jul 11, 2024

private final JpaContractAgreementNotificationRepository contractAgreementRepository;

public ContractNotificationRepositoryImpl(EdcContractAgreementService edcContractAgreementService, ObjectMapper objectMapper, EdcContractAgreementService edcContractAgreementService1, JpaContractAgreementNotificationRepository contractAgreementRepository) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'edcContractAgreementService1' is never used.

private final JpaContractAgreementViewRepository contractAgreementRepository;

public ContractViewRepositoryImpl(EdcContractAgreementService edcContractAgreementService, ObjectMapper objectMapper, EdcContractAgreementService edcContractAgreementService1, JpaContractAgreementViewRepository contractAgreementRepository, ObjectMapper objectMapper1) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'edcContractAgreementService1' is never used.

private final JpaContractAgreementViewRepository contractAgreementRepository;

public ContractViewRepositoryImpl(EdcContractAgreementService edcContractAgreementService, ObjectMapper objectMapper, EdcContractAgreementService edcContractAgreementService1, JpaContractAgreementViewRepository contractAgreementRepository, ObjectMapper objectMapper1) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'objectMapper1' is never used.
repository.save(asset);
} catch (DataIntegrityViolationException ex) {
//retry save in case of ERROR: duplicate key value violates unique constraint "asset_pkey"
log.info("Asset with id {} already exists in the database. The record will be updated instead.", asset.getId());
enrichAssetBaseByContractAgreements(repository, asset);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this cause the contract to be added twice to the assets? Or is it handled via contract agreement id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of an exception there will be a rollback correct? Therefore I assumed that this will not be duplicated.

@@ -0,0 +1,28 @@
package org.eclipse.tractusx.traceability.contracts.domain.service;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License header

@@ -0,0 +1,28 @@
package org.eclipse.tractusx.traceability.contracts.domain.service;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license header

@@ -0,0 +1,28 @@
package org.eclipse.tractusx.traceability.contracts.domain.service;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license header

@@ -0,0 +1,31 @@
package org.eclipse.tractusx.traceability.contracts.domain.service;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license header

@@ -1,2 +1,33 @@
-- Drop the view if it exists
DROP VIEW IF EXISTS contract_agreement_view;
CREATE VIEW contract_agreement_full AS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a license header here?

ds-mwesener and others added 6 commits July 18, 2024 14:35
…rsistent

# Conflicts:
#	tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationStartupConfig.java
…tracts/infrastructure/repository/ContractAgreementAsBuiltSpecification.java

Co-authored-by: Lucas Capellino <137265091+ds-lcapellino@users.noreply.github.com>
Co-authored-by: Lucas Capellino <137265091+ds-lcapellino@users.noreply.github.com>
Copy link

sonarcloud bot commented Jul 18, 2024

Quality Gate Passed Quality Gate passed for 'eclipse-tractusx_traceability-foss-frontend'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jul 18, 2024

Quality Gate Failed Quality Gate failed for 'Trace-X Root'

Failed conditions
66.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link
Contributor

@ds-lcapellino ds-lcapellino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ds-mwesener ds-mwesener merged commit c1b5528 into main Jul 18, 2024
25 of 26 checks passed
@ds-mwesener ds-mwesener deleted the feature/1105-contractagreement-persistent branch July 18, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Rework of Post-Sync Extraction and Database Storage of contractAgreementIds
2 participants