ROX-33934: remove component risk pruning#19717
Open
dashrews78 wants to merge 3 commits intomasterfrom
Open
Conversation
Component risks are no longer written to the risk datastore (since ROX-31321), so the pruning code that searched for orphaned image component risks was doing costly queries against a large table for records that can no longer exist. Remove the pruning function, its imageComponentsV2 datastore dependency, and dead component ranker entries from the risk datastore. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
Contributor
|
Images are ready for the commit at 9cd45a6. To use with deploy scripts, first |
The ranker entries for IMAGE_COMPONENT and NODE_COMPONENT are kept to avoid a panic in getRanker() if these types are ever passed to UpsertRisk or RemoveRisk. Removing them is out of scope for this change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19717 +/- ##
=======================================
Coverage 49.67% 49.67%
=======================================
Files 2748 2748
Lines 207354 207336 -18
=======================================
- Hits 102998 102991 -7
+ Misses 96701 96690 -11
Partials 7655 7655
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Since #17422 stopped writing component risks to the risk datastore, existing IMAGE_COMPONENT and NODE_COMPONENT records in the risks table are stale. Thus pruning was pointless and expensive. So this removes the source of costly orphaned risk searches observed in ROX-33637.
Partially generated by AI.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
Unit test is sufficient here.