Remove isal from after_dependencies in http (#119000)

This commit is contained in:
J. Nick Koston 2024-06-07 02:21:53 -05:00 committed by Franck Nijhof
parent 56db7fc7dc
commit cfa619b67e
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
4 changed files with 16 additions and 11 deletions

View file

@ -134,8 +134,15 @@ COOLDOWN_TIME = 60
DEBUGGER_INTEGRATIONS = {"debugpy"}
# Core integrations are unconditionally loaded
CORE_INTEGRATIONS = {"homeassistant", "persistent_notification"}
LOGGING_INTEGRATIONS = {
# Integrations that are loaded right after the core is set up
LOGGING_AND_HTTP_DEPS_INTEGRATIONS = {
# isal is loaded right away before `http` to ensure if its
# enabled, that `isal` is up to date.
"isal",
# Set log levels
"logger",
# Error logging
@ -214,8 +221,8 @@ CRITICAL_INTEGRATIONS = {
}
SETUP_ORDER = (
# Load logging as soon as possible
("logging", LOGGING_INTEGRATIONS),
# Load logging and http deps as soon as possible
("logging, http deps", LOGGING_AND_HTTP_DEPS_INTEGRATIONS),
# Setup frontend and recorder
("frontend, recorder", {*FRONTEND_INTEGRATIONS, *RECORDER_INTEGRATIONS}),
# Start up debuggers. Start these first in case they want to wait.

View file

@ -1,7 +1,6 @@
{
"domain": "http",
"name": "HTTP",
"after_dependencies": ["isal"],
"codeowners": ["@home-assistant/core"],
"documentation": "https://www.home-assistant.io/integrations/http",
"integration_type": "system",

View file

@ -10,7 +10,7 @@ from homeassistant.bootstrap import (
DEBUGGER_INTEGRATIONS,
DEFAULT_INTEGRATIONS,
FRONTEND_INTEGRATIONS,
LOGGING_INTEGRATIONS,
LOGGING_AND_HTTP_DEPS_INTEGRATIONS,
RECORDER_INTEGRATIONS,
STAGE_1_INTEGRATIONS,
)
@ -23,7 +23,7 @@ from homeassistant.bootstrap import (
{
*DEBUGGER_INTEGRATIONS,
*CORE_INTEGRATIONS,
*LOGGING_INTEGRATIONS,
*LOGGING_AND_HTTP_DEPS_INTEGRATIONS,
*FRONTEND_INTEGRATIONS,
*RECORDER_INTEGRATIONS,
*STAGE_1_INTEGRATIONS,

View file

@ -591,7 +591,7 @@ async def test_discovery_requirements_mqtt(hass: HomeAssistant) -> None:
) as mock_process:
await async_get_integration_with_requirements(hass, "mqtt_comp")
assert len(mock_process.mock_calls) == 2
assert len(mock_process.mock_calls) == 1
assert mock_process.mock_calls[0][1][1] == mqtt.requirements
@ -608,13 +608,12 @@ async def test_discovery_requirements_ssdp(hass: HomeAssistant) -> None:
) as mock_process:
await async_get_integration_with_requirements(hass, "ssdp_comp")
assert len(mock_process.mock_calls) == 4
assert len(mock_process.mock_calls) == 3
assert mock_process.mock_calls[0][1][1] == ssdp.requirements
assert {
mock_process.mock_calls[1][1][0],
mock_process.mock_calls[2][1][0],
mock_process.mock_calls[3][1][0],
} == {"network", "recorder", "isal"}
} == {"network", "recorder"}
@pytest.mark.parametrize(
@ -638,7 +637,7 @@ async def test_discovery_requirements_zeroconf(
) as mock_process:
await async_get_integration_with_requirements(hass, "comp")
assert len(mock_process.mock_calls) == 4
assert len(mock_process.mock_calls) == 3
assert mock_process.mock_calls[0][1][1] == zeroconf.requirements