Return early when no finding maps are built
What does this MR do and why?
This fixes #435853 (closed) by optimizing the vulnerability creation process of CVS. Instead of raising an error and tracking the error in Sentry, we exit early from the service's #execute method. The previous error was noisy and unactionable, which ultimately detracted from actionable and valid errors. We already track individual errors related to build issues, so we will still be able to track edge cases encountered during the finding build stage.
Fixes #435853 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
I tested this out by adding a rspec test that simulates an empty
finding map creation. Since the spec passes in a []
array for the
affected components, the #map
method produces []
for the
finding_maps
result (the scenario we occasionally see in Sentry).