ROX-28348: Cleanup results on scan config update#15333
Conversation
|
Skipping CI for Draft Pull Request. |
|
Images are ready for the commit at 4e0f089. To use with deploy scripts, first |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15333 +/- ##
==========================================
+ Coverage 49.21% 49.25% +0.03%
==========================================
Files 2577 2578 +1
Lines 189093 189248 +155
==========================================
+ Hits 93061 93212 +151
- Misses 88693 88696 +3
- Partials 7339 7340 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9c1cf46 to
b5d45a4
Compare
There was a problem hiding this comment.
Hey @mtodor - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
lvalerom
left a comment
There was a problem hiding this comment.
Overall it looks good. I haven't looked at the tests yet because I had a suggestion regarding how to delete the checkResults associated with the profiles.
Also, do you know why the checkResults do not get removed automatically by sensor but the scans seem to be removed? My understanding is that sensor should send remove events for both resources but apparently something is not working in the checkResult pipeline (or maybe it's like that by design). I still think we should delete them in central in case there is a problem with sensor.
central/complianceoperator/v2/compliancemanager/manager_impl.go
Outdated
Show resolved
Hide resolved
b5d45a4 to
dafdc36
Compare
dafdc36 to
4e0f089
Compare
Description
This PR is adding cleanup of scan results when scan config (schedule) is changed and clusters or profiles are removed from that schedule.
Additional changes:
User-facing documentation
Testing and quality
Automated testing
How I validated my change