ROX-33934: add migration to delete stale component risk records#19718
Open
dashrews78 wants to merge 2 commits intomasterfrom
Open
ROX-33934: add migration to delete stale component risk records#19718dashrews78 wants to merge 2 commits intomasterfrom
dashrews78 wants to merge 2 commits intomasterfrom
Conversation
Since ROX-31321 stopped writing component risks to the risk datastore, existing IMAGE_COMPONENT and NODE_COMPONENT records in the risks table are stale. This migration deletes them to reduce table size and remove the source of costly orphaned risk searches observed in ROX-33637. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
Use a local copy of the risks schema instead of referencing the live one, so future schema changes cannot break this migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Images are ready for the commit at 4b729e7. To use with deploy scripts, first |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19718 +/- ##
=======================================
Coverage 49.67% 49.67%
=======================================
Files 2748 2750 +2
Lines 207354 207364 +10
=======================================
+ Hits 102998 103016 +18
+ Misses 96701 96696 -5
+ Partials 7655 7652 -3
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:
|
migrator/migrations/m_222_to_m_223_remove_component_risk_records/migration_impl.go
Show resolved
Hide resolved
charmik-redhat
approved these changes
Apr 1, 2026
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. This migration deletes them to reduce table size and remove 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
change me!