mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-18 14:34:20 +00:00
Compare commits
3 Commits
supervisor
...
bump-devco
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3557f97cd1 | ||
|
|
38ddb3df54 | ||
|
|
0db56b09ce |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Supervisor dev",
|
||||
"image": "ghcr.io/home-assistant/devcontainer:5-supervisor",
|
||||
"image": "ghcr.io/home-assistant/devcontainer:6-supervisor",
|
||||
"overrideCommand": false,
|
||||
"remoteUser": "vscode",
|
||||
"containerEnv": {
|
||||
|
||||
@@ -8,7 +8,7 @@ pytest-asyncio==1.3.0
|
||||
pytest-cov==7.1.0
|
||||
pytest-timeout==2.4.0
|
||||
pytest==9.0.3
|
||||
ruff==0.15.10
|
||||
ruff==0.15.11
|
||||
time-machine==3.2.0
|
||||
types-pyyaml==6.0.12.20260408
|
||||
urllib3==2.6.3
|
||||
|
||||
@@ -321,8 +321,6 @@ class HomeAssistantCore(JobGroup):
|
||||
|
||||
# Successfull - last step
|
||||
await self.sys_homeassistant.save_data()
|
||||
with suppress(DockerError):
|
||||
await self.instance.cleanup(old_image=old_image)
|
||||
|
||||
# Update Home Assistant
|
||||
with suppress(HomeAssistantError):
|
||||
@@ -332,9 +330,8 @@ class HomeAssistantCore(JobGroup):
|
||||
try:
|
||||
data = await self.sys_homeassistant.api.get_config()
|
||||
except HomeAssistantError:
|
||||
# The API stoped responding between the up checks an now
|
||||
# The API stopped responding between the update and now
|
||||
self._error_state = True
|
||||
return
|
||||
|
||||
# Verify that the frontend is loaded
|
||||
if "frontend" not in data.get("components", []):
|
||||
@@ -347,6 +344,9 @@ class HomeAssistantCore(JobGroup):
|
||||
)
|
||||
self._error_state = True
|
||||
else:
|
||||
# Health checks passed, clean up old image
|
||||
with suppress(DockerError):
|
||||
await self.instance.cleanup(old_image=old_image)
|
||||
return
|
||||
|
||||
# Update going wrong, revert it
|
||||
|
||||
@@ -458,10 +458,12 @@ async def test_update_frontend_check_success(api_client: TestClient, coresys: Co
|
||||
HomeAssistantAPI, "get_config", return_value={"components": ["frontend"]}
|
||||
),
|
||||
patch.object(HomeAssistantAPI, "check_frontend_available", return_value=True),
|
||||
patch.object(DockerInterface, "cleanup") as mock_cleanup,
|
||||
):
|
||||
resp = await api_client.post("/core/update", json={"version": "2025.8.3"})
|
||||
|
||||
assert resp.status == 200
|
||||
mock_cleanup.assert_called_once()
|
||||
|
||||
|
||||
async def test_update_frontend_check_fails_triggers_rollback(
|
||||
@@ -498,6 +500,7 @@ async def test_update_frontend_check_fails_triggers_rollback(
|
||||
HomeAssistantAPI, "get_config", return_value={"components": ["frontend"]}
|
||||
),
|
||||
patch.object(HomeAssistantAPI, "check_frontend_available", return_value=False),
|
||||
patch.object(DockerInterface, "cleanup") as mock_cleanup,
|
||||
):
|
||||
resp = await api_client.post("/core/update", json={"version": "2025.8.3"})
|
||||
|
||||
@@ -511,3 +514,5 @@ async def test_update_frontend_check_fails_triggers_rollback(
|
||||
assert (
|
||||
Issue(IssueType.UPDATE_ROLLBACK, ContextType.CORE) in coresys.resolution.issues
|
||||
)
|
||||
# Old image should not be cleaned up so rollback doesn't need to re-download
|
||||
mock_cleanup.assert_not_called()
|
||||
|
||||
Reference in New Issue
Block a user