feat(serverless): activate a ready app version by number - #103
Conversation
Expose POST /v1/apps/{appId}/deploy so operators can pin or roll back
to a ready version without creating a new build.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team 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.
🟢 Approval recommended
Functionality is covered with targeted client tests and integrates cleanly, with only minor UX/documentation clarity nits noted.
Pull request overview
Adds support for activating (“deploying”) a specific serverless app version by version number, enabling pin/rollback of a ready version via the serverless deploy endpoint and surfacing the accepted app state in CLI output.
Changes:
- Introduces
runware serverless apps versions activate <appId> <versionNumber>and wires it into the versions command group. - Adds
DeployVersionto the serverless API client (POST/v1/apps/{appId}/deploy) with tests covering success, 404, and 409 cases. - Enhances app display output to include
activeVersionId, and updates generated command docs accordingly.
File summaries
| File | Description |
|---|---|
| internal/cmd/serverless/display.go | Adds printing of the app’s active version ID in app detail output. |
| internal/cmd/serverless/display_test.go | Updates app display expectations to include active version ID. |
| internal/cmd/serverless/apps_versions.go | Extends versions command group and adds activate subcommand implementation. |
| internal/api/serverless/client.go | Adds DeployVersion client method and request type alias. |
| internal/api/serverless/client_test.go | Adds tests for deploy version happy path + 404/409 handling + no API key. |
| docs/runware_serverless_apps.md | Updates apps docs to reflect “Manage application versions”. |
| docs/runware_serverless_apps_versions.md | Updates versions group docs and links new activate command. |
| docs/runware_serverless_apps_versions_show.md | Updates “SEE ALSO” label to match new group description. |
| docs/runware_serverless_apps_versions_list.md | Updates “SEE ALSO” label to match new group description. |
| docs/runware_serverless_apps_versions_activate.md | Adds docs page for the new activate command. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The rollback example now activates a lower version number, and the app table labels the UUID as Active version ID. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
runware serverless apps versions activate <appId> <versionNumber>to pin or roll back a ready version viaPOST /v1/apps/{appId}/deployactiveVersionIdand status. Rollout to healthy workers is not waited on