Fix: Add missing volumeBackup field to 5 notification providers on creation#4109
Open
mahdirajaee wants to merge 1 commit intoDokploy:canaryfrom
Open
Fix: Add missing volumeBackup field to 5 notification providers on creation#4109mahdirajaee wants to merge 1 commit intoDokploy:canaryfrom
mahdirajaee wants to merge 1 commit intoDokploy:canaryfrom
Conversation
…tfy, Custom, Lark, and Mattermost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #4084
Several notification creation functions in
packages/server/src/services/notification.tswere missing thevolumeBackupfield in their.values()insert, causing volume backup notification preferences to be silently discarded (defaulting tofalse) when creating notifications for these providers.Affected functions
createCustomNotification— missingvolumeBackupin insertcreateLarkNotification— missingvolumeBackupin insertcreateMattermostNotification— missingvolumeBackupin insertupdateMattermostNotification— missingvolumeBackupin update setRoot cause
When these notification providers were added, the
volumeBackupfield was not included in the notification insert/update values, even though their corresponding update functions (for Custom and Lark) and other providers (Slack, Telegram, Discord, Email, Resend, Pushover, Teams) all correctly include it.Fix
Added
volumeBackup: input.volumeBackupafterdatabaseBackup: input.databaseBackupin each affected function, matching the pattern used by all other notification providers.Context
The Dosu bot confirmed this inconsistency in the issue discussion, also referencing the related user report in #3768 where custom webhook notifications were not working for volume backups.
Greptile Summary
This PR fixes a silent data-loss bug where the
volumeBackuppreference was being discarded (silently defaulting tofalse) when creating or updating notifications for the Custom, Lark, and Mattermost providers. The fix addsvolumeBackup: input.volumeBackupto the four affected functions, matching the pattern already used by all other providers (Slack, Telegram, Discord, Email, Resend, Gotify, Ntfy, Pushover, Teams). After the change, all 24 insert/update operations innotification.tsare consistent.createCustomNotification—volumeBackupnow persisted on creationcreateLarkNotification—volumeBackupnow persisted on creationcreateMattermostNotification—volumeBackupnow persisted on creationupdateMattermostNotification—volumeBackupnow persisted on updateConfidence Score: 5/5
Safe to merge — the change is a straightforward, targeted bug fix with no new logic introduced.
All 24 insert/update operations now consistently include
volumeBackup. The fix is minimal, directly mirrors the pattern already established by the other providers, and verified to be complete via a full field-count audit. No regressions or side-effects are expected.No files require special attention.
Important Files Changed
volumeBackup: input.volumeBackupfield to four functions —createCustomNotification,createLarkNotification,createMattermostNotification, andupdateMattermostNotification— bringing them into parity with all other notification providers.Reviews (1): Last reviewed commit: "Fix missing volumeBackup field in notifi..." | Re-trigger Greptile
(2/5) Greptile learns from your feedback when you react with thumbs up/down!