Repository navigation
Commit 5f150d3
authored
test(e2e): determinism cleanup + e2e performance (workers, 8-core, Chromium cache) (#2655)
Combines the E2E/test-infra determinism work with the e2e performance work — they both tune `playwright.config.ts` and the e2e pipeline, so they ship as one PR.
## What changed
**Determinism**
- Removed the three blind `waitForTimeout` sleeps (replaced with awaited conditions) and resolved the permanently-skipped tests (deleted the dead navigation block, fixed + un-skipped the Kubernetes restarts-sort test, deleted `timeQuery.test.tsx` which can't run without a `nuqs` major upgrade; a genuinely-conditional skip in `sources.spec.ts` stays). Deleting `timeQuery.test.tsx` orphaned `src/fixtures.ts`, the `@jedmao/location` dev dep, and the `getLiveTailTimeRange` export — all removed as verified-dead code.
- Added env-overridable retry counts: `E2E_RETRIES` (Playwright) and `JEST_RETRY_TIMES` (API Jest), for the nightly zero-retry flake hunt.
**Performance**
- Playwright `workers` raised to 4 on CI (via `E2E_WORKERS`), and the e2e shards moved to `8-core-playwright` GitHub-managed larger runners so 4 workers have CPU headroom (4 workers on the old 4-vCPU runner over-subscribed and timed out — validated the 8-core run halves shard time).
- The Chromium binary is cached (`~/.cache/ms-playwright`, keyed on the Playwright version) so it isn't re-downloaded each shard.
- e2e-setup uses `yarn install --immutable`.
## Key decisions
- Both retry knobs and `E2E_WORKERS` parse to a validated integer (retries ≥ 0 honouring an explicit 0 for the flake hunt; workers ≥ 1), falling back to the default on blank/negative/non-numeric input rather than silently coercing to 0/NaN.
- Retries stay on for PRs (pragmatic); the nightly zero-retry hunt is what enforces "a flaky test is a defect".
## Impact
- Faster, less-flaky e2e; retry/worker behaviour tunable via env without code changes.
- Test-infra + CI only — no changeset.
<details>
<summary>Implementation detail</summary>
- Kubernetes test made deterministic via the seed (`restarts = podIdx % 7`) + default `restarts` desc sort. Dashboard save-wait uses the same success-toast locator as sibling tests.
- 8-core-playwright confirmed a GitHub-managed larger runner (ephemeral/isolated — no fork-PR self-hosted RCE surface).
</details>1 parent d667ede commit 5f150d3
13 files changed
Lines changed: 71 additions & 474 deletions
File tree
- .github
- actions/e2e-setup
- workflows
- packages
- api
- app
- src
- __tests__
- tests/e2e
- components
- core
- features
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
45 | 65 | | |
46 | 66 | | |
47 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
2 | 12 | | |
3 | 13 | | |
4 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
| |||
0 commit comments