Skip to content

ROX-31321: do not write component score to risk#17422

Merged
dashrews78 merged 3 commits intomasterfrom
dashrews/explore-component-risk-31321
Nov 13, 2025
Merged

ROX-31321: do not write component score to risk#17422
dashrews78 merged 3 commits intomasterfrom
dashrews/explore-component-risk-31321

Conversation

@dashrews78
Copy link
Copy Markdown
Contributor

@dashrews78 dashrews78 commented Oct 21, 2025

Description

We calculate the component risk and store it in the risk table. There are many components so this is fairly expensive. However, we never access those items in the risk store (we literally only pull components out of risk to prune them). So there is no reason to store them. That is just unnecessary overhead on the database and on central.

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

CI testing, unit testing, clicking about the UI.

@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Oct 21, 2025

Images are ready for the commit at d4306ca.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.10.x-313-gd4306cabfd.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.01%. Comparing base (65d5a43) to head (d4306ca).
⚠️ Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #17422      +/-   ##
==========================================
- Coverage   49.01%   49.01%   -0.01%     
==========================================
  Files        2729     2729              
  Lines      201599   201579      -20     
==========================================
- Hits        98821    98806      -15     
+ Misses      95045    95036       -9     
- Partials     7733     7737       +4     
Flag Coverage Δ
go-unit-tests 49.01% <ø> (-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.

@dashrews78 dashrews78 changed the title [WIP] ROX-31321: explore component risk ROX-31321: explore component risk Oct 31, 2025
@dashrews78 dashrews78 force-pushed the dashrews/explore-component-risk-31321 branch from 62e4131 to 44e5669 Compare October 31, 2025 13:50
@dashrews78
Copy link
Copy Markdown
Contributor Author

/retest

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Since component risk entries will no longer be inserted, update or remove any pruning logic that scans or relies on those records to avoid needless database scans.
  • Add a one-time migration or cleanup job to purge existing image/node component risk records so the risk table state stays consistent after this change.
  • Now that oldScore retrieval and its FlattenCVEData branches are unused, you can simplify the manager by removing that dead code.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since component risk entries will no longer be inserted, update or remove any pruning logic that scans or relies on those records to avoid needless database scans.
- Add a one-time migration or cleanup job to purge existing image/node component risk records so the risk table state stays consistent after this change.
- Now that oldScore retrieval and its FlattenCVEData branches are unused, you can simplify the manager by removing that dead code.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dashrews78 dashrews78 force-pushed the dashrews/explore-component-risk-31321 branch from 44e5669 to 3a57781 Compare November 6, 2025 11:46
@dashrews78 dashrews78 force-pushed the dashrews/explore-component-risk-31321 branch from 3a57781 to d4306ca Compare November 11, 2025 18:49
@dashrews78 dashrews78 changed the title ROX-31321: explore component risk ROX-31321: do not write component score to risk Nov 12, 2025
@dashrews78 dashrews78 merged commit 5c2a958 into master Nov 13, 2025
91 checks passed
@dashrews78 dashrews78 deleted the dashrews/explore-component-risk-31321 branch November 13, 2025 17:34
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.

3 participants