Skip to content

Commit 9097c7e

Browse files
authored
Merge branch 'home-assistant:main' into main
2 parents fa52bfd + 543d6ef commit 9097c7e

File tree

20 files changed

+210
-68
lines changed

20 files changed

+210
-68
lines changed

.github/workflows/builder.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125

126126
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
127127
if: needs.init.outputs.publish == 'true'
128-
uses: actions/setup-python@v5.4.0
128+
uses: actions/setup-python@v5.5.0
129129
with:
130130
python-version: ${{ env.DEFAULT_PYTHON }}
131131

@@ -149,7 +149,7 @@ jobs:
149149
150150
- name: Login to GitHub Container Registry
151151
if: needs.init.outputs.publish == 'true'
152-
uses: docker/login-action@v3.3.0
152+
uses: docker/login-action@v3.4.0
153153
with:
154154
registry: ghcr.io
155155
username: ${{ github.repository_owner }}
@@ -160,7 +160,7 @@ jobs:
160160
run: echo "BUILD_ARGS=--test" >> $GITHUB_ENV
161161

162162
- name: Build supervisor
163-
uses: home-assistant/builder@2025.02.0
163+
uses: home-assistant/builder@2025.03.0
164164
with:
165165
args: |
166166
$BUILD_ARGS \
@@ -205,7 +205,7 @@ jobs:
205205

206206
- name: Build the Supervisor
207207
if: needs.init.outputs.publish != 'true'
208-
uses: home-assistant/builder@2025.02.0
208+
uses: home-assistant/builder@2025.03.0
209209
with:
210210
args: |
211211
--test \

.github/workflows/ci.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
uses: actions/[email protected]
2929
- name: Set up Python
3030
id: python
31-
uses: actions/setup-python@v5.4.0
31+
uses: actions/setup-python@v5.5.0
3232
with:
3333
python-version: ${{ env.DEFAULT_PYTHON }}
3434
- name: Restore Python virtual environment
3535
id: cache-venv
36-
uses: actions/[email protected].2
36+
uses: actions/[email protected].3
3737
with:
3838
path: venv
3939
key: |
@@ -47,7 +47,7 @@ jobs:
4747
pip install -r requirements.txt -r requirements_tests.txt
4848
- name: Restore pre-commit environment from cache
4949
id: cache-precommit
50-
uses: actions/[email protected].2
50+
uses: actions/[email protected].3
5151
with:
5252
path: ${{ env.PRE_COMMIT_CACHE }}
5353
lookup-only: true
@@ -69,13 +69,13 @@ jobs:
6969
- name: Check out code from GitHub
7070
uses: actions/[email protected]
7171
- name: Set up Python ${{ needs.prepare.outputs.python-version }}
72-
uses: actions/setup-python@v5.4.0
72+
uses: actions/setup-python@v5.5.0
7373
id: python
7474
with:
7575
python-version: ${{ needs.prepare.outputs.python-version }}
7676
- name: Restore Python virtual environment
7777
id: cache-venv
78-
uses: actions/[email protected].2
78+
uses: actions/[email protected].3
7979
with:
8080
path: venv
8181
key: |
@@ -87,7 +87,7 @@ jobs:
8787
exit 1
8888
- name: Restore pre-commit environment from cache
8989
id: cache-precommit
90-
uses: actions/[email protected].2
90+
uses: actions/[email protected].3
9191
with:
9292
path: ${{ env.PRE_COMMIT_CACHE }}
9393
key: |
@@ -112,13 +112,13 @@ jobs:
112112
- name: Check out code from GitHub
113113
uses: actions/[email protected]
114114
- name: Set up Python ${{ needs.prepare.outputs.python-version }}
115-
uses: actions/setup-python@v5.4.0
115+
uses: actions/setup-python@v5.5.0
116116
id: python
117117
with:
118118
python-version: ${{ needs.prepare.outputs.python-version }}
119119
- name: Restore Python virtual environment
120120
id: cache-venv
121-
uses: actions/[email protected].2
121+
uses: actions/[email protected].3
122122
with:
123123
path: venv
124124
key: |
@@ -130,7 +130,7 @@ jobs:
130130
exit 1
131131
- name: Restore pre-commit environment from cache
132132
id: cache-precommit
133-
uses: actions/[email protected].2
133+
uses: actions/[email protected].3
134134
with:
135135
path: ${{ env.PRE_COMMIT_CACHE }}
136136
key: |
@@ -170,13 +170,13 @@ jobs:
170170
- name: Check out code from GitHub
171171
uses: actions/[email protected]
172172
- name: Set up Python ${{ needs.prepare.outputs.python-version }}
173-
uses: actions/setup-python@v5.4.0
173+
uses: actions/setup-python@v5.5.0
174174
id: python
175175
with:
176176
python-version: ${{ needs.prepare.outputs.python-version }}
177177
- name: Restore Python virtual environment
178178
id: cache-venv
179-
uses: actions/[email protected].2
179+
uses: actions/[email protected].3
180180
with:
181181
path: venv
182182
key: |
@@ -188,7 +188,7 @@ jobs:
188188
exit 1
189189
- name: Restore pre-commit environment from cache
190190
id: cache-precommit
191-
uses: actions/[email protected].2
191+
uses: actions/[email protected].3
192192
with:
193193
path: ${{ env.PRE_COMMIT_CACHE }}
194194
key: |
@@ -214,13 +214,13 @@ jobs:
214214
- name: Check out code from GitHub
215215
uses: actions/[email protected]
216216
- name: Set up Python ${{ needs.prepare.outputs.python-version }}
217-
uses: actions/setup-python@v5.4.0
217+
uses: actions/setup-python@v5.5.0
218218
id: python
219219
with:
220220
python-version: ${{ needs.prepare.outputs.python-version }}
221221
- name: Restore Python virtual environment
222222
id: cache-venv
223-
uses: actions/[email protected].2
223+
uses: actions/[email protected].3
224224
with:
225225
path: venv
226226
key: |
@@ -232,7 +232,7 @@ jobs:
232232
exit 1
233233
- name: Restore pre-commit environment from cache
234234
id: cache-precommit
235-
uses: actions/[email protected].2
235+
uses: actions/[email protected].3
236236
with:
237237
path: ${{ env.PRE_COMMIT_CACHE }}
238238
key: |
@@ -258,13 +258,13 @@ jobs:
258258
- name: Check out code from GitHub
259259
uses: actions/[email protected]
260260
- name: Set up Python ${{ needs.prepare.outputs.python-version }}
261-
uses: actions/setup-python@v5.4.0
261+
uses: actions/setup-python@v5.5.0
262262
id: python
263263
with:
264264
python-version: ${{ needs.prepare.outputs.python-version }}
265265
- name: Restore Python virtual environment
266266
id: cache-venv
267-
uses: actions/[email protected].2
267+
uses: actions/[email protected].3
268268
with:
269269
path: venv
270270
key: |
@@ -294,7 +294,7 @@ jobs:
294294
- name: Check out code from GitHub
295295
uses: actions/[email protected]
296296
- name: Set up Python ${{ needs.prepare.outputs.python-version }}
297-
uses: actions/setup-python@v5.4.0
297+
uses: actions/setup-python@v5.5.0
298298
id: python
299299
with:
300300
python-version: ${{ needs.prepare.outputs.python-version }}
@@ -304,7 +304,7 @@ jobs:
304304
cosign-release: "v2.4.0"
305305
- name: Restore Python virtual environment
306306
id: cache-venv
307-
uses: actions/[email protected].2
307+
uses: actions/[email protected].3
308308
with:
309309
path: venv
310310
key: |
@@ -339,7 +339,7 @@ jobs:
339339
-o console_output_style=count \
340340
tests
341341
- name: Upload coverage artifact
342-
uses: actions/[email protected].1
342+
uses: actions/[email protected].2
343343
with:
344344
name: coverage-${{ matrix.python-version }}
345345
path: .coverage
@@ -353,13 +353,13 @@ jobs:
353353
- name: Check out code from GitHub
354354
uses: actions/[email protected]
355355
- name: Set up Python ${{ needs.prepare.outputs.python-version }}
356-
uses: actions/setup-python@v5.4.0
356+
uses: actions/setup-python@v5.5.0
357357
id: python
358358
with:
359359
python-version: ${{ needs.prepare.outputs.python-version }}
360360
- name: Restore Python virtual environment
361361
id: cache-venv
362-
uses: actions/[email protected].2
362+
uses: actions/[email protected].3
363363
with:
364364
path: venv
365365
key: |
@@ -370,7 +370,7 @@ jobs:
370370
echo "Failed to restore Python virtual environment from cache"
371371
exit 1
372372
- name: Download all coverage artifacts
373-
uses: actions/download-artifact@v4.1.9
373+
uses: actions/download-artifact@v4.2.1
374374
- name: Combine coverage results
375375
run: |
376376
. venv/bin/activate

.github/workflows/sentry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Check out code from GitHub
1313
uses: actions/[email protected]
1414
- name: Sentry Release
15-
uses: getsentry/[email protected].0
15+
uses: getsentry/[email protected].1
1616
env:
1717
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1818
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}

.github/workflows/update_frontend.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ jobs:
6464
fileName: home_assistant_frontend_supervisor-${{ needs.check-version.outputs.latest_version }}.tar.gz
6565
extract: true
6666
out-file-path: supervisor/api/panel/
67+
- name: Remove release assets archive
68+
run: |
69+
rm -f supervisor/api/panel/home_assistant_frontend_supervisor-*.tar.gz
6770
- name: Create PR
6871
uses: peter-evans/create-pull-request@v7
6972
with:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools~=75.8.0", "wheel~=0.45.0"]
2+
requires = ["setuptools~=78.0.2", "wheel~=0.45.0"]
33
build-backend = "setuptools.build_meta"
44

55
[project]

requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
aiodns==3.2.0
2-
aiohttp==3.11.13
2+
aiohttp==3.11.14
33
atomicwrites-homeassistant==1.4.1
4-
attrs==25.1.0
4+
attrs==25.3.0
55
awesomeversion==24.6.0
6-
blockbuster==1.5.23
6+
blockbuster==1.5.24
77
brotli==1.1.0
88
ciso8601==2.3.2
99
colorlog==6.9.0
@@ -22,9 +22,9 @@ pyudev==0.24.3
2222
PyYAML==6.0.2
2323
requests==2.32.3
2424
securetar==2025.2.1
25-
sentry-sdk==2.22.0
26-
setuptools==75.8.2
25+
sentry-sdk==2.24.1
26+
setuptools==78.0.2
2727
voluptuous==0.15.2
28-
dbus-fast==2.37.0
28+
dbus-fast==2.43.0
2929
typing_extensions==4.12.2
3030
zlib-fast==0.2.1

requirements_tests.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
astroid==3.3.8
2-
coverage==7.6.12
3-
pre-commit==4.1.0
4-
pylint==3.3.4
1+
astroid==3.3.9
2+
coverage==7.7.1
3+
pre-commit==4.2.0
4+
pylint==3.3.6
55
pytest-aiohttp==1.1.0
66
pytest-asyncio==0.25.2
77
pytest-cov==6.0.0
88
pytest-timeout==2.3.1
99
pytest==8.3.5
10-
ruff==0.9.9
10+
ruff==0.11.2
1111
time-machine==2.16.0
1212
typing_extensions==4.12.2
1313
urllib3==2.3.0

supervisor/__main__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
# Enable fast zlib before importing supervisor
1212
zlib_fast.enable()
1313

14-
from supervisor import bootstrap # pylint: disable=wrong-import-position # noqa: E402
15-
from supervisor.utils.logging import ( # pylint: disable=wrong-import-position # noqa: E402
16-
activate_log_queue_handler,
17-
)
14+
# pylint: disable=wrong-import-position
15+
from supervisor import bootstrap # noqa: E402
16+
from supervisor.utils.blockbuster import activate_blockbuster # noqa: E402
17+
from supervisor.utils.logging import activate_log_queue_handler # noqa: E402
18+
19+
# pylint: enable=wrong-import-position
1820

1921
_LOGGER: logging.Logger = logging.getLogger(__name__)
2022

@@ -52,6 +54,8 @@ def run_os_startup_check_cleanup() -> None:
5254
_LOGGER.info("Initializing Supervisor setup")
5355
coresys = loop.run_until_complete(bootstrap.initialize_coresys())
5456
loop.set_debug(coresys.config.debug)
57+
if coresys.config.detect_blocking_io:
58+
activate_blockbuster()
5559
loop.run_until_complete(coresys.core.connect())
5660

5761
loop.run_until_complete(bootstrap.supervisor_debugger(coresys))

supervisor/api/const.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,11 @@ class BootSlot(StrEnum):
8080

8181
A = "A"
8282
B = "B"
83+
84+
85+
class DetectBlockingIO(StrEnum):
86+
"""Enable/Disable detection for blocking I/O in event loop."""
87+
88+
OFF = "off"
89+
ON = "on"
90+
ON_AT_STARTUP = "on_at_startup"

supervisor/api/supervisor.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
ATTR_CPU_PERCENT,
2121
ATTR_DEBUG,
2222
ATTR_DEBUG_BLOCK,
23+
ATTR_DETECT_BLOCKING_IO,
2324
ATTR_DIAGNOSTICS,
2425
ATTR_FORCE_SECURITY,
2526
ATTR_HEALTHY,
@@ -47,10 +48,15 @@
4748
from ..coresys import CoreSysAttributes
4849
from ..exceptions import APIError
4950
from ..store.validate import repositories
51+
from ..utils.blockbuster import (
52+
activate_blockbuster,
53+
blockbuster_enabled,
54+
deactivate_blockbuster,
55+
)
5056
from ..utils.sentry import close_sentry, init_sentry
5157
from ..utils.validate import validate_timezone
5258
from ..validate import version_tag, wait_boot
53-
from .const import CONTENT_TYPE_TEXT
59+
from .const import CONTENT_TYPE_TEXT, DetectBlockingIO
5460
from .utils import api_process, api_process_raw, api_validate
5561

5662
_LOGGER: logging.Logger = logging.getLogger(__name__)
@@ -69,6 +75,7 @@
6975
vol.Optional(ATTR_CONTENT_TRUST): vol.Boolean(),
7076
vol.Optional(ATTR_FORCE_SECURITY): vol.Boolean(),
7177
vol.Optional(ATTR_AUTO_UPDATE): vol.Boolean(),
78+
vol.Optional(ATTR_DETECT_BLOCKING_IO): vol.Coerce(DetectBlockingIO),
7279
}
7380
)
7481

@@ -101,6 +108,7 @@ async def info(self, request: web.Request) -> dict[str, Any]:
101108
ATTR_DEBUG_BLOCK: self.sys_config.debug_block,
102109
ATTR_DIAGNOSTICS: self.sys_config.diagnostics,
103110
ATTR_AUTO_UPDATE: self.sys_updater.auto_update,
111+
ATTR_DETECT_BLOCKING_IO: blockbuster_enabled(),
104112
# Depricated
105113
ATTR_WAIT_BOOT: self.sys_config.wait_boot,
106114
ATTR_ADDONS: [
@@ -160,6 +168,17 @@ async def options(self, request: web.Request) -> None:
160168
if ATTR_AUTO_UPDATE in body:
161169
self.sys_updater.auto_update = body[ATTR_AUTO_UPDATE]
162170

171+
if detect_blocking_io := body.get(ATTR_DETECT_BLOCKING_IO):
172+
if detect_blocking_io == DetectBlockingIO.ON_AT_STARTUP:
173+
self.sys_config.detect_blocking_io = True
174+
detect_blocking_io = DetectBlockingIO.ON
175+
176+
if detect_blocking_io == DetectBlockingIO.ON:
177+
activate_blockbuster()
178+
elif detect_blocking_io == DetectBlockingIO.OFF:
179+
self.sys_config.detect_blocking_io = False
180+
deactivate_blockbuster()
181+
163182
# Deprecated
164183
if ATTR_WAIT_BOOT in body:
165184
self.sys_config.wait_boot = body[ATTR_WAIT_BOOT]

0 commit comments

Comments
 (0)