fix(device-plane): reconcile failed manager rollout

This commit is contained in:
Codex
2026-08-11 00:32:35 +03:00
parent 4374a9b4e7
commit 04ba3a9f99
5 changed files with 918 additions and 16 deletions
@@ -209,7 +209,7 @@ class DeviceManagerControlPlaneArtifactsTest(unittest.TestCase):
with (
mock.patch.object(
RUNNER,
"healthcheck_compose_service",
"healthcheck_compose_service_with_grace",
) as service_health,
mock.patch.object(RUNNER, "healthcheck_url") as url_health,
mock.patch.object(
@@ -277,8 +277,21 @@ class DeviceManagerControlPlaneArtifactsTest(unittest.TestCase):
) as restore_runtime,
mock.patch.object(
RUNNER,
"run_healthchecks",
"healthcheck_compose_service_with_grace",
) as restore_health,
mock.patch.object(
RUNNER,
"component_healthchecks",
return_value=("core-health",),
),
mock.patch.object(
RUNNER,
"healthcheck_url",
) as restore_url_health,
mock.patch.object(
RUNNER,
"run_healthchecks",
) as generic_health,
):
result = RUNNER.rollback_device_plane_apply(
Path(directory) / "live",
@@ -298,9 +311,10 @@ class DeviceManagerControlPlaneArtifactsTest(unittest.TestCase):
)
restore_health.assert_called_once_with(
"device-plane",
existing,
("device-control-core",),
"device-control-core",
)
restore_url_health.assert_called_once_with("core-health")
generic_health.assert_not_called()
self.assertEqual(
result,
f"source+runtime-restored:{len(entries)}",