Skip to content

feat(volume): insta compute volume --size attaches when no volume exists - #84

Merged
tonychang04 merged 1 commit into
mainfrom
feat/volume-attach-after-create
Aug 7, 2026
Merged

feat(volume): insta compute volume --size attaches when no volume exists#84
tonychang04 merged 1 commit into
mainfrom
feat/volume-attach-after-create

Conversation

@tonychang04

@tonychang04 tonychang04 commented Aug 7, 2026

Copy link
Copy Markdown
Member

What

CLI half of attach-after-create for compute volumes (backend: InsForge/insta-platform#185, flagged by Tony 2026-08-07 — recreating a service to give it a disk is a gap).

  • The volumeless insta compute volume <name> read now points at insta compute volume <name> --size <gi> (this command) instead of "attach is create-time only: recreate via services add".
  • The PUT result distinguishes a first attachvolume 3Gi attached — mounts at /data on the next deploy — from a grow (volume grown to 5Gi at /data), keyed on the backend's new attached response flag. Older backends omit the flag → grow wording, behavior unchanged.
  • Help text for services add --volume and compute volume updated; no client-side gating added — the backend's 403/400 messages still speak verbatim.

New volumeWriteLine is pure and exported for tests, mirroring volumeLines.

Tests

232/232 green. New: volumeWriteLine attach vs grow (flag false and absent), volumeless read hint points at the attach verb.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LPyX5GsxHvWqLpPYiUCfb5


Summary by cubic

Allow attaching a compute volume after creation via insta compute volume <name> --size, removing the need to recreate services. Improves CLI messages and keeps behavior compatible with older backends.

  • New Features
    • insta compute volume --size attaches when no volume exists; grows otherwise.
    • Volumeless read now points to insta compute volume <name> --size <gi> instead of recreate.
    • PUT result messaging distinguishes first attach vs grow using the backend attached flag (absent = grow wording).
    • Updated help text for services add --volume and compute volume.
    • Exported volumeWriteLine and added tests.

Written for commit d311ef6. Summary will update on new commits.

Review in cubic

…xists

The backend (insta-platform #185) lifted attach-at-create-only: PUT .../volume
on a volumeless compute service now attaches. CLI side: the volumeless read
points at `insta compute volume <name> --size <gi>` instead of "recreate the
service", and the PUT result words a first attach (mounts at /data on the next
deploy) differently from a grow, keyed on the response's `attached` flag
(absent on older backends = grow wording, unchanged behavior).

Help text for `services add --volume` and `compute volume` updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPyX5GsxHvWqLpPYiUCfb5
@tonychang04
tonychang04 marked this pull request as ready for review August 7, 2026 23:48
@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@jwfing jwfing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - approved.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

@tonychang04
tonychang04 merged commit 86d210f into main Aug 7, 2026
2 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.

2 participants