Skip to content

fix(bake): confirm the box exists before sanitizing it - #271

Merged
vsilent merged 1 commit into
devfrom
fix/reject-empty-service-block
Sep 24, 2026
Merged

vsilent merged 1 commit into
devfrom
fix/reject-empty-service-block

Conversation

@vsilent

@vsilent vsilent commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

[Copilot is generating a summary...]

Sanitizing removes the operator's own SSH key — deliberately, since a key
left in the image would grant its holder root on every clone. The
provider lookup happened afterwards, so a target Hetzner could not match
left a box that was already cleaned, no longer reachable, and never
snapshotted.

One wrong flag reaches it: `--server-id` takes the *provider's* server
id, and Stacker's own server id is a different number entirely. Passing
702 sanitized a build box and then failed with "server not found",
costing a redeploy and a 5 GB model pull.

`resolve_snapshot_target` exposes the lookup the snapshot call already
performed internally, and bake now runs it first — before the box is
touched — reporting the resolved id so an operator can see which machine
is about to be captured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vsilent
vsilent merged commit 2974d36 into dev Sep 24, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants