Repository navigation
fix(notifications): include destination and policy in backup run alerts - #866
Merged
Hydralerne merged 1 commit intoSep 15, 2026
Conversation
Member
|
Incorporated this PR into Backup alerts include policy and destination references even when lookups fail. GitHub now records this contributor PR as merged into the integration branch. The integrated changes are tested and awaiting merge to main. Validation:
|
Hydralerne
changed the base branch from
main
to
feat/bugfix-integration-2026-09-15
September 15, 2026 18:25
Hydralerne
merged commit Sep 15, 2026
98bbf60
into
oblien:feat/bugfix-integration-2026-09-15
3 checks passed
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
Includes destination and policy references in backup failure and success notifications, and renders project and service names when available, ensuring operators receive complete context when a backup job finishes or errors out.
Motivation
The notification category description for
backup.failedinapps/api/src/lib/notification-categories.ts:138states:Because this category description is printed at the top of the alert body, delivered notification emails explicitly announce that destination and policy are included, but then omit them:
backup.orchestrator.tsonly passeddestinationNameanderrorMessageon failure (omittingpolicyName,policyId,projectName,serviceName).renderMessageinapps/api/src/lib/notification-workers.tsdid not check or renderdestinationNameorpolicyName.backup.orchestrator.ts, failure notification emission was gated on destination lookup succeeding viapolicy?.destinationId. If the policy or destination lookup failed,notification.emitwas skipped entirely instead of usingrun.organizationId, silently dropping the failure alert.Related issue
Closes #865
Changes
apps/api:backup.orchestrator.ts:policy?.destinationId ?? run.destinationIdand providedestinationName,policyName,policyId,projectName, andserviceName.run.organizationIdso notification dispatch is never dropped if policy or destination resolution throws.policyNameandpolicyIdin the payload.notification-workers.ts:renderMessage, formatProject:,Service:,Policy:, andDestination:lines when present in the payload.apps/api/test:notification-headline.test.ts: Add unit tests verifyingrenderMessageformats policy, destination, project, and service names for both failure and success alerts.Verification
Ran all notification and backup test suites:
Checklist
bun run test,bun run --cwd <workspace> lint, andbun formatall pass locally