fix(firecracker): honor cached image policy
test / integration (pull_request) Successful in 9s
test / unit (pull_request) Successful in 32s
test / coverage (pull_request) Successful in 36s
lint / lint (push) Successful in 47s
tracker-policy-pr / check-pr (pull_request) Successful in 6s

This commit is contained in:
2026-07-18 21:18:50 +00:00
parent 9004f3eb28
commit fa3e45cc54
6 changed files with 115 additions and 20 deletions
+6 -5
View File
@@ -93,16 +93,17 @@ class FirecrackerBottleBackend(
)
def _build_or_load_images(self, plan: FirecrackerBottlePlan) -> BottleImages:
# Firecracker builds its rootfs image inside _launch_impl (via buildah in
# a builder VM), so there is nothing to pre-resolve here.
return BottleImages(agent=plan.image)
return BottleImages(agent=_launch.build_or_load_agent_base(plan))
def prelaunch_checks(self, plan: FirecrackerBottlePlan) -> None:
_launch.stale_checks(plan)
@contextmanager
def _launch_impl(
self, plan: FirecrackerBottlePlan, images: BottleImages,
) -> Generator[FirecrackerBottle, None, None]:
del images # rootfs built inside _launch.launch; images unused here
with _launch.launch(plan, provision=self.provision) as bottle:
assert isinstance(images.agent, Path)
with _launch.launch(plan, images.agent, provision=self.provision) as bottle:
yield bottle
def prepare_cleanup(self) -> FirecrackerBottleCleanupPlan: