Previews and rollbacks
Deploy a preview version, test it against real data, then promote it.
When people already use a service, do not deploy straight to production. Deploy a preview, call it, and promote it when it passes.
Versions
- Every deploy is one immutable version. The service keeps the last 50.
- A version with a build error is never deployed; the running version stays.
- Stack traces point to
service.js:<line>:<column>of your code.
Deploy a preview
{ "service": { "code": "...", "preview": true }, "call": { "name": "task:complete", "args": { "id": "62e757cc63f9" } } }- The preview is added as a version but does not replace the running one. A
callin the same request runs on the preview. - The preview has its own URL:
https://openthink.app/api/svc/<project>@<version>/…. - Only people who manage the service can call a preview, with their session or personal access token, even on public routes.
thk_keys cannot.
Promote or roll back
{ "service": { "promote": "<version>" } }Promoting points the service at that version without rebuilding. The same call rolls back to an earlier version.