Add issue and repair for NTP sync failure#165463
Conversation
|
Hey there @home-assistant/supervisor, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
Keeping in draft until client library with home-assistant-libs/python-supervisor-client#282 is released for the new constants used in tests. |
|
Can be made ready for merge after this is merged: |
Notify user about NTP sync failures and create repair for issue/suggestion added in home-assistant/supervisor#6625.
351ac66 to
6365a0f
Compare
There was a problem hiding this comment.
Pull request overview
Adds a repair flow for NTP sync failure issues reported by the Supervisor, notifying users when NTP time servers are unreachable and the system clock was corrected.
Changes:
- Added NTP sync failed issue key to the set of known supervisor issues
- Added user-facing strings for the NTP repair flow (title, description, abort message)
- Added tests for the NTP repair flow (success, error, and issue creation paths)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| homeassistant/components/hassio/issues.py | Registers issue_system_ntp_sync_failed as a known issue key |
| homeassistant/components/hassio/strings.json | Adds repair flow strings (title, step description, abort message) |
| tests/components/hassio/test_repairs.py | Tests for NTP repair flow success and error paths |
| tests/components/hassio/test_issues.py | Test for NTP sync failed issue creation via supervisor event |
You can also share your feedback on Copilot code review. Take the survey.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Co-authored-by: Stefan Agner <stefan@agner.ch>
Co-authored-by: Stefan Agner <stefan@agner.ch>
There was a problem hiding this comment.
Pull request overview
Adds Home Assistant (Hass.io/Supervisor) Repairs support for the Supervisor’s ntp_sync_failed issue so users are notified and can apply the enable_ntp suggestion via a guided fix flow.
Changes:
- Register
issue_system_ntp_sync_failedas a Supervisor issue that should create a Repairs entry. - Add user-facing translations for the new issue and its fix-flow step (
system_enable_ntp). - Add tests covering issue creation/listing and the successful/failed repair flow behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
homeassistant/components/hassio/issues.py |
Adds the NTP sync failure issue key to the set of Supervisor issues that should surface as Repairs. |
homeassistant/components/hassio/strings.json |
Adds title + fix-flow text (step + abort reason) for the new issue key. |
tests/components/hassio/test_issues.py |
Verifies the Supervisor event produces a fixable Repairs issue for ntp_sync_failed. |
tests/components/hassio/test_repairs.py |
Verifies the repair flow applies the enable_ntp suggestion and handles apply failures via abort. |
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Adds Home Assistant-side handling for a new Supervisor resolution issue (ntp_sync_failed) by surfacing it as a Repairs issue and providing a corresponding fix flow translation, plus tests to validate both the issue creation and repair flow behavior.
Changes:
- Register
issue_system_ntp_sync_failedas a Supervisor issue that should create a Repairs entry. - Add user-facing Repair flow translations (step + abort reason) for re-enabling NTP.
- Add tests covering issue creation via Supervisor events and the fix-flow success/error paths.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
homeassistant/components/hassio/issues.py |
Includes the new NTP sync failure issue key in the set of Supervisor issues that are exposed as Repairs. |
homeassistant/components/hassio/strings.json |
Adds translations for the new issue title and its fix flow step/abort messaging. |
tests/components/hassio/test_issues.py |
Verifies the ntp_sync_failed Supervisor event results in a fixable Repairs issue. |
tests/components/hassio/test_repairs.py |
Verifies the NTP repair flow step id, success completion, and abort-on-failure behavior. |
You can also share your feedback on Copilot code review. Take the survey.
|
Test failures are unrelated. |
Proposed change
Notify user about NTP sync failures and create repair for issue/suggestion added in home-assistant/supervisor#6625.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: