You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: forward container_runtime from cerebrium.toml to backend (#76)
## Summary
The CLI silently dropped `container_runtime` from `cerebrium.toml`,
which is the knob users have to opt apps into an alternate runtime.
The `ProjectConfig` struct had no field for it, `loader.go` only
handled the `cerebrium.runtime.{custom,deepgram,rime}` sub-tables, and
`ToPayload()` never emitted `containerRuntime` in the create-app
payload. With the field missing from the deploy payload, the backend
cannot honor the user's runtime selection, so apps that opt in
silently fall back to the default.
`git log -S "container_runtime"` on this repo returns zero hits since
the Go rewrite — the field was never ported from the Python CLI. Pair
this with #72 ("remove client-side payload defaults so backend owns
them"): the backend is now authoritative for defaults, so an unsent
field cannot be set any other way from a fresh deploy.
## Changes
- `pkg/projectconfig/config.go`: add `ContainerRuntime *string` to
`ProjectConfig` and emit `payload["containerRuntime"]` in
`ToPayload()` when set
- `pkg/projectconfig/loader.go`: read
`cerebrium.runtime.container_runtime` (coexists with
`[cerebrium.runtime.custom]` and partner sub-tables), validate
against `{v1, v2}` matching the backend's accepted values
- `pkg/projectconfig/loader_test.go`: cover present / absent /
coexists-with-custom-runtime / invalid cases
## Test plan
- [x] `go test ./pkg/projectconfig/...` — all loader cases pass
- [x] `go test ./...` — full suite green
- [ ] Deploy a test app with `container_runtime = "v2"` and confirm
the backend receives the field in the create-app payload
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments