Fix no address bug and send additional cloud18 info to mattermost hook #1127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements and refactors across the codebase, focusing on email notifications, Slack integration, and improved handling of additional fields in alerts. Key changes include the introduction of a new method for sending initialization emails, support for additional fields in Slack messages, and improvements to email recipient handling.
Email Notification Enhancements:
SendClustersInitMail
method inserver_mail.go
to handle initialization emails for clusters, including sponsor-specific emails whenCloud18
is enabled. This centralizes email-sending logic and improves maintainability. [1] [2]cluster_mail.go
to ensure recipients are properly validated and duplicates are avoided. [1] [2]cluster_sec.go
to include theTo
field in alert recipients for password rotation notifications. [1] [2]Slack Integration Enhancements:
AdditionalFields
in Slack configurations, allowing custom fields to be included in Slack messages. This was implemented inslackman.go
and integrated into cluster and replication manager logic. [1] [2] [3]MeetHook
struct inmeethook.go
to includeAdditionalFields
and updated the Slack message generation logic to append these fields dynamically. [1] [2] [3]General Improvements:
alert.go
for email-sending failures, providing more detailed error messages when no recipient address is found.These changes collectively enhance the robustness and flexibility of the system's notification and alerting mechanisms.