Skip to content

Handle NullPointerException when sending email alerts#5649

Merged
yadvr merged 4 commits intoapache:mainfrom
scclouds:handle-npe-when-sending-email
Nov 23, 2021
Merged

Handle NullPointerException when sending email alerts#5649
yadvr merged 4 commits intoapache:mainfrom
scclouds:handle-npe-when-sending-email

Conversation

@joseflauzino
Copy link
Copy Markdown
Contributor

@joseflauzino joseflauzino commented Nov 1, 2021

Description

This PR improves the handling of NullPointerException while ACS is sending email alerts, which can occur due to the recipient list being empty (or null).
I also took the liberty to improve some log messages and added unit test cases that address this part of the code.

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

How Has This Been Tested?

I ran all related unit tests and they all passed successfully.

@shwstppr
Copy link
Copy Markdown
Contributor

shwstppr commented Nov 2, 2021

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✖️ suse15. SL-JID 1656

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1658

Comment thread server/src/main/java/com/cloud/alert/AlertManagerImpl.java
@yadvr yadvr changed the base branch from main to 4.16 November 15, 2021 10:16
@yadvr yadvr added this to the 4.16.1.0 milestone Nov 15, 2021
@joseflauzino joseflauzino changed the base branch from 4.16 to main November 17, 2021 16:38
…le-npe-when-sending-email

Upgrade to 4.17.0.0
@GutoVeronezi GutoVeronezi modified the milestones: 4.16.1.0, 4.17.0.0 Nov 17, 2021
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Nov 18, 2021

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 1725

@joseflauzino
Copy link
Copy Markdown
Contributor Author

I'll check it locally.

@joseflauzino
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@joseflauzino a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1748

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2571)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34632 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5649-t2571-kvm-centos7.zip
Smoke tests completed. 91 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr yadvr merged commit 80cb361 into apache:main Nov 23, 2021
mlsorensen pushed a commit to mlsorensen/cloudstack that referenced this pull request Dec 20, 2021
* Handle NullPointerException when sending email

* Improve the log message related to the recipient list is empty

Co-authored-by: José Flauzino <jose@scclouds.com.br>
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.

8 participants