Skip to content

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

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

WIP: Add resource-based alert rules with evaluation engine, event bus integration, and UI#13478
Damans227 wants to merge 12 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

- 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

@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 30.48469% with 545 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.91%. Comparing base (21e4475) to head (b95d42f).

Files with missing lines Patch % Lines
...dstack/resourcealert/ResourceAlertManagerImpl.java 48.16% 101 Missing and 26 partials ⚠️
...dstack/resourcealert/ResourceAlertServiceImpl.java 31.64% 94 Missing and 14 partials ⚠️
...ck/resourcealert/dao/ResourceAlertRuleDaoImpl.java 0.00% 59 Missing ⚠️
...dstack/resourcealert/dao/ResourceAlertDaoImpl.java 0.00% 44 Missing ⚠️
...esourcealert/dao/ResourceAlertRuleJoinDaoImpl.java 0.00% 35 Missing ⚠️
.../api/command/admin/CreateResourceAlertRuleCmd.java 0.00% 27 Missing ⚠️
...tack/resourcealert/vo/ResourceAlertRuleJoinVO.java 0.00% 25 Missing ⚠️
.../api/command/admin/UpdateResourceAlertRuleCmd.java 0.00% 23 Missing ⚠️
...oudstack/resourcealert/vo/ResourceAlertRuleVO.java 58.33% 19 Missing and 1 partial ⚠️
.../api/command/admin/DeleteResourceAlertRuleCmd.java 0.00% 16 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13478      +/-   ##
============================================
+ Coverage     18.89%   18.91%   +0.01%     
- Complexity    18240    18309      +69     
============================================
  Files          6179     6202      +23     
  Lines        555527   556363     +836     
  Branches      67807    67946     +139     
============================================
+ Hits         104968   105225     +257     
- Misses       439028   439559     +531     
- Partials      11531    11579      +48     
Flag Coverage Δ
uitests 3.51% <ø> (-0.01%) ⬇️
unittests 20.12% <30.48%> (+0.01%) ⬆️

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

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.

2 participants