Skip to content

feat(backups): Daily Raven digest of sites whose backups keep failing - #7577

Open
regdocs wants to merge 1 commit into
developfrom
feat/raven-alert-all-backups-failed
Open

regdocs wants to merge 1 commit into
developfrom
feat/raven-alert-all-backups-failed

Conversation

@regdocs

@regdocs regdocs commented Sep 25, 2026

Copy link
Copy Markdown
Member

Adds a daily Raven alert, posted to the server alerts channel, listing every site that hit the daily failed backup limit in the last 24h.

This is the same limit (max_failed_backup_attempts_in_a_day, default 6) that already emails the team. Right now only the customer finds out when a site's backups keep failing. With this, we see it too, in one message a day instead of one per site.

Message

Sites With All Backup Attempts Failed - 2

Sites with 6 or more failed backups in the last 24h

Site Server Plan Team Email Failed Backups Last Successful Backup
site-a.example.com f1-example $25/mo owner-a@example.com 9 2026-09-20 03:10
site-b.example.com f2-example Dedicated owner-b@example.com 6 Never
  • Each site name links to that site's failed backups in desk.
  • Rows are sorted by number of failures, most first.
  • At most 50 sites are shown, and anything beyond that goes into a "... N more sites" row.
  • If no site hit the limit, no message is sent.

Changes

  • server_monitoring.py: adds alert_on_sites_with_all_backup_attempts_failed(), which runs on the daily scheduler.
  • site_backup.py: moves the limit lookup into get_max_failed_backup_attempts(), so the email check and the digest share it.
  • Adds tests in test_server_monitoring.py.

🤖 Generated with Claude Code

Once a day, post one table to the server alerts channel listing every site
that hit the daily failed backup limit in the last 24h. It uses the same
limit that triggers the "backup attempts failed" email to the team.

Each row has the site (linked to its failed backups), server, plan
(dedicated or monthly price), team email, failure count and last
successful backup.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds daily alert for sites with repeated backup failures.

The PR appears safe to merge; the missing overflow test is non-blocking.

Reviews (1) · Last reviewed commit: "feat(backups): Daily Raven digest of sit..."

Comment thread press/press/doctype/server/test_server_monitoring.py
@codecov-commenter

codecov-commenter commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.38554% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.04%. Comparing base (079059d) to head (dce25a7).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
press/press/doctype/server/server_monitoring.py 93.54% 2 Missing ⚠️
press/press/doctype/site_backup/site_backup.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #7577       +/-   ##
============================================
- Coverage    86.75%   63.04%   -23.71%     
============================================
  Files          157     1082      +925     
  Lines        29602   105450    +75848     
  Branches      1976     1977        +1     
============================================
+ Hits         25681    66485    +40804     
- Misses        3864    38908    +35044     
  Partials        57       57               
Flag Coverage Δ
dashboard 86.76% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mergify

mergify Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants