-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Backup Monitoring Enabled #338
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
fix: Backup Monitoring Enabled #338
Conversation
…ring settings Previously, backup workflows unconditionally attempted to ping Peekaping heartbeat monitors even when monitoring was disabled globally or per-resource. This could cause workflow failures when monitoring URLs were not configured. Changes: - Update backup.go to pass MonitoringEnabled flag to template - Add conditional checks in backup.yaml.tmpl: - Resource backups (postgres/s3/sqlite): Check both global and per-resource monitoring - Codebase backup: Check global monitoring flag only The Peekaping ping steps now only execute when monitoring is appropriately enabled.
Added three new test cases to verify conditional Peekaping ping behaviour: - Global monitoring disabled: No ping URLs should appear - Per-resource monitoring disabled: Only affected resource ping URLs excluded - Mixed monitoring states: Verifies selective ping URL inclusion These tests ensure the conditional logic in backup.yaml.tmpl works correctly when monitoring is disabled at different levels.
This comment has been minimized.
This comment has been minimized.
Updated all existing test cases to explicitly set monitoring flags: - Added Monitoring: true on all resource definitions - Called applyDefaults() on appDef.Monitoring to ensure global monitoring is enabled This ensures the tests properly validate the conditional Peekaping ping behavior introduced in the previous commits.
This comment has been minimized.
This comment has been minimized.
The applyDefaults() method on Monitoring is unexported and cannot be called from tests. Since Monitoring.IsEnabled() already returns true by default when Enabled is nil, these calls were unnecessary. The tests work correctly without them as the default behavior is already correct.
This comment has been minimized.
This comment has been minimized.
Review summary
Excellent implementation that properly respects both global and per-resource monitoring configuration. The PR correctly implements conditional monitoring for backup workflows with comprehensive test coverage. Critical issues 🔴None Warnings 🟡None Suggestions 🟢Test coverage for codebase backup monitoringThe new tests thoroughly verify per-resource monitoring behaviour (global disabled, per-resource disabled, mixed scenarios), which is excellent. Consider whether an explicit test case for codebase backup monitoring in isolation would add value, though the existing tests do verify it indirectly through the Implementation analysisWhat changed:
Why it works:
This allows fine-grained control: disable all monitoring globally, or selectively disable specific resource monitors while keeping others active. Test quality:
Unrelated changes: Code quality: Production-ready with excellent test coverage and clean implementation following project patterns. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #338 +/- ##
==========================================
+ Coverage 64.59% 69.39% +4.79%
==========================================
Files 154 184 +30
Lines 6064 7253 +1189
==========================================
+ Hits 3917 5033 +1116
+ Misses 2064 2023 -41
- Partials 83 197 +114 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.