#So apparently we still load hassio as
1 messages · Page 1 of 1 (latest)
@crisp rock can you check?
I don't think that's what's happening actually
Check this comment: https://github.com/home-assistant/core/issues/166976#issuecomment-4171793548
The problem Starting from Home Assistant 2026.4.Home Assistant Core (venv installation) fails to start because it incorrectly loads the hassio integration during bootstrap. This should never happen...
EDIT: What I do not understand yet: Why did from aiohasupervisor import SupervisorError not fail, which is done before IngressPanel?
Yep I just saw that one as well
I thought we now made it so that core could run without aiohasupervisor right
I think the reason its breaking where its breaking is because IngressPanel is new
we upgraded the version of aiohasupervisor after removing the depenency from core requiremetns
they probably have the old version still in their venv but not the new one
and so its speicifically not finding that reference
but that means somehow its still loading...
Think analytics is gonna pull it in
its any of them isn't it?
I guess its not that something pulls it in but rather something pulls it in without declaring the dependency in manifest
ok yea ill take a look
anyone asks for system info its just going to try and load hassio. and that's not in an integration at all
https://github.com/home-assistant/core/blob/f74256db2da4a16486f1ad1331ebe4779ebc86f5/homeassistant/bootstrap.py#L486 and yea we call it during bootstrap super early. Why do we do that lol
Isn't system info what we call to load that panel in the UI? I can fix it but I don't get why we're doing that so early in startup
cc @finite crater
likely as optimisation, looks like something that Nick would add
I figured it out
its because a few of the things in there like get_user do blocking I/O to figure it out and don't change
so even though this function just returns a response without caching it and we toss the response we want those pieces of system info cached for later
exactly
Nice find. So essentially our dependency drop of aiohasupervisor in the main requirement was a bit premature 🤔
Well yes and no. we had nothing automated to catch this
every integration that imports hassio stuff does now list hassio in its manifest, I just checked
but this helper currently bypasses our hassfest checks
it can create secret dependencies, like with bootstrap
I am wondering if there is an easy way to test this
but its just a bug, the code doesn't make sense
it was importing the hassio component and then using our is_hassio helper after
the one we made specifically to allow integrations to check if they should import hassio
that's kinda on purpose, we use it in many places to sidestep hassfest
not importing at top level
yea that's fine
we made an is_hassio helper that checks if hassio is loaded
and all around the codebase what you see is this
if is_hassio:
from homeassistant.components import hassio
or something along those lines
yeah, but here that won't work
this one does this
from homeassistant.components import hassio
if is_hassio
you need a different solution here
how come?
that helper checks if hassio is loaded, here it's too early in bootstrap
sure but we don't care anyway. It loads hassio to help craft a better response
and bootstrap tosses the entire response
yeah, probably makes sense to split that function into two
and just call the one which does all the io from bootstrap
OK, I get what you're saying, it can be left the way it is too
since we don't care about the response
yea
it is admittedly doing a little more work then necessary
so what you're saying makes sense
but maybe since we're already in beta I'll do the quick fix here
and we can decide if we want to improve it after
sounds OK
if TYPE_CHECKING:
from homeassistant.components import hassio # noqa: PLC0415
else:
hassio = await async_import_module(hass, "homeassistant.components.hassio")
This style of import is redundant now though right?
if we put all this under if is_hassio(hass)
that means hassio is already in hass.config.components
so we can ust import. its not going to be blocking
yes