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.
| }, | ||
| "step": { | ||
| "system_enable_ntp": { | ||
| "description": "NTP time servers were unreachable and the system clock was found to be more than 1 hour off. The time has been corrected and the NTP service was temporarily disabled to allow this adjustment.\n\nCheck the **Host logs** to investigate why NTP servers could not be reached. Once resolved, select **Submit** to re-enable the NTP service." |
There was a problem hiding this comment.
.. time servers were unreachable .. The time has been corrected
This seems contradicting, immediately begs the question how time sync has been made then :)
How about something more elaborate:
| "description": "NTP time servers were unreachable and the system clock was found to be more than 1 hour off. The time has been corrected and the NTP service was temporarily disabled to allow this adjustment.\n\nCheck the **Host logs** to investigate why NTP servers could not be reached. Once resolved, select **Submit** to re-enable the NTP service." | |
| "description": "The device could not contact its configured time servers (NTP). Using a secondary online time check, we detected that the system clock was more than 1 hour incorrect. The time has been corrected and the NTP service was temporarily disabled so the correction could be applied. To keep the system time accurate, we recommend fixing the issue preventing access to the NTP servers.\n\nCheck the **Host logs** to investigate why NTP servers could not be reached. Once resolved, select **Submit** to re-enable the NTP service." |
There was a problem hiding this comment.
Could we maybe display the time servers? 🤔 I think not, but maybe we could wire this up relatively quickly?
| } | ||
| } | ||
| }, | ||
| "title": "NTP sync failed - system time was corrected" |
There was a problem hiding this comment.
| "title": "NTP sync failed - system time was corrected" | |
| "title": "Time synchronization issue detected" |
Or maybe
| "title": "NTP sync failed - system time was corrected" | |
| "title": "Time synchronization issue detected - system time was corrected" |
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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: