Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue-1088] alerts for missing disks #1102

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Conversation

katarzyna-kulpa
Copy link
Collaborator

Purpose

Resolves ##1088

Sending DriveSuccessfullyRemoved alert for successfully removed missing disks

PR checklist

  • Add link to the issue
  • Choose Project
  • Choose PR label
  • New unit tests added
  • Modified code has meaningful comments
  • All TODOs are linked with the issues
  • All comments are resolved

Testing

Whole regression tests

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.81%. Comparing base (efdaa75) to head (1c008d9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1102      +/-   ##
==========================================
+ Coverage   72.79%   72.81%   +0.02%     
==========================================
  Files          63       63              
  Lines        8953     8961       +8     
==========================================
+ Hits         6517     6525       +8     
  Misses       2148     2148              
  Partials      288      288              
Flag Coverage Δ
unittests 72.81% <100.00%> (+0.02%) ⬆️

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.

@Kacper-Michon-DELL Kacper-Michon-DELL self-requested a review March 1, 2024 09:58
@@ -1110,6 +1110,12 @@ func (m *VolumeManager) createEventsForDriveUpdates(updates *driveUpdates) {
m.createEventForDriveStatusChange(
updDrive.CurrentState, updDrive.PreviousState.Spec.Status, updDrive.CurrentState.Spec.Status)
}
if updDrive.CurrentState.Spec.Status == apiV1.DriveStatusOffline {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible that we get two same events the one generated in line 1111 and this new one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For normal flow is should not be possible, however to to be 100% safe I've changed the code to handle this situation. Thank you!

@katarzyna-kulpa katarzyna-kulpa merged commit a1af520 into master Mar 4, 2024
5 of 6 checks passed
@katarzyna-kulpa katarzyna-kulpa deleted the bugfix-issue-1088 branch March 4, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants