Skip to content

fix: add -y and optional --ami to spawn launch (#18) - #19

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/18-launch-flags
Jun 3, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/18-launch-flags

Conversation

@scttfrdmn

Copy link
Copy Markdown
Collaborator

Two launch-command flag fixes from #18. The reported "silent exit-0 launch failure" was traced to the head node running spawn 0.36.6 (pre-#34, where the pipe-mode JSON-parse bug was live); on 0.36.9 it doesn't reproduce. Both flags are still correct to land.

Changes

  1. -y (auto-approve) — defensive. spawn only reads stdin for cost approval on a TTY, so it's a no-op for our pipe invocation on 0.36.9, but it guards against any cost-approval path ever becoming reachable from a ProcessBuilder (and fixes the live 0.36.6 behavior).
  2. --ami from ext.ami (optional) — real fix. Without an explicit AMI, spawn auto-detects via ssm:GetParameter on /aws/service/ami-amazon-linux-latest/..., which needs the instance/caller role to hold that SSM permission (spawn#38). Passing ext.ami sidesteps that; omitting it preserves spawn's auto-detect.

buildLaunchCommand gains an ami param, threaded from ext.ami in submit().

Test

Spock specs assert -y is always present and --ami is passed iff ext.ami is set. ./gradlew test green (6 tests).

Fixes #18

Two launch-command flag fixes surfaced by a run against a head node still
on spawn 0.36.6:

- -y (auto-approve cost estimate): defensive. On spawn 0.36.9 the
  pipe-mode JSON-parse bug is already fixed by spawn#34 (explicit
  --instance-type → flags mode, stdin never read), so this is not a 0.36.9
  bugfix — but it guards against any cost-approval prompt ever becoming
  reachable from our non-TTY ProcessBuilder invocation. On 0.36.6 (which
  the reporting head node ran) it also avoids the live pipe bug.

- --ami from ext.ami (optional): real fix. Without an explicit AMI, spawn
  auto-detects via ssm:GetParameter on /aws/service/ami-amazon-linux-latest,
  which requires the instance/caller role to hold that SSM permission
  (spawn#38). Passing ext.ami sidesteps that dependency; omitting it keeps
  spawn's own auto-detect behavior.

buildLaunchCommand gains an ami param (threaded from ext.ami in submit()).
Spock specs assert -y is always present and --ami is passed iff ext.ami is
set.
@scttfrdmn
scttfrdmn merged commit ccb981d into main Jun 3, 2026
1 check passed
@scttfrdmn
scttfrdmn deleted the fix/18-launch-flags branch June 3, 2026 16:50
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.

buildLaunchCommand missing -y flag — spawn silently fails to launch when stdin is a pipe

1 participant