ROX-27772: SBOM fix scan time update edge case#14089
Conversation
|
Skipping CI for Draft Pull Request. |
|
Images are ready for the commit at a3eb2ba. To use with deploy scripts, first |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14089 +/- ##
=======================================
Coverage 48.92% 48.92%
=======================================
Files 2500 2500
Lines 180852 180880 +28
=======================================
+ Hits 88474 88496 +22
- Misses 85357 85361 +4
- Partials 7021 7023 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fbbbe2b to
47d4f37
Compare
47d4f37 to
85c0015
Compare
RTann
left a comment
There was a problem hiding this comment.
minor nits and a question. Should be good to go after another round
|
@dcaravel: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
BradLugo
left a comment
There was a problem hiding this comment.
LGTM. Thanks for adding that 400 status code.
Description
If SBOM generation results in a successful image scan ensures that the image scan is saved to Central DB.
Also ensures that the HTTP error code when generating an SBOM is derived from the error and not always
500(for example, if the image name is empty the error should be400due toerrox.InvalidArgsbeing wrapped here)User-facing documentation
Testing and quality
Automated testing
How I validated my change
Unit tests + manual test.
Image Name missing 400
Before Fix:
Notice HTTP
500is returnedAfter Fix:
Scan Time Update
In between each of the tests, ran the following to remove the index report from scanner v4 db (the digest is that of
nginx:1.27at the time of writing this). This is necessary to setup the test condition where Central DB has a Scanner V4 scan but Scanner V4 has no index report.Before Fix:
Scan time did not change unless using the
-fflag.After Fix:
Start
Sanity check, generate SBOM and observe no new scan executed:
Now delete index report using query above, and re-try: