Promote to production¶
Promote transitions a draft Workload to production in place. The Workload keeps its identity, endpoint, and configuration; only the lifecycle policy changes—from ephemeral (an 8-hour TTL that auto-terminates the Workload) to persistent (indefinite). Statistics are wiped so production starts from a clean baseline.
How promote works¶
POST /workloads/{workload_id}/promote:
- Locks the draft artifact (it becomes immutable).
- Assigns a version number to the artifact.
- Resets Workload statistics.
- Records the event in replacement history.
- Removes the 8-hour draft TTL.
Issue the promote request against the draft Workload to lock its artifact and clear the TTL.
curl -X POST "${DATAROBOT_ENDPOINT}/workloads/${WORKLOAD_ID}/promote" \
-H "Authorization: Bearer ${DATAROBOT_API_TOKEN}"
promote does not set importance. Adjust it before or after via PATCH /workloads/{workload_id}:
curl -X PATCH "${DATAROBOT_ENDPOINT}/workloads/${WORKLOAD_ID}" \
-H "Authorization: Bearer ${DATAROBOT_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"importance": "high"}'
Design principle¶
Promote preserves identity. Only lifecycle policy changes.
| Preserved | Details |
|---|---|
| Workload ID | Same identifier before and after promote. |
| Invoke endpoint | Same URL for client traffic. |
| Sharing settings | Same sharedRoles and collaborators. |
| Configuration | Same Workload and runtime configuration aside from lifecycle semantics. |
| Property | Before (draft) | After (promoted) |
|---|---|---|
| Artifact status | draft (mutable). |
locked (immutable, versioned). |
| Workload lifetime | 8-hour TTL. | Indefinite lifetime. |
| Statistics | Development stats. | Wiped to a clean baseline. |
| Workload ID | Same. | Same. |
| Invoke endpoint | Same. | Same. |
| Monitoring | Full suite. | Full suite (unchanged). |
importance |
Same value (set independently). | Same value (set independently). |
Iterate after promote¶
Once the artifact is locked, the spec is immutable. To ship a new version, choose one of the following paths:
| Path | When to use it |
|---|---|
| Replace with a new locked artifact | Ship a new immutable image or spec without changing the Workload identity or endpoint. See Replace and roll out. |
| Fork into a new draft artifact | Continue iteration after lock when you need a fresh draft lineage. |