-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve efficiency of repository and integrity meta analysis #846
base: main
Are you sure you want to change the base?
Conversation
0e6a977
to
c210703
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Trying to figure out how we can still populate the Ideally we wouldn't change any rows if their content didn't meaningfully change, but if we don't do it we can't keep |
bf70534
to
ad50308
Compare
a3631ca
to
2224e95
Compare
671ca7b
to
5835e57
Compare
* Removes "preparation" logic of `IntegrityMetaComponent` records in `BomUploadProcessingTask`. Preparing records one-by-one is too resource-intensive, but doing it in batches has a too high potential for deadlocks since the table is written to by many threads in parallel. * Refactors `RepositoryMetaResultProcessor` to consume records in batches. Since incoming records are keyed by PURL coordinates, we can safely perform batch operations in the database without the risk of running into deadlocks. Signed-off-by: nscuro <[email protected]> # Conflicts: # src/main/resources/migration/changelog-v5.6.0.xml
5835e57
to
acc711d
Compare
Description
Improves efficiency of repository and integrity meta analysis.
IntegrityMetaComponent
records inBomUploadProcessingTask
. Preparing records one-by-one is too resource-intensive, but doing it in batches has a too high potential for deadlocks since the table is written to by many threads in parallel.RepositoryMetaResultProcessor
to consume records in batches. Since incoming records are keyed by PURL coordinates, we can safely perform batch operations in the database without the risk of running into deadlocks.Warning
This is a breaking change:
/api/v1/component/integritymetadata
is removed/api/v1/component/integritycheckstatus
is removedThe removed endpoints are not used by the frontend. Integrity data is already part of the
/api/v1/component
response, making dedicated endpoints not a requirement right now.Addressed Issue
Closes DependencyTrack/hyades#1306
Additional Details
Hyades PR: DependencyTrack/hyades#1446
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR introduces changes to the database model, and I have updated the migration changelog accordinglyThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly