Skip to content
Proud to collaborate with Microsoft for Startups

runner.runner-disk-prune-ec2-vm ​

Run docker-prune and workspace-temp cleanup on a warm-pool EC2 VM runner via SSM. Fire-and-forget hook called from execution-stop to keep disk-pressure flat between jobs (ADR-018).

Run docker-prune + workspace temp cleanup on a single EC2 VM.

Triggered by runner.execution-stop-ec2-vm once the GH job is confirmed finished. The workflow itself does no synchronisation — SSM SendCommand is asynchronous and we don't wait for the in-VM exit, so the workflow completes in a single round-trip per instance. If SSM denies the call (missing IAM, instance offline, not SSM-managed) we log + complete success: the reconcile loop's disk-pressure rule remains the safety net.

Inputs:

  • runner_instance_uuid — DB row identifying the runner to prune. Resolved server-side to get the cloud connection + region.

Outputs (state_data):

  • runner_instance_uuid — echoed back
  • ssm_command_ref — opaque SSM CommandId on success, None on skip / failure
  • status — issued | skipped | failed

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-runners-aws
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
runner_instance_uuiduuidYes—UUID of the RunnerInstance to prune, picked from the organization's (optionally group-scoped) list of instances. Resolved server-side to get the cloud connection + region.

Output Schema ​

FieldTypeRequiredDefaultDescription
runner_instance_uuiduuidNo—UUID of the RunnerInstance that was pruned, echoed from input.
ssm_command_refstringNo——
statusstringNo——
completed_atstringNo——
failed_atstringNo——
failure_reasonstringNo——
errorstringNo——
error_typestringNo——
failed_at_statestringNo——
failed_layerstringNo——
failed_stepstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—prune—
pruningNoNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingprunepruning—
pruningcompletecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "runner.runner-disk-prune-ec2-vm",
  "initial_data": {
    "runner_instance_uuid": "value"
  }
}