feat(serverless): deploy apps from a container source - #104
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>
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>
Upload a Dockerfile + container.yaml directory as sourceType container so create can build a hosted wrapper image instead of requiring a customer image ref. 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
The container deploy path is consistently integrated end-to-end (pack → upload declaration → app source) with targeted tests and updated CLI/docs, and no correctness issues were found in the reviewed changes.
Pull request overview
Adds support for deploying serverless apps from a “container source” directory (Dockerfile + container.yaml) via runware serverless deploy --container <dir>, wiring the new source type through local packing, source upload declaration, appSource creation, and user-facing docs/tests.
Changes:
- Extend source upload to declare an explicit
sourceType(codevscontainer) and add coverage for container declarations. - Add a container packer that requires
Dockerfile/container.yamlat the archive root and force-includes them even if ignored. - Update
serverless deployto accept either an entry file (code path) or--container(container path), including validations, tests, and docs.
File summaries
| File | Description |
|---|---|
| internal/cmd/serverless/upload.go | Parameterizes uploadSource with sourceType for code/container uploads. |
| internal/cmd/serverless/upload_test.go | Updates existing tests for new signature; adds container sourceType assertion. |
| internal/cmd/serverless/pack.go | Generalizes required-file packing and introduces packContainerDirectory + container file requirements. |
| internal/cmd/serverless/pack_test.go | Adds tests for container packing, ignore behavior, and missing/invalid required files. |
| internal/cmd/serverless/deploy.go | Adds --container deploy mode with mutual-exclusion validation and correct appSource construction. |
| internal/cmd/serverless/deploy_test.go | Covers deploy arg validation, archive building for both modes, and flag registration. |
| internal/api/serverless/client.go | Exposes container-related types/constants and adds NewContainerAppSource. |
| internal/api/serverless/client_test.go | Adds test coverage for NewContainerAppSource and round-trip JSON behavior. |
| docs/runware_serverless_deploy.md | Documents container deploy mode, usage, examples, and option semantics. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
runware serverless deploy --container <dir>to create an app from a wrapperDockerfile+container.yamlarchive (appSource.type = container, uploadsourceType: container).deploy <file>code path unchanged;--containeris mutually exclusive with an entry file,--src-dir,--base-image, and--requirement.container.yaml(400 / 422). There is no--image/imageRef— the platform builds a hosted image and the version records abuildId.