Repository navigation
Description
Summary
The api-workloads matrix entry of the E2E Tests Core job (defined in .github/workflows/e2e-tests.yml, label filter api-workloads) is flaky on main. The failure mode is always the same: Ginkgo hits the suite-wide TEST_TIMEOUT: 15m (set at .github/workflows/e2e-tests.yml:136) and whichever spec happens to be running at minute 15 gets marked TIMEDOUT, even though that specific spec is fast.
Evidence
Three known timeouts across recent runs, each on a different in-flight spec:
| Job | Spec that was in flight at minute 15 | Spec runtime when cut | Total job runtime |
|---|---|---|---|
| 75356386010 (main) | should track workload through create-list-delete lifecycle |
13.9s | 15m37s |
| 75542020597 (PR) | should delete stopped workloads in a group |
14.2s | 15m35s |
| 75543371734 (PR) | should successfully delete running workload |
5.7s | 16m13s |
Successful runs vary widely: 3m22s, 3m47s, 4m00s, 5m02s, 5m17s, 5m34s, 11m54s, 14m40s. The slowest successful run sat 20 seconds under the cap. Any runner-side jitter (image-pull latency, kind cold start, runner CPU contention) tips it over.
Why it's flaky
TEST_TIMEOUT: 15mis shared across all 11 matrix entries (api-workloads,api-clients,api-misc,api-registry,core,mcp-run,mcp-protocol,proxy,middleware,vmcp,llm).api-workloadsis by far the heaviest — it owns 56Itblocks acrosstest/e2e/api_workloads_test.goandtest/e2e/api_workload_lifecycle_test.go, each spinning up containers via the REST API. The sisterapi-miscandapi-registrysuites finish in ~2m because they don't manage container lifecycle.- Container/image lifecycle dominates the runtime. Most of the time is in Docker image pulls and container startup, which the suite doesn't control.
- No per-spec timeout — Ginkgo's suite-wide timeout marks an arbitrary spec, making the failure look like spec-level flakiness when the real cause is budget pressure.
Mitigation options (pick one or combine)
- Per-entry
TEST_TIMEOUT: bump onlyapi-workloadsto e.g. 25m via the matrix include, keep the others tight. - Split the suite:
api-workloads-createandapi-workloads-lifecycleas two parallel matrix entries. - Flake retries:
--flake-attempts=2(Ginkgo flag) for theapi-workloadslabel only, so one slow run doesn't fail the PR. - Image warm-up audit: the workflow already pre-pulls some images (
e2e-tests.yml:127-130filtersosv-mcp|gofetch|egress-proxy|yardstick); verify every image the workload suite touches is in that list — any miss falls inside the spec's 60s API timeout and looks like a stall.
Out of scope
- Refactoring individual
Itblocks for speed. The suite shape is reasonable; the budget is what's wrong. - Migrating to a different runner type. Current
ubuntu-8cores-32gbis appropriate.
Repro pointers
- Workflow:
.github/workflows/e2e-tests.yml(E2E Testsreusable workflow, called fromrun-on-pr.ymlandrun-on-main.yml) - Tests:
test/e2e/api_workloads_test.go,test/e2e/api_workload_lifecycle_test.go - Affected label:
api-workloads - Most recent failures: search for
E2E Tests / E2E Tests Core (api-workloads)jobs withconclusion: failure
Triage history
Surfaced during review of #5233 (the PR was unaffected — runtime came in at 3m47s, but the flake pattern is independent of any code change and reproducible on main).
Activity
Split api-workloads E2E suite into parallel entries (#5275)