Skip to content

perf(ci): split the DuckLake e2e tier into parallel legs behind a same-name gate - #388

Merged
athvin merged 1 commit into
mainfrom
bm/ci-shard-ducklake-e2e
Nov 2, 2026
Merged

athvin merged 1 commit into
mainfrom
bm/ci-shard-ducklake-e2e

Conversation

@athvin

@athvin athvin commented Nov 2, 2026

Copy link
Copy Markdown
Owner

What

The 30m DuckLake + extensions e2e job becomes three jobs:

  • lake-e2e — er-cli alone, two cargo nextest --partition hash:N/2 legs. No postgres service: er-cli's tests never touch pg (the lake catalog is a DuckDB file under a per-test er_cli_{tag}_{pid} temp dir — which is also what makes process-per-test safe).
  • ducklake-e2e — dedupe-cli + er-server + er-entity-diff + the extensions step, unchanged mechanics. The pg suite stays on plain cargo test deliberately (in-process coordination around the shared service database).
  • ducklake-gate — non-matrix, carries the old job's exact name:, so the required context "DuckLake + extensions e2e" keeps reporting with zero branch-protection edits (same pattern and reasoning as infra.yml's plan-gate; matrix per-leg names can never be required — feat(ci): four gh-aw agentic workflows, on the judgement CI cannot do #359).

Why

Run 41461727505 decomposed the tier: 2m16s build at a 100% sccache hit rate, then ~22m of test binaries running serially — er-cli's suite 888s (lake_e2e = 40 tests / 13.8m), er-server's 419s. Compile is solved; serialization is the wall. A second runner now costs ~5m of setup+build (S3-era price) to take ~15m off the wall: expected ~30m → ~15m for ~+10 runner-minutes.

nextest here even though the test job measured it out (357s→453s): that tax is process-per-test on thousands of tiny tests; this suite averages ~21s/test, and the recorded A/B on this very job was 15.5m cargo vs 15.2m nextest. Hash partitioning auto-assigns new tests to a shard — the filter-list failure mode (a new test silently in no leg) cannot happen.

Also

Retires prose the sccache-S3 move left stale: rust.yml:38 ("GHA backend"), sccache.tf ("NOT APPLIED YET" — applied 2026-10-28/29, live since #350), build-cost.md ("Next step: sccache on S3" → shipped section + the split's before-numbers), SKILL.md (GHA-backend eviction claim, "only job with disk-reclaim"). required-checks.md regenerated by scripts/skills-check.sh.

Verification

  • This PR's own run exercises the new legs and the gate reports under the old context name.
  • Completeness: lake shard test counts must sum to er-cli's 44 e2e + lib unit tests; shard logs must show minutes of real execution (the DEDUPE_E2E_DUCKLAKE gate is a runtime skip — a mis-enved leg would go green in seconds).
  • Per-leg after-numbers get appended to build-cost.md once runs land.

🤖 Generated with Claude Code

…e-name gate

The 30m job was 2m16s of build (sccache S3, 100% hits) and ~22m of test
binaries running one after the other — er-cli's lake suite 888s, then
er-server's 419s (run 41461727505). Now: `lake-e2e` runs er-cli alone as two
nextest hash partitions (no postgres service — er-cli's tests never touch pg),
`ducklake-e2e` keeps dedupe-cli + er-server + er-entity-diff + the extensions
step, and `ducklake-gate` carries the old job's exact name so the required
context "DuckLake + extensions e2e" kept reporting and branch protection never
changed. Expected wall: ~30m -> ~15m for ~+10 runner-minutes.

nextest, though the `test` job measured it out: that tax is process-per-test on
thousands of tiny tests; this suite is 44 tests averaging ~21s (recorded A/B on
the combined job: 15.5m cargo vs 15.2m nextest), and hash partitioning
auto-assigns new tests to a shard, so the filter-list failure mode (a new test
in no leg) cannot happen. The pg suite stays on plain `cargo test` — its tests
coordinate around the shared service database in-process.

Also retires three pieces of prose the sccache-S3 move left stale: rust.yml's
header still said "GHA backend", sccache.tf still said "NOT APPLIED YET"
(applied 2026-10-28/29, live since #350), and build-cost.md/SKILL.md still
carried S3 as the next step. The new build-cost.md section records the split's
before-numbers; per-leg after-numbers get appended once the first runs land.

Co-Authored-By: Claude Fable 5 <[email protected]>
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

terraform plan

291f115 · run log and full plans

env add change destroy
state-backend (plan only) 0 0 0
core 0 0 0
dev 0 0 0
prod 0 0 0

Planned with -refresh=false, so this is the config-versus-state diff and
not out-of-band drift. That is a security choice, not a speed one: a refreshing
plan reads secret values, and the plan role is assumable from any PR branch —
which can edit the workflow it runs under. Drift is caught at apply time, which
refreshes fully.

@athvin
athvin merged commit da6dc87 into main Nov 2, 2026
30 checks passed
athvin added a commit that referenced this pull request Nov 2, 2026
…titions to three (#394)

The server leg (14.7m) was the e2e tier's floor after the #388 split: build,
then er-server's 419s suite, then the extensions step's second build. Two
slices now run in parallel — `pg` (er-server's pg_* modules, complementary by
module-name prefix) and `rest` (dedupe-cli + er-entity-diff unfiltered, since
their Postgres tests carry non-pg_ fn names a filter could silently drop;
er-server's remaining targets with the complementary --skip; extensions).

The lake partitions go 2 -> 3: the first hash run landed 518s/274s of test
execution — count-balanced, duration-skewed — and three put the expected leg
under the server slices' wall. Expected tier wall ~15m -> ~11m; the gate's
`needs` is unchanged (the matrix aggregate covers both slices).

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
athvin added a commit that referenced this pull request Nov 2, 2026
…ngs (#395)

The after-numbers for #388/#389/#391/#393/#394: PR wall ~32-35m -> ~13.5m,
per-leg breakdowns, the completeness checks that were run rather than
assumed, the remaining floors (er-server's pg suite at 423.8s, hash
lumpiness, playwright shard 2) and the deliberate minutes cost. Plus two
findings: a lock-touching PR runs cold until merge by design (read-only
sccache role), and the disk-reclaim step stays on every leg by measurement
(15G free at boot, ~7G/~2G margins without it).

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
@athvin
athvin deleted the bm/ci-shard-ducklake-e2e branch November 2, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants