runner.instance-evict
Drain a single runner instance (PENDING/IDLE/BUSY → DRAINING). Org-scoped. Reason is recorded on the transition event. Idempotent on already-terminal instances.
Drain a single instance.
Surgical removal — used for debugging stuck instances or removing one rogue VM from a healthy pool. The instance enters DRAINING immediately; if it's BUSY, the current job completes first. The next sweep terminates it. Replacement happens via the normal scale-check loop (sweep → terminate → drop below floor → top-up).
No-op (returns already_terminal) on instances already in DRAINING / FAILED / TERMINATED so re-running is safe.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-runners |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
runner_instance_uuid | uuid | Yes | — | UUID of the RunnerInstance to evict, picked from the organization's (optionally group-scoped) list of instances. |
reason | string | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
runner_instance_uuid | uuid | No | — | UUID of the RunnerInstance that was evicted, echoed from input on output. |
runner_group_uuid | uuid | No | — | UUID of the RunnerGroup the evicted instance belongs to, picked from the organization's list of runner groups. |
previous_status | string | No | — | — |
outcome | string | No | — | — |
status | string | No | — | — |
completed_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
reason | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | evict | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | evict | completed | — |
* (any state) | fail | failed | — |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "runner.instance-evict",
"initial_data": {
"runner_instance_uuid": "value"
}
}