template-builder: pass flatten=true to CreateSnapshot#62
Conversation
…restores skip apply_delta
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Ready to review this PR? Stage has broken it down into 4 individual chapters for you: Chapters generated by Stage for commit d6335b0 on May 20, 2026 7:03pm UTC. |
|
Overall this is clean and well-scoped — the zero-value-is-safe enum design and the deploy-order note are both good. A few things worth addressing before merge: 1. Missing guard: The model comment says "Requires block_delta_dir" but if mode == SnapshotFlatten && blockDeltaDir == "" {
return fmt.Errorf("flatten mode requires a non-empty blockDeltaDir")
}2. Data race in the test
3. Server readiness race in the test
|
|
@pavitrabhalla Pushed Fixes. |
|
Blocking: nothing. Non-blocking suggestions:
|
…atten field is absent (not just false)
Summary
Tells the forked firecracker (superserve-ai/firecracker#11) to bake each overlay's dirty blocks into its base.ext4 and zero the side-car bitmap as part of snapshot creation. Sandboxes restored from templates built after this lands start with an empty per-VM overlay — no apply_delta replay on create.
Single new
flatten boolarg onvm.CreateSnapshot. Template-builder passestrue; the two other callers (regular snapshot + diff snapshot) passfalse.Deploy order: firecracker PR #11 must land + new binary deployed first. With old firecracker,
flatten: trueis silently ignored (the field is#[serde(default)]), so the worst case during rollout is templates that aren't flat yet — no breakage.