Skip to content

ROX-27490: Handle failed clusters#15231

Merged
lvalerom merged 5 commits intomasterfrom
lvm/rox-27490-handle-failed-clusters
May 28, 2025
Merged

ROX-27490: Handle failed clusters#15231
lvalerom merged 5 commits intomasterfrom
lvm/rox-27490-handle-failed-clusters

Conversation

@lvalerom
Copy link
Contributor

@lvalerom lvalerom commented May 8, 2025

Description

This PR sets the Report Snapshot Status to Partial Error if there're some of the clusters associated with a Scan Schedule (Scan Configuration) failed.

Notice:

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 tests
  • Manual testing:
    • Deploy in two clusters with Compliance Operator
    • Create a Scan Schedule with both cluster
    • Make one of the scans fail mid scan (e.g. disconnect sensor from central)
    • Query centraldb and observe the status is set to PARTIAL ERROR

@openshift-ci
Copy link

openshift-ci bot commented May 8, 2025

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

@lvalerom lvalerom changed the base branch from master to lvm/rox-27490-handle-failed-clusters-in-results-validation May 8, 2025 07:08
@rhacs-bot
Copy link
Contributor

rhacs-bot commented May 8, 2025

Images are ready for the commit at e193da7.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.8.x-811-ge193da7eee.

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 86.76471% with 9 lines in your changes missing coverage. Please review.

Project coverage is 49.25%. Comparing base (c4d0830) to head (e193da7).
Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
...tor/v2/report/manager/generator/report_gen_impl.go 80.00% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15231      +/-   ##
==========================================
+ Coverage   49.24%   49.25%   +0.01%     
==========================================
  Files        2578     2578              
  Lines      189155   189308     +153     
==========================================
+ Hits        93147    93245      +98     
- Misses      88676    88723      +47     
- Partials     7332     7340       +8     
Flag Coverage Δ
go-unit-tests 49.25% <86.76%> (+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.

@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters-in-results-validation branch from 5e2be20 to 92c0ad5 Compare May 8, 2025 10:58
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters branch 3 times, most recently from 52127f9 to de38c1c Compare May 8, 2025 12:18
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters-in-results-validation branch from 92c0ad5 to f491ed5 Compare May 9, 2025 10:49
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters-in-results-validation branch from f491ed5 to 13315f8 Compare May 16, 2025 16:56
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters branch from de38c1c to 5a7115d Compare May 19, 2025 10:04
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters-in-results-validation branch from 3a42aaa to 37069e5 Compare May 19, 2025 10:05
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters branch 2 times, most recently from 7ecb259 to 3b1318e Compare May 22, 2025 13:42
@lvalerom lvalerom marked this pull request as ready for review May 26, 2025 15:23
Base automatically changed from lvm/rox-27490-handle-failed-clusters-in-results-validation to master May 26, 2025 16:15
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters branch from 3b1318e to 438ccf3 Compare May 26, 2025 16:42
@lvalerom lvalerom requested review from mtodor and vikin91 May 27, 2025 13:02
@lvalerom
Copy link
Contributor Author

/retest

Copy link
Contributor

@vikin91 vikin91 left a comment

Choose a reason for hiding this comment

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

The change itself is small, but the amount of context required to understand where those changes fit is huge. It was not easy to review, so I left comments as I went - mainly to make it a bit clearer to understand in the future.

I am unable to find any blockers, but I am also not fluent enough in this code to x-ray every potential problem. Having said that, I am giving it a "solid shmaybe" that maps to ✅ 😉

Maybe @mtodor can spot something?

@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters branch from 93f0562 to 91af2e4 Compare May 27, 2025 16:05
@lvalerom lvalerom force-pushed the lvm/rox-27490-handle-failed-clusters branch from 91af2e4 to 9253ce9 Compare May 27, 2025 16:07
@lvalerom lvalerom merged commit 37eeeb6 into master May 28, 2025
91 checks passed
@lvalerom lvalerom deleted the lvm/rox-27490-handle-failed-clusters branch May 28, 2025 13:59
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.

4 participants