Skip to content

Rewrite of email alert about VR health checks - #14403

Open
erikbocks wants to merge 1 commit into
apache:mainfrom
scclouds:rewrite-vr-alerts
Open

erikbocks wants to merge 1 commit into
apache:mainfrom
scclouds:rewrite-vr-alerts

Conversation

@erikbocks

Copy link
Copy Markdown
Collaborator

Description

When one or more VR health checks fail and alert notifications are configured in the environment, an email that does not include details about which tests failed is sent. The message has been rewritten to display which health checks have failed.

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

Screenshots (if appropriate):

Alert received image

How Has This Been Tested?

Build the packages and installed them. Then, I created a new Isolated network and deploy a VM on it. The VR was accessed by console and the openssh-server package was purged. After that, I requested for fresh checks. As it could not access the VR via SSH, all the tests failed and an email was sent informing about the failure to access the Instance (image attached to the Screenshots section)

Copilot AI balanced review requested due to automatic review settings October 14, 2026 16:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.33333% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.21%. Comparing base (602d9ec) to head (6838f62).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...ork/router/VirtualNetworkApplianceManagerImpl.java 8.69% 21 Missing ⚠️
...ud/network/dao/RouterHealthCheckResultDaoImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14403      +/-   ##
============================================
+ Coverage     19.91%   20.21%   +0.29%     
- Complexity    20200    20749     +549     
============================================
  Files          6373     6426      +53     
  Lines        577230   580191    +2961     
  Branches      70696    71034     +338     
============================================
+ Hits         114974   117291    +2317     
- Misses       449690   450186     +496     
- Partials      12566    12714     +148     
Flag Coverage Δ
uitests 3.69% <ø> (-0.03%) ⬇️
unittests 21.51% <8.33%> (+0.32%) ⬆️

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.

ArrayList<String> failedChecks = new ArrayList<>();
for (String failedCheckName : failingChecks) {
RouterHealthCheckResultVO routerHealthCheckResultVO = routerHealthCheckResultDao.getRouterHealthCheckResult(router.getId(), failedCheckName, null);
String failedCheckDetails = routerHealthCheckResultVO.getParsedCheckDetails();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what happens if there is no saved result for a failing check? looks like it crashes here and the router recreate and the other routers get skipped

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants