mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-05-08 17:08:36 +01:00
6806c1d58ac5505688174ee78893d9ee3a0017be
* Fix Docker exec exit code handling by using detach=False When executing commands inside containers using `container_run_inside()`, the exec metadata did not contain a valid exit code because `detach=True` starts the exec in the background and returns immediately before completion. Root cause: With `detach=True`, Docker's exec start() returns an awaitable that yields output bytes. However, the await only waits for the HTTP/REST call to complete, NOT for the actual exec command to finish. The command continues running in the background after the HTTP response is received. Calling `inspect()` immediately after returns `ExitCode: None` because the exec hasn't completed yet. Solution: Use `detach=False` which returns a Stream object that: - Automatically waits for exec completion by reading from the stream - Provides actual command output (not just empty bytes) - Makes exit code immediately available after stream closes - No polling needed Changes: - Switch from `detach=True` to `detach=False` in container_run_inside() - Read output from stream using async context manager - Add defensive validation to ensure ExitCode is never None - Update tests to mock the Stream interface using AsyncMock - Add debug log showing exit code after command execution Fixes #6518 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Address review feedback --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Home Assistant Supervisor
First private cloud solution for home automation
Home Assistant (former Hass.io) is a container-based system for managing your Home Assistant Core installation and related applications. The system is controlled via Home Assistant which communicates with the Supervisor. The Supervisor provides an API to manage the installation. This includes changing network settings or installing and updating software.
Installation
Installation instructions can be found at https://home-assistant.io/getting-started.
Development
For small changes and bugfixes you can just follow this, but for significant changes open a RFC first. Development instructions can be found here.
Release
Releases are done in 3 stages (channels) with this structure:
- Pull requests are merged to the
mainbranch. - A new build is pushed to the
devstage. - Releases are published.
- A new build is pushed to the
betastage. - The
stable.jsonfile is updated. - The build that was pushed to
betawill now be pushed tostable.
Description
Languages
Python
95.6%
JavaScript
4.3%
