lemonsaurus / blackbox

Magically save your database backups and critical logs in your favorite cloud storage provider.
MIT License
49 stars 10 forks source link

Blackbox does not exit with status code 1 when a database has failed #156

Open jb3 opened 5 months ago

jb3 commented 5 months ago

Tangentially related to #155, we cannot detect when a database has failed to backup at all right now because the failure notifications are not sent and blackbox does not exit with a non-zero code when a database backup fails.

Reading the code, from how I understand it Blackbox will error if a storage synchronization fails, but will not error if the actual database dump stage fails.

Again, for PyDis this is the exit status of the backup job today:

    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Thu, 02 May 2024 17:17:56 +0100
      Finished:     Thu, 02 May 2024 17:18:26 +0100

However these are the logs, again failing due to #154:

blackbox-1235626330217779380-4wz7x blackbox 16:18:26 Backup failed, sending notification.
lemonsaurus commented 5 months ago

This one just seems like a straight up bug. Of course it should have a failure state if it fails to back it up.

Labeling help wanted, anyone is free to take this.