4997 Commits

Author SHA1 Message Date
github-actions[bot]
fdd4aefc30
Update frontend to version 20250531.3 2025-06-13 00:45:50 +00:00
Mike Degatano
82ee4bc441
Fix mypy issues in misc, mounts and os modules (#5942)
* Fix mypy errors in misc and mounts

* Fix mypy issues in os module

* Fix typing of capture_exception

* avoid unnecessary property call

* Fixes from feedback
2025-06-12 18:06:57 -04:00
Stefan Agner
bdbd09733a
Avoid aiodns resolver memory leak (#5941)
* Avoid aiodns resolver memory leak

In certain cases, the aiodns resolver can leak memory. This also
leads to Fatal `Python error… ffi.from_handle()`. This addresses
the issue by ensuring that the resolver is properly closed
when it is no longer needed.

* Address coderabbitai feedback

* Fix pytest

* Fix pytest
2025-06-12 11:32:53 +02:00
David Rapan
d5b5a328d7
feat: Add opt-in IPv6 for containers (#5879)
Configurable and w/ migrations between IPv4-Only and Dual-Stack

Signed-off-by: David Rapan <david@rapan.cz>
Co-authored-by: Stefan Agner <stefan@agner.ch>
2025-06-12 11:32:24 +02:00
dependabot[bot]
52b24e177f
Bump coverage from 7.8.2 to 7.9.0 (#5944)
Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.8.2 to 7.9.0.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/7.8.2...7.9.0)

---
updated-dependencies:
- dependency-name: coverage
  dependency-version: 7.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-12 09:27:56 +02:00
dependabot[bot]
e10c58c424
Bump pytest-cov from 6.1.1 to 6.2.0 (#5943)
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.1.1 to 6.2.0.
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v6.1.1...v6.2.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-12 09:27:44 +02:00
Mike Degatano
9682870c2c
Fix mypy issues in host and jobs (#5939)
* Fix mypy issues in host

* Fix mypy issues in job module

* Fix mypy issues introduced in previously fixed modules

* Apply suggestions from code review

Co-authored-by: Stefan Agner <stefan@agner.ch>

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2025-06-11 12:04:25 -04:00
Stefan Agner
fd0b894d6a
Fix dynamic port pytest (#5940) 2025-06-11 15:10:31 +02:00
dependabot[bot]
697515b81f
Bump aiohttp from 3.12.9 to 3.12.12 (#5937)
---
updated-dependencies:
- dependency-name: aiohttp
  dependency-version: 3.12.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 11:52:14 +02:00
dependabot[bot]
d912c234fa
Bump requests from 2.32.3 to 2.32.4 (#5935)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 10:53:45 +02:00
dependabot[bot]
e8445ae8f2
Bump cryptography from 45.0.3 to 45.0.4 (#5936)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 09:23:40 +02:00
dependabot[bot]
6710439ce5
Bump ruff from 0.11.12 to 0.11.13 (#5932)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 00:41:04 -05:00
dependabot[bot]
95eec03c91
Bump aiohttp from 3.12.6 to 3.12.9 (#5930) 2025-06-05 07:43:55 +01:00
dependabot[bot]
9b686a2d9a
Bump pytest from 8.3.5 to 8.4.0 (#5929)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 10:23:35 +02:00
dependabot[bot]
063d69da90
Bump aiohttp from 3.12.4 to 3.12.6 (#5928)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-31 12:35:37 -05:00
dependabot[bot]
baaf04981f
Bump awesomeversion from 24.6.0 to 25.5.0 (#5926)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-31 01:23:53 -05:00
dependabot[bot]
bdb25a7ff8
Bump ruff from 0.11.11 to 0.11.12 (#5927)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-31 01:23:06 -05:00
Jan Čermák
ad2d6a3156
Revert "Do not backup add-on being uninstalled (#5917)" (#5925)
This reverts commit 63fde3b4109310e95ebdcc8e3c23a04ff96ba592.

This change introduced another more severe regression, causing all
add-ons that haven't been started since Supervisor startup to cause
errors during their backup. More sophisticated check would have to be
implemented to address edge cases during backups for non-existing
add-ons (or their config actually).

Fixes #5924
2025.05.5
2025-05-29 17:32:51 +02:00
Stefan Agner
42f885595e
Avoid early DNS plug-in start (#5922)
* Avoid early DNS plug-in start

A connectivity check can potentially be triggered before the DNS
plug-in is loaded. Avoid calling restart on the DNS plug-in before
it got initially loaded. This prevents starting before attaching.
The attaching makes sure that the DNS plug-in container is recreated
before the DNS plug-in is initially started, which is e.g. needed
by a potentially hassio network configuration change (e.g. the
migration required to enable/disable IPv6 on the hassio network,
see #5879).

* Mock DNS plug-in running
2025-05-29 11:49:19 +02:00
Stefan Agner
2a88cb9339
Improve Supervisor startup error handling (#5918)
Instead of starting a task in the background synchronously wait
for Supervisor start sequence to complete. This should be functional
equivalent, as we anyways would loop forever in the event loop just
afterwards.

The advantage is that we now can catch any exceptions during the
start sequence and report any errors with critical logging to report
those to Sentry, if enabled. It also avoids "Task exception was never
retrieved" errors. Reporting errors is especially important since we
can't use the asyncio Sentry integration (see #5729 for details).

Also handle early add-on start errors just like other add-on start
errors (make sure the finally block is executed as well). And finally,
register signal handlers synchronously. There is no real benefit in
doing them asynchronously, and it avoids a potential race condition.
2025-05-29 11:42:28 +02:00
Jan Čermák
4d1a5e2dc2
Use journal-gatewayd's new /boots endpoint to list boots (#5914)
* Use journal-gatewayd's new /boots endpoint to list boots

Current method we use for getting boots has several known downsides, for
example it can miss some incomplete boots and the performance might be
worse than what we could get by using Systemd directly. Systemd was
missing a method to get list boots through the journal-gatewayd but that
should be addressed by the new /boots endpoint added in [1] which
returns application/json-seq response containing all boots as reported
in `journalctl --list-boots`.

Implement Supervisor methods to parse this format and use the endpoint
at first, falling back to the old method if it fails.

[1] https://github.com/systemd/systemd/pull/37574

* Log info instead of warning when /boots is not present

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Split records only by RS instead of LF in journal_boots_reader

* Strip only RS, json.loads is fine with whitespace

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2025-05-29 11:41:23 +02:00
dependabot[bot]
705e76abe3
Bump aiohttp from 3.12.2 to 3.12.4 (#5923)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-29 00:42:40 -05:00
Jan Čermák
7f54383147
Revert "Use s6-overlay read-only mode by default (#5906)" (#5921) 2025.05.4 2025-05-27 20:00:22 +02:00
Stefan Agner
63fde3b410
Do not backup add-on being uninstalled (#5917) 2025-05-27 14:00:54 +02:00
dependabot[bot]
5285e60cd3
Bump setuptools from 80.8.0 to 80.9.0 (#5919)
Bumps [setuptools](https://github.com/pypa/setuptools) from 80.8.0 to 80.9.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v80.8.0...v80.9.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 80.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 12:13:06 +02:00
J. Nick Koston
2a1e32bb36
Bump aiohttp to 3.12.2 (#5915) 2025-05-27 09:03:34 +02:00
dependabot[bot]
a2251e0729
Bump cryptography from 45.0.2 to 45.0.3 (#5912)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-26 17:02:04 +02:00
dependabot[bot]
1efee641ba
Bump coverage from 7.8.1 to 7.8.2 (#5913) 2025-05-26 08:41:06 +02:00
Stefan Agner
bbb8fa0b92
Ignore missing backup file on error (#5910)
When a backup error occurs, it might be that the backup file hasn't
been created yet, e.g. when there is no space or no permission on
the target backup directory. Deleting the backup file would fail
in this case. Use missing_ok instead to ignore a missing backup file
on delete.
2025.05.3
2025-05-23 14:29:36 +02:00
Stefan Agner
7593f857e8
Fix add-on config parse messages (#5909)
With #5897 we renamed addon to addon_config and vis-versa. The log
messages were still using the previous variable names leading to
UnboundLocalError.

Fix the log messages to use the correct variable names.
2025-05-23 14:29:28 +02:00
Stefan Agner
87232cf1e4
Enable debug logging early (#5908)
Set logging level early in the bootstrap process so we can use debug
level messages in the early stages of the Supervisor.
2025-05-23 12:03:32 +02:00
dependabot[bot]
9e6a4d65cd
Bump ruff from 0.11.10 to 0.11.11 (#5907)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.11.10 to 0.11.11.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.11.10...0.11.11)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.11.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-23 10:35:24 +02:00
Stefan Agner
c80fbd77c8
Use s6-overlay read-only mode by default (#5906)
To avoid accidential writes to the Supervisor root filesystem, we might
use the Docker read-only mode at one point. This is not yet the default,
but using s6-overlay with the read-only flag seems not to have any
downsides. So enable this by default.

To start Supervisor with read-only root file system teh following
arguments have to be used: `--read-only --tmpfs /run:exec`.
2025-05-22 17:30:42 +02:00
dependabot[bot]
a452969ffe
Bump coverage from 7.8.0 to 7.8.1 (#5905)
Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.8.0 to 7.8.1.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/7.8.0...7.8.1)

---
updated-dependencies:
- dependency-name: coverage
  dependency-version: 7.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 09:45:52 +02:00
Stefan Agner
89fa5c9c7a
Avoid initializing Blockbuster on Supervisor info call (#5901)
* Avoid initializing Blockbuster on Supervisor info call

Instead of creating an instance of Blockbuster to simply check if
Bluckbuster is enabled, use a global variable to store the instance
of Blockbuster and only initialize it when needed. This avoids
unnecessary initialization of Blockbuster when it is not required.

* Update supervisor/utils/blockbuster.py

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Fix merge and rename singleton class to BlockBusterManager

* Fix pytest

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2025.05.2
2025-05-21 15:06:46 +02:00
Stefan Agner
73069b628e
Bump pre-commit ruff to 0.11.10 (#5904)
Bump pre-commit ruff to 0.11.10 and address current issues.
2025-05-21 15:06:32 +02:00
Stefan Agner
8251b6c61c
Process NetworkManager PrimaryConnection changes (#5903)
Process NetworkManager interface updates in case PrimaryConnection
changes. This makes sure that the /network/interface/default/info
endpoint can be used to get the IP address of the primary interface.
2025-05-21 13:50:46 +02:00
Stefan Agner
1faf529b42
Use add-on config timestamp to determine add-on update age (#5897)
* Use add-on config timestamp to determine add-on update age

Instead of using the current timestamp when loading the add-on config,
simply use the add-on config modification timestamp. This way, we can
get a timetsamp even when Supervisor got restarted. It also simplifies
the code a bit.

* Fix pytest

* Patch stat() instead of modifing fixture files
2025-05-21 13:46:20 +02:00
dependabot[bot]
86c016b35d
Bump setuptools from 80.7.1 to 80.8.0 (#5902)
Bumps [setuptools](https://github.com/pypa/setuptools) from 80.7.1 to 80.8.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v80.7.1...v80.8.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 80.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-21 09:19:20 +02:00
Stefan Agner
4f35759fe3
Stop reading advanced logs on ConnectionError (#5900)
* Stop reading advanced logs on ConnectionError

If the client side connection closes with a `ConnectionError`, stop
reading the advanced logs.

This is very similar to ClientConnectionResetError which is easily
reproducable by having a log open and following in the browser and
then restaring Home Assistant. So far I wans't able to artificaially
reproduce the ConnectionError, but there are quite some reports on
Sentry so it seems to happen in real world.

* Warn on ConnectionError
2025-05-20 17:04:25 +02:00
David Rapan
3b575eedba
Add IPv6 address generation mode & privacy extensions (#5892)
* feat: Add IPv6 address generation mode & privacy extensions

Signed-off-by: David Rapan <david@rapan.cz>

* Use NetworkManager fixture for settings init tests

This fixes the test by since the extended implementation now can read
the version of NetworkManager.

* Add pytest for addr_gen_mode

---------

Signed-off-by: David Rapan <david@rapan.cz>
Co-authored-by: Stefan Agner <stefan@agner.ch>
2025-05-20 17:03:08 +02:00
Stefan Agner
6e6fe5ba39
Trigger auto-update through Core WebSocket call (#5896)
* Trigger auto-update through Core WebSocket call

Instead of auto-updating add-ons on Supervisor side trigger an update
through Core via a WebSocket command. This makes sure that the backup
is categorized correctly and all backup features like retention are
applied.

* Add pytest

* Fix pytest

* Fix pytest

* Fix pytest

* Fix pytest

* Fix pytest cleaner

* Set timestamp of add-on far into the past
2025-05-20 15:18:37 +02:00
Stefan Agner
b5a7e521ae
Copy additional backup locations in jobs (#5890)
Instead of copying the backup in the main job, lets copy them in
separate job per location. This allows to use the same backup error
handling mechanism as for add-ons and folders.

This makes the stage introduced in #5784 somewhat redundant, but
before removing it, let's see if this approach works out.
2025-05-20 15:18:23 +02:00
Stefan Agner
bac7c21fe8
Fix container image detection for aarch64 (#5898) 2025-05-20 10:24:27 +02:00
dependabot[bot]
2eb9ec20d6
Bump sentry-sdk from 2.28.0 to 2.29.1 (#5899)
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.28.0 to 2.29.1.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.28.0...2.29.1)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-version: 2.29.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 09:14:42 +02:00
dependabot[bot]
406348c068
Bump cryptography from 44.0.3 to 45.0.2 (#5895)
Bumps [cryptography](https://github.com/pyca/cryptography) from 44.0.3 to 45.0.2.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/44.0.3...45.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 45.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 15:05:30 +02:00
dependabot[bot]
5e3f4e8ff3
Bump ruff from 0.11.9 to 0.11.10 (#5894)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-16 10:14:16 +02:00
dependabot[bot]
31a67bc642
Bump codecov/codecov-action from 5.4.2 to 5.4.3 (#5893)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-16 10:13:58 +02:00
Stefan Agner
d0d11db7b1
Harmonize folder and add-on backup error handling (#5885)
* Harmonize folder and add-on backup error handling

Align add-on and folder backup error handling in that in both cases
errors are recorded on the respective backup Jobs, but not raised to
the caller. This allows the backup to complete successfully even if
some add-ons or folders fail to back up.

Along with this, also record errors in the per-add-on and per-folder
backup jobs, as well as the add-on and folder root job.

And finally, align the exception handling to only catch expected
exceptions for add-ons too.

* Fix pytest
2025-05-15 10:14:35 +02:00
dependabot[bot]
cbf4b4e27e
Bump setuptools from 80.4.0 to 80.7.1 (#5889)
Bumps [setuptools](https://github.com/pypa/setuptools) from 80.4.0 to 80.7.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v80.4.0...v80.7.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 80.7.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 09:44:02 +02:00