apphost.release.rollback
Roll a hosted site back to a previously published release: verify the immutable S3 prefix is still servable, repoint active_release_uuid, and flip the CloudFront KVS routing entry.
Roll a hosted site back to a previously published release.
Inputs:
- site_uuid: the HostedSite (required)
- release_uuid: target HostedRelease; default = most recent published release older than the active one
Outputs: site_uuid, release_uuid, url, rolled_back_from_release_uuid
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-apphost |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | Yes | — | HostedSite UUID. |
release_uuid | uuid | No | — | Target HostedRelease UUID. Default: the most recent published release older than the currently active one. |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | No | — | HostedSite UUID. |
release_uuid | uuid | No | — | Release now being served. |
url | string | No | — | Public serving URL for the site. |
rolled_back_from_release_uuid | uuid | No | — | Release that was active before the rollback (if any). |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
reason | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Rollback request accepted; will validate and repoint |
completed | No | Yes | Yes | — | Site repointed; KVS routing flipped to the target release prefix |
failed | No | Yes | No | — | Rollback rejected or an AWS call failed; nothing committed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | Validate target release, repoint active_release_uuid, flip KVS routing |
* (any state) | fail | failed | Rollback moves to failed |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
rolled_back | SUCCESS | Site repointed to a previously published release | site_uuid, release_uuid, url |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.release.rollback",
"initial_data": {
"site_uuid": "value"
}
}