Repository navigation
Closed
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Description
Parent
What to build
ci-fargate and ci-fargate-spot work end to end for any size and architecture. A job carrying either label gets one fresh Fargate task, which runs that job and exits.
- Label contract: the two capacity labels join it. Picking one is the job's promise not to use Docker (ADR-0001).
- Stack:
- one ECS cluster with the
FARGATEandFARGATE_SPOTcapacity providers; - x64 and arm64 task definitions using the ECR image, an execution role that may only pull that repo and write the log group, no task role, and 50 GB of ephemeral storage;
- logs to
/ecs/<stack>-runner, kept 7 days.
- one ECS cluster with the
- Launcher:
- calls
RunTaskwith the capacity provider, task-level cpu/memory for the size, and the JIT config in a container override; - public IP on, in the stack's subnets and security group, leaving out any
use1-az3subnet for arm64; - tags tasks with the same
ci-runner:*tags as instances.
- calls
- Budgets: tasks count against the new
FargateSpotVcpuCap(24) andFargateVcpuCap(8). - Idle exit: an entrypoint wrapper in the image stops a runner that has had no job for 15 minutes. EC2 keeps its host script.
- Roles: the launcher's role gains only
ecs:RunTaskon the two task definitions,iam:PassRoleon the execution role, and tagging on create.
Acceptance criteria
- Webhook tests: both labels are accepted with every size and architecture.
- Launcher tests:
- the
RunTaskcall per capacity, size and architecture; - the arm64 subnet exclusion;
- budgets summed across tasks;
- a failed
RunTaskremoves its registration and fails the message, as the EC2 path does.
- the
- Tests that need real ECS shapes use
aws/aws-emulator. - Inside a task, the metadata endpoints give no AWS credentials.
- The smoke test checks the idle-exit wrapper with a short timeout.
- Proven live: one job on each Fargate capacity runs. A task whose job went elsewhere exits on its idle timeout.
- README,
docs/stack.mdand the runbook cover the Fargate capacities. The traps table covers "Docker used on Fargate" and "Fargate quota at its default".
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Activity
Merge ticket #29: Fargate capacities, live proof pending
Merge ticket #29: Fargate capacities (PassRole boundary, idle-exit fix)
sodre commentedon Nov 14, 2026
Live (integration c6a2d74, after PR #36 published the fixed wrapper): hand-run task with IDLE_SECONDS=120 logged
no job within 120s, stoppingand was STOPPED ~145 s after start (exit 143); a canary task whose job went elsewhere stopped at the default 900 s. Earlier: one job each on ci-fargate-spot and ci-fargate (canary run 43551343087), no AWS credentials in a task, iam:PassRole fixed via ZAEPowerUserBoundary on the launcher role.