Use no timeout for Core lifecycle calls#372
Open
agners wants to merge 1 commit into
Open
Conversation
The restart, stop, start and rebuild calls for Home Assistant Core are long-running lifecycle operations that may be held server-side while queued behind other jobs (e.g. a self-restart queuing behind the start job with GROUP_QUEUE). These inherited DEFAULT_TIMEOUT (total=10s), which could raise a spurious SupervisorTimeoutError even though the operation succeeds. Pass timeout=None for these calls, matching the existing behavior of update(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #372 +/- ##
=======================================
Coverage 99.56% 99.56%
=======================================
Files 34 34
Lines 1387 1387
=======================================
Hits 1381 1381
Misses 6 6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
restart,stop,startandrebuildonHomeAssistantClientare long-running lifecycle operations, but they inheritedDEFAULT_TIMEOUT = ClientTimeout(total=10). This mirrors the fix already in place forupdate(), which passestimeout=None.Especially since home-assistant/supervisor#7018, the restart timeout was probably not very problematic since Core got rejected or restarted immediately anyways. Now that a restart queues behind the start job, the request is held server-side for >10s →
SupervisorTimeoutError, even though the restart itself succeeds. Passingtimeout=Noneremoves the spurious error.check_configis intentionally left on the default timeout — it is not a queued lifecycle operation.Test plan
pytest tests/test_homeassistant.pyruff check/ruff format --check🤖 Generated with Claude Code