A dry run walked the failover branches and reached notify(), which had no dry-run gate
This commit is contained in:
@@ -319,6 +319,15 @@ notify() {
|
||||
|
||||
log "$ICON_NOTIFY Sending notification: $subject — $message"
|
||||
|
||||
# A dry run must not page anyone. It reaches this line by walking the same branches a real run
|
||||
# would, so a --dry-run failover was one populated webhook away from alerting the operator at
|
||||
# 4am about an outage nothing was acting on. The line above still records what WOULD have been
|
||||
# sent, which is the part a preview is for.
|
||||
if [[ "${DRY_RUN:-false}" == true ]]; then
|
||||
log "$ICON_NOTIFY DRY RUN — notification not sent"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "${NOTIFY_UNRAID:-false}" == true ]]; then
|
||||
if platform_send_os_notification "$message" "$subject" "$severity"; then
|
||||
log "$ICON_NOTIFY OS notification sent"
|
||||
|
||||
Reference in New Issue
Block a user