Skip to content

feat: alert System Managers of backup and restore failures in the desk and by email - #18

Merged
tulayha merged 2 commits into
developfrom
feat/bell-failure-alerts
Oct 7, 2026
Merged

tulayha merged 2 commits into
developfrom
feat/bell-failure-alerts

Conversation

@tulayha

@tulayha tulayha commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What

  • A failed backup, deployment backup or restore now raises a desk notification (the bell) for every enabled System Manager, linked to the backup run where there is one.
  • Alert emails now go to the System Managers instead of a hand-typed list. The Notification Recipients field is removed; Email on Success stays and applies to the same people.

Why

Alerts only reached the addresses typed into a free-text field. With that field empty, or with outgoing email not working, a failure was visible only in Error Log and on the Backup Control page.

Behaviour changes to know about

  • Addresses previously typed into Notification Recipients stop receiving email. Anyone who should be alerted needs a user with the System Manager role.
  • Sites that had the field empty start emailing their System Managers on failure.
  • Administrator gets the bell but no email, as its address is a placeholder on most sites. Frappe's own role lookups skip Administrator, so the System Managers are read from Has Role directly.

Notes

  • The desk notification uses the Alert type, which Frappe never emails, so nobody gets a second email.
  • Successful runs never raise a desk notification.
  • A failure in one channel is logged and does not block the other or change the recorded outcome of the run.
  • Uptime Kuma heartbeats are unchanged.

Testing

Unit tests added for both channels (CI). The bell was checked by hand on a local v16 bench: a simulated failure showed up in Administrator's notification panel.

@tulayha tulayha changed the title feat: show backup and restore failures in every System Manager's notification bell feat: alert System Managers of backup and restore failures in the desk and by email Oct 7, 2026
@tulayha
tulayha merged commit a27eef1 into develop Oct 7, 2026
6 checks passed
@tulayha
tulayha deleted the feat/bell-failure-alerts branch October 7, 2026 13:42
tulayha added a commit that referenced this pull request Oct 7, 2026
Stacked on #18; GitHub retargets this to `develop` once that merges.

## What

- **Backup Settings** (the settings form already linked in the sidebar)
is now the only place to edit settings. It gets the day-pill schedule
editor and the off-site storage status that only the dialog had.
- The **Settings** button on Backup Control opens that page; the
settings dialog and its `save_settings` endpoint are removed.
- Backup Control reloads when you return to it, so the "Scheduled
backups" card reflects what was just saved.

## Why

Settings could be edited in two places that behaved differently: the
dialog had the good schedule editor, the form had a raw table with
comma-separated weekdays. The dialog also kept its own copy of the
settings, which went out of sync when it was reopened.

## Notes

- The schedule is still stored in the `backup_schedule` child table, now
hidden; the editor reads and writes its rows, so saving, validation and
change tracking are the form's own.
- The schedule editor is always shown. The dialog hid it while
scheduling was disabled and silently kept the previous schedule on save.
- Times loaded from the database (`9:00:00`) are padded before they go
into the time input, which otherwise showed them empty.
- "Remote Retention (Days)" is relabelled "Off-site Retention (Days)" to
match the rest of the screen.
- `get_configuration` reports only whether each deployment variable is
set, never its value, and is System Manager only.

## Testing

Tests updated for the form, saving and the new endpoint (CI). Checked by
hand on a local v16 bench in light and dark theme: toggling days, adding
and removing rows, changing a time, saving, the client-side validation
message, the storage status, and Backup Control picking up the saved
state on return. Not checked on v15 in a browser.
@tulayha

tulayha commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant