feat(sandbox): custom disk sizing + fix stop→/stop parity - #91
Merged
Conversation
Previously the only way to set disk was the full --cpu/--memory/--disk triple, and it had to match a named size exactly - so there was no way to ask for, say, 20 GB on a small shape. The natural '--size small --disk 20gb' errored. Disk is a floor the platform grows the rootfs to; vCPU and memory are pins that name the shape. So --disk now overrides the disk on top of any size, --cpu and --memory still pin the shape, and vCPU/memory that name no shape (or a disk the server rejects) fail with a specific message instead of being guessed at here. Tests: 38 pass, incl. the new '--size small --disk 20gb' case.
`miosa sandbox stop` posted to /sandboxes/:id/pause, so the command named "stop" performed a pause. The backend has a distinct /stop transition that accepts from running OR paused (pause accepts only running), preserves the filesystem, and returns the paused state. Pointing stop at /stop makes the command match its name and the account state the user sees, and lets stop work on an already-paused sandbox instead of 409-ing. Test updated to assert the /stop endpoint.
Bumps above npm's current 1.1.18 (which was published from an uncommitted version) so this release moves the latest tag and ships the disk-sizing + stop-parity fixes rather than a stale, lower number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two sandbox CLI fixes.
1. Custom disk sizing (
--diskcombines with--size)miosa sandbox create --size small --disk 20gbnow works. The--diskvalue acts as a floor over the shape selected by--size: it can only grow the disk beyond the size's default. vCPU and memory continue to pin the shape from--size(they are not changed by--disk). This lets a caller keep a shape's compute profile while requesting more disk.2.
stopnow posts to/stop(parity fix)miosa sandbox stopnow posts toPOST /sandboxes/:id/stop. It was wrongly posting to/pause, so a command namedstopactually performed a pause — the account/resource state did not match what the user asked for. This aligns the verb with the endpoint.Tests
38/38 passing in
test/commands/sandbox.test.ts.