Skip to content

ROX-33934: remove component risk pruning#19717

Open
dashrews78 wants to merge 3 commits intomasterfrom
dashrews/remove-component-risk-pruning-33934
Open

ROX-33934: remove component risk pruning#19717
dashrews78 wants to merge 3 commits intomasterfrom
dashrews/remove-component-risk-pruning-33934

Conversation

@dashrews78
Copy link
Copy Markdown
Contributor

@dashrews78 dashrews78 commented Mar 31, 2026

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

  • 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

Unit test is sufficient here.

dashrews78 and others added 2 commits March 31, 2026 15:41
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>
@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

@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Mar 31, 2026

Images are ready for the commit at 9cd45a6.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-509-g9cd45a6ccb.

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>
@dashrews78 dashrews78 marked this pull request as ready for review March 31, 2026 20:30
@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 (9cd45a6).
⚠️ Report is 4 commits behind head on master.

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           
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants