Skip to content

feat(machine): add --swap-size flag#4736

Merged
dangra merged 2 commits intosuperfly:masterfrom
dangra:feat/machine-swap-size-flag
Feb 10, 2026
Merged

feat(machine): add --swap-size flag#4736
dangra merged 2 commits intosuperfly:masterfrom
dangra:feat/machine-swap-size-flag

Conversation

@dangra
Copy link
Member

@dangra dangra commented Feb 10, 2026

Summary

  • Adds a --swap-size CLI flag to fly machine run, fly machine create, and fly machine update commands
  • Accepts a plain number (in MB) or a human-readable size (e.g. 512mb, 1gb) using helpers.ParseSize with units.RAMInBytes
  • Sets MachineInit.SwapSizeMB on the machine config

Test plan

  • fly machine run <image> --swap-size 512 sets swap to 512 MB
  • fly machine run <image> --swap-size 1gb sets swap to 1024 MB
  • fly machine update <id> --swap-size 256 updates swap size
  • fly machine run <image> --swap-size 0 returns a validation error
  • fly machine run <image> --swap-size invalid returns a parse error

Adds a --swap-size CLI flag that accepts a plain number (in MB) or a
human-readable size (e.g. 512mb, 1gb) and sets MachineInit.SwapSizeMB.
Uses helpers.ParseSize with units.RAMInBytes for consistent size parsing.
@dangra dangra merged commit 1d59304 into superfly:master Feb 10, 2026
7 of 19 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.

1 participant