refactor(image-cache): replace warn_if_stale with StaleImageError; add launch template
- image_cache: StaleImageError exception + check_stale/check_stale_path (raise instead of warn) - BottleBackend.launch: template method (skip_stale flag) that calls _image_stale_checks then _launch_impl - Each backend: _image_stale_checks delegates to a stale_checks() function in its launch module; _launch_impl replaces launch override - macos_container: adds image_created_at to util, cached-image support in _build_images, stale_checks - cli/start.py: catches StaleImageError, prompts interactively, retries with skip_stale=True; headless mode dies on it
This commit is contained in:
@@ -95,7 +95,6 @@ class TestLaunchCommittedImage(unittest.TestCase):
|
||||
mock.patch.object(launch_mod.docker_mod, "build_image", side_effect=_build), \
|
||||
mock.patch.object(launch_mod.docker_mod, "verify_agent_image"), \
|
||||
mock.patch.object(launch_mod.docker_mod, "image_created_at"), \
|
||||
mock.patch.object(launch_mod, "warn_if_stale"), \
|
||||
mock.patch.object(launch_mod, "launch_consolidated", return_value=_CTX), \
|
||||
mock.patch.object(launch_mod, "teardown_consolidated"), \
|
||||
mock.patch.object(launch_mod, "DockerGateway", return_value=gw), \
|
||||
|
||||
Reference in New Issue
Block a user