-
Notifications
You must be signed in to change notification settings - Fork 107
feat: include schedule name in backup notifications and logs #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: include schedule name in backup notifications and logs #215
Conversation
WalkthroughSchedule names are added to backup log messages and included conditionally in notification bodies; notification body construction was refactored to an array-based pattern with filtering for consistent inclusion of the Schedule line. Changes
Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)**/*.{ts,tsx,js,jsx,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
app/server/modules/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-12-28T17:31:39.157ZApplied to files:
🧬 Code graph analysis (1)app/server/modules/backups/backups.service.ts (3)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enhances backup observability by including the backup schedule name in log messages and notification content. This makes it easier for users and administrators to identify which schedule triggered a backup event across different monitoring channels.
Key Changes:
- Enhanced log messages to include schedule names in backup lifecycle events (start, completion, warnings, and failures)
- Added
scheduleNameto notification payloads and message bodies across all backup event types
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
app/server/modules/backups/backups.service.ts |
Updated logger statements to include schedule names and added scheduleName property to all notification payloads sent during backup operations |
app/server/modules/notifications/notifications.service.ts |
Modified buildNotificationMessage function to conditionally include schedule name in notification bodies for start, success, warning, failure, and default event types |
After thoroughly reviewing the changes, I found no issues with this pull request. The implementation is:
- Consistent: The schedule name is added to all relevant log messages and notification types
- Well-structured: Uses conditional rendering (
context.scheduleName ? ...) to handle optional schedule names - Type-safe: The
scheduleNameproperty is properly typed as optional in the context interface - Following existing patterns: The changes align with the existing code style and structure in both files
The changes successfully achieve the stated goal of improving backup notification and logging context without introducing any bugs or issues.
|
@nicotsx I am working on the backup mirrors support in export and import PRs and realized there are no notifications for them. |
048d0bd to
45187ba
Compare
|
@tvarohohlavy let's discuss it next year :) I have opened an issue #259 to track it. I think we should have this indeed but I'm not sure about the UI yet |
|
@nicotsx I have fixed the code style issues so its probably ready for merge as you have approved it already. Thanks |
This pull request improves the backup notification system by including the backup schedule name in both log messages and user notifications. This enhancement provides clearer context for backup operations, making it easier to identify which schedule triggered a backup in logs and notifications.
Logging and Notification Improvements:
backups.service.tsto include the backup schedule name, providing more detailed context for backup start, completion, warning, and failure events.scheduleNameproperty, ensuring that notifications sent to users specify the relevant backup schedule.Notification Message Formatting:
buildNotificationMessagefunction innotifications.service.tsto add the schedule name to notification bodies for various backup events, improving the clarity of notification content.Related Issues:
Fixes #213
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.