Skip to content

feat(launch): add --volume-size flag for root EBS volume - #12

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/launch-volume-size
May 30, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/launch-volume-size

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Closes #11.

`spawn launch` had no flag to set the root EBS volume size, blocking AMI-bake workflows that pre-install large datasets (the aws-microbiome-demo bake needs ~40 GB).

The fix is small because the backend already existed

`LaunchConfig.RootVolumeSizeGiB` is already honored by `buildBlockDevices` (it's used today for hibernation sizing). Only the CLI flag was missing. This PR:

  • Adds `--volume-size` (int32 GiB; `0` = AMI default) to `spawn launch`.
  • Maps it into `config.RootVolumeSizeGiB` in `buildLaunchConfig`, guarded by `> 0` so the default path is unchanged.
spawn launch my-bake --instance-type c7g.4xlarge --volume-size 80 \
  --user-data-file bake.sh --ttl 3h

Tests

`TestBuildLaunchConfig_VolumeSize` covers both the set (→80) and unset (→0, AMI default) paths. `buildBlockDevices` behavior with `RootVolumeSizeGiB` was already covered in `pkg/aws/helpers_test.go`.

`go build`, `go vet`, `gofmt`, full `go test ./...` pass; coverage gate holds (26.8% ≥ 26%).

The backend already supported a custom root volume — LaunchConfig.
RootVolumeSizeGiB is honored by buildBlockDevices — but no CLI flag exposed it.
Add --volume-size (GiB; 0 = AMI default) on spawn launch and map it through
buildLaunchConfig. Enables AMI-baking workflows that pre-install large datasets
beyond the default root volume.

Closes #11.
@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 2f7a839 into main May 30, 2026
2 checks passed
@scttfrdmn
scttfrdmn deleted the feat/launch-volume-size branch May 30, 2026 23:15
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.

spawn launch: no flag to set EBS root volume size

1 participant