Skip to content
Source
Sign inSign up
TanStack/source

CI queue: pause remote grants while Ravion does not start the jobs it has #1177

OpenAlemTuzlak opened this issue 0 comments
AlemTuzlakcommented

The problem

The remote lane of the CI queue has a fixed cap (ciRemoteJobCap). Ravion's capacity is not fixed: it depends on its hosts and on our AWS quota. When the cap is higher than what Ravion can run, the queue grants slots for jobs whose VMs wait for a host.

On 2026-12-01 the site row ci_remote_job_cap went missing, so the cap fell back to 1,000. The queue granted 102 Ravion slots on 8 hosts (48 vCPU). VMs that came after the claim's 10 minutes were refused. About 30 grants then held their slots for half an hour, until #1175's guard was written: it gives up a VM that never took its claim after 12 minutes.

The numbers

VM start latency of the jobs of TanStack/source that day: each job's first step minus its launch.

LaunchedJobs startedp50p90p95p99maxOver 600 sNever started (failure)
Before 13:0024914 s49 s62 s93 s126 s00
13:00 to 13:46, no cap96462 s581 s593 s605 s606 s413
After 13:46, cap 93521 s575 s575 s607 s607 s11

When Ravion has hosts, a VM starts within about a minute and a half. When it does not, the start time climbs to the claim's 10 minutes.

The proposal

Let the start latency pace the remote lane:

  1. Keep, on each Ravion slot, the time its job started on a VM (started_at on ci_slot_requests, written when the job reports its start).
  2. In the grant pass, give no new remote slot while 3 or more granted Ravion jobs have waited over 120 s for their VM. 120 s is above the normal p99 of 93 s.
  3. The lane goes on by itself once those VMs start.

The cap then stays as a safety limit, and the lane follows what Ravion really runs.

  • Cost: one column, and one count in the pass.
  • Nothing from Ravion: its API gives our key no host capacity; its per-run endpoints answer 401.

When

After #1175 and the moves of the CI cache and surfaces. Today the cap of 9 matches the 8 hosts, so this adds nothing until the AWS quota rises.

Sign in to join this conversation.