feat(serverless): wire stop, resume and delete into the CLI - #94
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Pull request overview
Adds full lifecycle management for Serverless apps to the Runware CLI by wiring stop, resume, and delete to the serverless deployments API (fire-and-forget 202 Accepted), including a safety confirmation flow for deletes and updated command docs.
Changes:
- Replaces stub
serverless apps stop|resume|deletecommands with real implementations that callStopDeployment,ResumeDeployment, andDeleteDeploymentand print the returned deployment. - Adds a TTY-aware delete confirmation prompt (skippable via
--yes/-yor--force), failing early on missing API key. - Extends the serverless API client with lifecycle endpoints plus corresponding tests, and updates generated command docs.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/cmd/serverless/apps.go | Wires stop/resume/delete into the apps command group using the shared logger. |
| internal/cmd/serverless/apps_lifecycle.go | Implements stop/resume/delete commands, shared lifecycle runner, and delete confirmation logic. |
| internal/cmd/serverless/apps_lifecycle_test.go | Adds tests for delete confirmation behavior and delete flag parsing. |
| internal/api/serverless/client.go | Adds Stop/Resume/Delete deployment client calls and a shared acceptedDeployment response handler. |
| internal/api/serverless/client_test.go | Adds lifecycle API tests for happy-path, 404, 409 (where applicable), and no-api-key behavior. |
| docs/runware_serverless_apps_stop.md | Updates command synopsis to reflect real stop behavior (202 accepted, async). |
| docs/runware_serverless_apps_resume.md | Updates command synopsis to reflect real resume behavior (202 accepted, async). |
| docs/runware_serverless_apps_delete.md | Updates synopsis/examples/options to include confirmation behavior and skip flags. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
2141091 to
852e7f4
Compare
Summary
runware serverless apps stop|resume|deleteagainststopDeployment,resumeDeployment, anddeleteDeployment(202 accepted, no wait/poll).--yes/--force; missing API key fails before the prompt.fix/log-request-path).feat/runserv-503still sits on the pre-force-push tip and should not be used.Test plan
go test -race ./internal/api/serverless/ ./internal/cmd/serverless/make lintstop→showuntil stopped →resume→showuntil active →delete --yesMade with Cursor