Skip to content

feat(serverless): add the hidden volumes management commands - #226

Merged
emmmile merged 4 commits into
mainfrom
feat/runserv-1420-volumes-commands
Nov 30, 2026
Merged

emmmile merged 4 commits into
mainfrom
feat/runserv-1420-volumes-commands

Conversation

@emmmile

@emmmile emmmile commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Adds the management commands for Shared Volumes to the hidden runware serverless volumes group, next to the existing put, built on the published client with no spec change. The group stays hidden: it ships in the binary but not in --help or the generated command reference, and its help says the commands are beta and need Shared Volumes enabled for the organization.

Command What it does
list every Volume in the environment, all pages
create <name> creates an empty Volume, optional --description
show <name> details, plus which app versions use it
update <name> sets or clears the description
delete <name> reads the Volume and all its references first, refuses a Volume in use, and names the app versions that lose their rollback before asking to confirm (--yes confirms in scripts); the help says the API deletes only a Volume with no published files and no app references, and answers 501 otherwise
references <name> the app versions that reference it, all pages
files <name> the latest files, all pages
settings whether the organization has access, and its limits

Choices worth a look:

  • Environment selection follows volumes put: --env/-e (alias --environment), defaulting to RUNWARE_ENV, then the config, then production. Environment variables stay --env-var.
  • files restarts its listing when a later page is refused because an upload completed mid-listing. That loop is now shared with put's own file listing.
  • settings exits 0 when access is off and prints "Enabled: no": the read succeeded, and scripts can check the field.
  • A limit error now prints its fields on the error's first line, which also helps deploy. put keeps its own limit message, which names the limit and its cap.

Written with Claude Code (Claude Opus 5.5).

Add list, create, show, update, delete, references, files and settings
to the hidden serverless volumes group, beside volumes put, on the
client generated from the published spec. The group help says Shared
Volumes are in beta and need them enabled for the organization.

- delete reads the Volume first and sends its id as volumeId, so a
  Volume that takes the name between the read and the delete is never
  deleted
- references follows every page, in references, show and delete, so a
  blocking use on a later page still refuses the delete
- files starts the listing again when a later page answers 400, the
  answer to a cursor issued before an upload completed; it shares that
  loop with the upload engine's file listing

A problem's limit fields (limit, cap, current, requested) now print on
the error's first line. References to a deleted app are marked as such.
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include coderabbit-review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92d59e18-94be-4d6f-9c97-c6c0d2f0b7ac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@emmmile
emmmile requested a review from runware-jack November 27, 2026 16:05
- delete help says which Volumes the API deletes, and a 501 from the
  delete says the same instead of suggesting a retry
- a 404 in an environment the API does not know keeps the API's
  answer instead of reading as a missing Volume
- show marks the uses unavailable when paging them fails, instead of
  printing the pages read before the failure
- files keeps the advice to retry once uploads finish when every
  attempt ends on a stale cursor
Also name production through isProductionEnvironment, as the rest of
the package does.

@leszko leszko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM ✅

Copilot AI balanced review requested due to automatic review settings November 30, 2026 08:49

Copilot AI 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.

🟡 Changes recommended

The Volume error handler rewrites a route-level 404 as a missing-Volume error without establishing that the Volume is absent, potentially misleading users.

1 open issue
What changed in this PR

Adds Shared Volumes management alongside the existing upload command, using the published serverless client without changing the API spec. The command group remains hidden and documents its beta requirements.

Changes:

  • Adds list, create, show, update, delete, references, files, and settings commands with deletion safeguards.
  • Shares file-list pagination and restart handling with uploads.
  • Adds output formatting, clearer limit errors, and command/API regression tests.
File Description
internal/​cmd/​serverless/​volumes.go Registers management commands in the hidden group.
internal/​cmd/​serverless/​volumes_manage.go Implements commands, confirmation checks, and diagnostics.
internal/​cmd/​serverless/​volumes_manage_test.go Tests command behavior, output, pagination, and deletion safeguards.
internal/​cmd/​serverless/​volumes_display.go Formats Volume results for tables, JSON, and YAML.
internal/​cmd/​serverless/​volume.go Adds a shared name-validation error.
internal/​cmd/​serverless/​pack.go Adds GiB and TiB size formatting.
internal/​api/​serverless/​volumes.go Wraps published Volume operations and pagination.
internal/​api/​serverless/​volumes_test.go Tests rejection of incomplete paginated results.
internal/​api/​serverless/​volume_uploads.go Reuses shared file-list restart handling.
internal/​api/​serverless/​errors.go Includes limit details in error headlines.
internal/​api/​serverless/​errors_test.go Verifies limit-error formatting.
internal/​api/​serverless/​environment_test.go Covers Volume operation environment scoping.

Review effort: Balanced

@emmmile
emmmile merged commit 9677768 into main Nov 30, 2026
6 checks passed
@emmmile
emmmile deleted the feat/runserv-1420-volumes-commands branch November 30, 2026 09:02
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.

3 participants