Cancelled task (ON_ERROR_CANCEL hook) is displayed as failed task
For backups on a laptop, I'm using a CONDITION_SNAPSHOT_START hook with ping -c 1 to check if the SFTP host is reachable and cancel the backup otherwise. This cancels the job (as intended) but results to an inconsistent error signalling in the UI.
To Reproduce
- Create command hook that exits non-zero (e.g. /bin/false): CONDITION_SNAPSHOT_START and ON_ERROR_CANCEL
- Backup now.
Expected behavior The task should show up as cancelled in the entire web UI.
This works as expected in the list view. In the tree view and side pane, however, it shows up as error/exclamation mark. This seemingly wrong state can be fixed by clicking on 'Clear error history', which flips the state of this task switches from error to cancelled.
Platform Info
- Linux amd64
- Backrest Version 1.7.2@b885f1ec9e43e4bfe8f4f6f02bda83f5e7d88574
Thanks for the report on this, I believe this should be fixed in the latest version of backrest.