Skip to content

ROX-33934: add migration to delete stale component risk records#19718

Open
dashrews78 wants to merge 2 commits intomasterfrom
dashrews/remove-component-risk-migration-33934
Open

ROX-33934: add migration to delete stale component risk records#19718
dashrews78 wants to merge 2 commits intomasterfrom
dashrews/remove-component-risk-migration-33934

Conversation

@dashrews78
Copy link
Copy Markdown
Contributor

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

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

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>
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 31, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

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>
@dashrews78 dashrews78 marked this pull request as ready for review March 31, 2026 20:34
@dashrews78 dashrews78 requested a review from a team as a code owner March 31, 2026 20:34
@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Mar 31, 2026

Images are ready for the commit at 4b729e7.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-508-g4b729e7d14.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.67%. Comparing base (c4abfa7) to head (4b729e7).
⚠️ Report is 13 commits behind head on master.

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     
Flag Coverage Δ
go-unit-tests 49.67% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants