Reject Core Backup if sending backup start WebSocket message fails#6272
Reject Core Backup if sending backup start WebSocket message fails#6272
Conversation
If sending the WebSocket message to Home Assistant Core to inform it about the start of a backup fails, we should reject the backup process entirely. This prevents taking a backup without Home Assistant Core being aware of it. As a side effect, this likely prevents situation where Core does not learn about the backup progress since we also won't be able to send WebSocket messages about Job progress updates.
|
In cases where Core API does not respond (e.g. after an update or restart) we still allow to take a backup. It seems that in such cases we won't be able to inform the Core about backup starting via WebSocket either ( A downside will be that on such systems we won't take a backup. From Sentry it seems there are quite some system where the Core API does not respond properly ( Ideally we'd find the root cause of why Core API does not respond, so the WebSocket messages get delivered again. /cc @emontnemery |
|
This is superseded by #6553: Now if |
Proposed change
If sending the WebSocket message to Home Assistant Core to inform it about the start of a backup fails, we should reject the backup process entirely. This prevents taking a backup without Home Assistant Core being aware of it.
As a side effect, this likely prevents situation where Core does not learn about the backup progress since we also won't be able to send WebSocket messages about Job progress updates.
Type of change
Additional information
Checklist
ruff format supervisor tests)If API endpoints or add-on configuration are added/changed: