Compare commits

...

3 Commits

Author SHA1 Message Date
Jan Čermák
be20f73b01 Flatten published Docker image
This flattens the Docker image from 9 layers to 5 by using multi-stage
build that squashes layers into logical blocks. The first layer on top
of the base image adds system-wide packages and uv (which is not updated
so often - if it were, it may be wise to move it into the next or
separate layer; it weights roughly 50 MB) which should be preserved
between releases, while the next layer adds all Supervisor Python code
and dependencies.

This means that unless the base image or packages installed in the first
stage are changed (or in other words, only Supervisor code is changed),
only a single layer is pulled from the repository. Previously, it
generally resulted in pull of all the following 4 layers, as just a
change in the requirements invalidated the following layers. The fetched
payload size remains roughly the same.
2026-05-05 17:27:52 +02:00
Stefan Agner
b871e1ca61 Lower severity of WebSocket delivery failure messages to debug (#6805)
The fire-and-forget _async_send_command path was raised from DEBUG to
WARNING in #6725 for better visibility. In practice it's noisy during
normal Core lifecycle events (restart, update): Supervisor fires
supervisor_job_start/supervisor_job_end events towards Core while the
container is intentionally not running, and each event logs a warning.
The DEBUG line from the API layer just above ("Core container is not
running") already explains the cause, so the WARNING just restates it.

Synchronous async_send_command callers still see raised exceptions, so
genuine failures that callers care about are not hidden. Restores the
original DEBUG level introduced together with the raise-on-failure
behavior in #6553.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 17:08:14 +02:00
Jan Čermák
2920194f16 Update Python to 3.14.4/base image to 3.14-alpine3.22-2026.04.0 (#6810)
Update to the latest base image:
* https://github.com/home-assistant/docker-base/releases/tag/2026.04.0

This also brings Python to 3.14.4, so update it in CI.
2026-05-05 17:05:58 +02:00
4 changed files with 24 additions and 9 deletions

View File

@@ -33,7 +33,7 @@ on:
- setup.py
env:
DEFAULT_PYTHON: "3.14.3"
DEFAULT_PYTHON: "3.14.4"
COSIGN_VERSION: "v2.5.3"
BUILD_NAME: supervisor
BUILD_TYPE: supervisor

View File

@@ -8,7 +8,7 @@ on:
pull_request: ~
env:
DEFAULT_PYTHON: "3.14.3"
DEFAULT_PYTHON: "3.14.4"
PRE_COMMIT_CACHE: ~/.cache/pre-commit
MYPY_CACHE_VERSION: 1

View File

@@ -1,5 +1,5 @@
ARG BUILD_FROM=ghcr.io/home-assistant/base-python:3.14-alpine3.22-2026.03.1
FROM ${BUILD_FROM}
ARG BUILD_FROM=ghcr.io/home-assistant/base-python:3.14-alpine3.22-2026.04.0
FROM ${BUILD_FROM} AS supervisor-base
ENV \
S6_SERVICES_GRACETIME=10000 \
@@ -7,8 +7,7 @@ ENV \
CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1 \
UV_SYSTEM_PYTHON=true
# Install base
WORKDIR /usr/src
# Install OS packages used both by build and final image
RUN \
set -x \
&& apk add --no-cache \
@@ -24,6 +23,14 @@ RUN \
\
&& pip3 install uv==0.10.9
#############################################
# Install requirements and build Supervisor #
#############################################
FROM supervisor-base AS supervisor-build
WORKDIR /usr/src
# Install requirements
RUN \
--mount=type=bind,source=./requirements.txt,target=/usr/src/requirements.txt \
@@ -47,10 +54,18 @@ RUN \
&& uv pip install --no-cache -e ./supervisor \
&& python3 -m compileall ./supervisor/supervisor
WORKDIR /
# Copy the rest of rootfs files
COPY rootfs /
#########################
# Final flattened image #
#########################
FROM supervisor-base
# Copy everything from the build stage as a single layer
COPY --from=supervisor-build / /
LABEL \
io.hass.type="supervisor" \
org.opencontainers.image.title="Home Assistant Supervisor" \

View File

@@ -310,7 +310,7 @@ class HomeAssistantWebSocket(CoreSysAttributes):
try:
await self._ensure_connected()
except HomeAssistantWSError as err:
_LOGGER.warning("Can't send WebSocket command: %s", err)
_LOGGER.debug("Can't send WebSocket command: %s", err)
return
# _ensure_connected guarantees self.client is set