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 GitHub
parent c60dee16bc
commit 6ba8b7a5d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 11 deletions

View File

@ -134,8 +134,15 @@ COOLDOWN_TIME = 60
DEBUGGER_INTEGRATIONS = {"debugpy"} DEBUGGER_INTEGRATIONS = {"debugpy"}
# Core integrations are unconditionally loaded
CORE_INTEGRATIONS = {"homeassistant", "persistent_notification"} 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 # Set log levels
"logger", "logger",
# Error logging # Error logging
@ -214,8 +221,8 @@ CRITICAL_INTEGRATIONS = {
} }
SETUP_ORDER = ( SETUP_ORDER = (
# Load logging as soon as possible # Load logging and http deps as soon as possible
("logging", LOGGING_INTEGRATIONS), ("logging, http deps", LOGGING_AND_HTTP_DEPS_INTEGRATIONS),
# Setup frontend and recorder # Setup frontend and recorder
("frontend, recorder", {*FRONTEND_INTEGRATIONS, *RECORDER_INTEGRATIONS}), ("frontend, recorder", {*FRONTEND_INTEGRATIONS, *RECORDER_INTEGRATIONS}),
# Start up debuggers. Start these first in case they want to wait. # Start up debuggers. Start these first in case they want to wait.

View File

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

View File

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

View File

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