Skip to content

alert: fix type ID for alerts #11350

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

Open
wants to merge 1 commit into
base: 4.19
Choose a base branch
from

Conversation

shwstppr
Copy link
Contributor

Description

Alert types ALERT.VM.SNAPSHOT, ALERT.VR.PUBLIC.IFACE.MTU and ALERT.VR.PRIVATE.IFACE.MTU are all having type value 32.

TBD: will this cause any sort of issue?

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

ALERT.VM.SNAPSHOT, ALERT.VR.PUBLIC.IFACE.MTU and
ALERT.VR.PRIVATE.IFACE.MTU are all having type value 32.

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr shwstppr marked this pull request as draft July 30, 2025 12:25
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.17%. Comparing base (ca6d2dc) to head (21a7973).
⚠️ Report is 6 commits behind head on 4.19.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #11350   +/-   ##
=========================================
  Coverage     15.17%   15.17%           
  Complexity    11362    11362           
=========================================
  Files          5415     5415           
  Lines        476030   476050   +20     
  Branches      58115    58119    +4     
=========================================
+ Hits          72246    72249    +3     
- Misses       395701   395717   +16     
- Partials       8083     8084    +1     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.90% <100.00%> (-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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shwstppr shwstppr marked this pull request as ready for review July 31, 2025 15:06
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr 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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14494

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13999)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 45122 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11350-t13999-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Comment on lines +74 to +75
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true);
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)34, "ALERT.VR.PRIVATE.IFACE.MTU", true);
Copy link
Contributor

Choose a reason for hiding this comment

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

like Capacity.CAPACITY_TYPE_MEMORY all these numbers should be mnenomic. I think. an enum is in order, but a growable Set could be used as well, to make it more dynamic. btw I don’t think the Alert types should be gotten from external entities to this component (like Capacity) but external components should at best be allowed to register types, or else use type provided by the AlertService . I hope this makes sense.

Also all this said, this is not a rejection of this change, just some remarks on the design quality/techdebt we are looking at.

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