Skip to content

WIP: Add resource-based alert rules with evaluation engine, event bus integration, and UI - #13478

Draft
Damans227 wants to merge 39 commits into
apache:mainfrom
Damans227:resource-alerts
Draft

Damans227 wants to merge 39 commits into
apache:mainfrom
Damans227:resource-alerts

Conversation

@Damans227

Copy link
Copy Markdown
Collaborator

Description

This PR...

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?

@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 18352

@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.35801% with 733 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.94%. Comparing base (602d9ec) to head (ab4d7f3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...dstack/resourcealert/ResourceAlertManagerImpl.java 50.26% 128 Missing and 60 partials ⚠️
...dstack/resourcealert/ResourceAlertServiceImpl.java 48.34% 141 Missing and 31 partials ⚠️
...ck/resourcealert/dao/ResourceAlertRuleDaoImpl.java 0.00% 67 Missing ⚠️
...dstack/resourcealert/dao/ResourceAlertDaoImpl.java 0.00% 53 Missing ⚠️
...t/api/command/user/CreateResourceAlertRuleCmd.java 0.00% 28 Missing ⚠️
...tack/resourcealert/vo/ResourceAlertRuleJoinVO.java 0.00% 28 Missing ⚠️
...t/api/command/user/UpdateResourceAlertRuleCmd.java 0.00% 25 Missing ⚠️
...urcealert/dao/ResourceAlertRuleWebhookDaoImpl.java 0.00% 22 Missing ⚠️
...che/cloudstack/mom/webhook/WebhookServiceImpl.java 70.83% 21 Missing ⚠️
...oudstack/resourcealert/vo/ResourceAlertRuleVO.java 58.33% 19 Missing and 1 partial ⚠️
... and 11 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13478      +/-   ##
============================================
+ Coverage     19.91%   19.94%   +0.03%     
- Complexity    20200    20340     +140     
============================================
  Files          6373     6398      +25     
  Lines        577230   578514    +1284     
  Branches      70696    70921     +225     
============================================
+ Hits         114974   115404     +430     
- Misses       449690   450451     +761     
- Partials      12566    12659      +93     
Flag Coverage Δ
uitests 3.70% <ø> (-0.01%) ⬇️
unittests 21.22% <40.35%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@blueorangutan

Copy link
Copy Markdown

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

@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache weizhouapache added this to the 4.24.0 milestone Jun 29, 2026
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland DaanHoogland moved this from Backlog to conflict/waiting for author in CloudStack Testing Aug 31, 2026
- Introduced ResourceAlertResponse and ResourceAlertRuleResponse classes for API responses.
- Created ResourceAlertDao and ResourceAlertDaoImpl for handling resource alert data.
- Implemented ResourceAlertRuleDao and ResourceAlertRuleDaoImpl for managing alert rules.
- Added ResourceAlertRuleJoinDao and ResourceAlertRuleJoinDaoImpl for joining alert rules with additional data.
- Defined ResourceAlertVO and ResourceAlertRuleVO for representing alert and rule entities.
- Configured Spring context for resource alerts in spring-resource-alerts-context.xml.
- Added module properties for resource alerts in module.properties.
… and enhance unit tests for email notifications
@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-17031)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-17032)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-17033)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-38)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-39)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-41)

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: conflict/waiting

Development

Successfully merging this pull request may close these issues.

4 participants