Files
Alex Langenfeld 3837ca2dad [core] Warm cold e2e targets before the suite starts runs (#3590)
A target answers HTTP well before its first run is picked up promptly,
for two reasons with one shape: a fresh Vercel deployment's queue
consumer takes a while to start delivering, and a local dev server pays
its first flow-route compile on the first queue delivery. The
run-pickup watchdog's telemetry shows the cost - stalls concentrated on
the suite's first test (addTenWorkflow), waitedMs pegged at the full
15s pickup budget, timestamps right at suite start; the sidecar
backends identify local-dev lanes as a dominant source alongside fresh
Vercel deployments. Each stall burns pickup budget inside a test,
drowns the infra telemetry in cold-start noise, and leaves the first
tests one stalled replacement away from failing.

warmDeployment() runs in the suite's beforeAll: it starts throwaway
probe runs, abandoning (best-effort cancelling) any still pending after
the pickup budget, until one is picked up or a total budget
(WORKFLOW_E2E_WARMUP_BUDGET_MS, default 120s) is spent. A warmup that
needed abandoned probes is recorded as a single cold-start-warmup infra
event - one per suite instead of per-test run-pickup-stall noise - and
an exhausted budget proceeds anyway: the per-test watchdog still guards
every start, and test failures carry run diagnostics a thrown warmup
would not.

Signed-off-by: Alex Langenfeld <alex.langenfeld@vercel.com>
2026-08-18 17:00:23 -05:00
..