Skip to content

feat: root volume configuration (volume-size/type/iops/throughput)#52

Merged
kurok merged 1 commit into
mainfrom
feat/root-volume-config
Jul 2, 2026
Merged

feat: root volume configuration (volume-size/type/iops/throughput)#52
kurok merged 1 commit into
mainfrom
feat/root-volume-config

Conversation

@kurok

@kurok kurok commented Jul 2, 2026

Copy link
Copy Markdown

Closes #44 — roadmap (#49); small, self-contained, high frequency-of-pain.

Problem

No control over the root volume — instances inherit the AMI mapping (AL2023: 8 GiB gp3). Docker CI exhausts that instantly → no space left on device, one of the most common self-hosted-runner failures.

New inputs (start mode)

volume-size: 100        # GiB, >= AMI snapshot size
volume-type: gp3        # gp3 (recommended) | gp2 | io1 | io2
volume-iops: 4000       # io1/io2/gp3 only
volume-throughput: 250  # gp3 only (MiB/s)

Design

  • One writer, not two: unified buildRootDeviceMapping composes encryption (encrypt-ebs) and sizing into a single root mapping — replaces the encryption-only buildEncryptedRootMapping.
  • No leaks: DeleteOnTermination: true is always forced (explicitly asserted), even if the AMI set it false.
  • Fail fast: type/iops/throughput combos validated at config parse (iops → io1/io2/gp3; throughput → gp3 only); size-below-AMI-snapshot rejected with both numbers, using the DescribeImages data already fetched for encryption.
  • Zero-diff default: with no encryption and no volume inputs, no BlockDeviceMappings is emitted at all — AMI default preserved byte-for-byte (covered by wantsRootDeviceMapping regression tests).

Tests / build

  • tests/ebs.test.js rewritten for the unified builder (encryption, sizing, compose, DeleteOnTermination, null cases, size-below-snapshot), plus config combo-validation and opt-parsing tests. 128 tests pass (was 108). Lint clean, dist rebuilt (verify-dist green).

Docs

  • README: "Disk space for Docker workloads" note with a recommended gp3 example + inputs-table rows; action.yml descriptions.

Compatibility

  • Existing inputs unchanged; encrypt-ebs-only behavior is byte-identical apart from DeleteOnTermination now being explicit (previously inherited from the AMI, normally already true).

…uts)

The action offered no control over the root volume — instances inherited the
AMI's block-device mapping (Amazon Linux 2023: 8 GiB gp3), which Docker-based CI
exhausts almost immediately ("no space left on device"). New start-mode inputs:

  volume-size       GiB, must be >= AMI snapshot size
  volume-type       gp3 (recommended) | gp2 | io1 | io2
  volume-iops       io1/io2/gp3 only
  volume-throughput gp3 only (MiB/s)

- Unifies the root block-device mapping into a single builder
  (buildRootDeviceMapping) so encryption (encrypt-ebs) and sizing compose in one
  mapping instead of two competing BlockDeviceMappings writers.
- DeleteOnTermination is always forced true so resized/ephemeral volumes never
  leak (explicitly asserted).
- Validation: type/iops/throughput combinations checked at config parse (fail in
  seconds); size-vs-AMI-snapshot checked against the DescribeImages data already
  fetched for encryption, erroring with both numbers.
- Omitted inputs leave the AMI default untouched — no BlockDeviceMappings is
  emitted at all (zero-diff regression covered by wantsRootDeviceMapping tests).

Tests: mapping builder (encryption/sizing/compose/DeleteOnTermination/null cases/
size-below-snapshot), config combo validation, opt parsing (128 tests total).
README "Disk space for Docker workloads" note + inputs table and action.yml
descriptions added.

Closes #44

Signed-off-by: kurok <22548029+kurok@users.noreply.github.com>
@kurok kurok merged commit 293e43c into main Jul 2, 2026
5 checks passed
@kurok kurok deleted the feat/root-volume-config branch July 2, 2026 18:49
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.

Root volume configuration: volume-size / volume-type / iops / throughput inputs

1 participant