Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-runners
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
runner_instance_uuiduuidYes—UUID of the RunnerInstance to evict, picked from the organization's (optionally group-scoped) list of instances.
reasonstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
runner_instance_uuiduuidNo—UUID of the RunnerInstance that was evicted, echoed from input on output.
runner_group_uuiduuidNo—UUID of the RunnerGroup the evicted instance belongs to, picked from the organization's list of runner groups.
previous_statusstringNo——
outcomestringNo——
statusstringNo——
completed_atstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——
reasonstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—evict—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingevictcompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "runner.instance-evict",
  "initial_data": {
    "runner_instance_uuid": "value"
  }
}