-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor create duplicate alert check #10544
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
base: 4.19
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10544 +/- ##
=========================================
Coverage 15.16% 15.17%
- Complexity 11336 11337 +1
=========================================
Files 5414 5414
Lines 475126 475130 +4
Branches 57976 57975 -1
=========================================
+ Hits 72069 72087 +18
+ Misses 394996 394981 -15
- Partials 8061 8062 +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:
|
@blueorangutan package |
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 12738 |
d303c45
to
0d92d30
Compare
@blueorangutan package |
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12752 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-12679)
|
0d92d30
to
4a1fbe6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup looks good. Some comments added
@blueorangutan package |
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13272 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
[SF] Trillian test result (tid-13220)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the duplicate alert check logic in AlertManagerImpl by extracting the conditional alert retrieval into a helper method.
- Introduces a new static list of alert types designated as trivial.
- Extracts duplicate alert check logic into the getAlertForTrivialAlertType helper method.
Comments suppressed due to low confidence (2)
server/src/main/java/com/cloud/alert/AlertManagerImpl.java:89
- [nitpick] Consider renaming the ALERTS constant to TRIVIAL_ALERT_TYPES to more clearly indicate that these alert types bypass duplicate alert checks.
public static final List<AlertType> ALERTS = Arrays.asList(AlertType.ALERT_TYPE_HOST, ...
server/src/main/java/com/cloud/alert/AlertManagerImpl.java:782
- [nitpick] The method name getAlertForTrivialAlertType can be misleading since it returns a non-null alert only for non-trivial alert types; consider renaming it to better reflect its behavior, such as getExistingAlertForNonTrivialType.
@Nullable private AlertVO getAlertForTrivialAlertType(AlertType alertType, long dataCenterId, Long podId, Long clusterId) {
don’t think they are related but still investigating those two failures:
|
Description
This PR extracts a method for deciding which alert are allowed to be double.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?
see #10367