Repository navigation
perf(ci): overlap token rotation and reuse server integration builds - #1072
Merged
Merged
Conversation
athvin
force-pushed
the
perf/server-ci-scheduling
branch
from
November 9, 2026 23:03
aecf392 to
03c9f03
Compare
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1071
What
Overlap the real token-rotation wait with the early server integration slice, and run every server integration case in those two existing jobs. Preserve ordered Cargo output and normal compiler-cache keys in the free-runner experiment.
Why
After optimizing DuckDB, server integration became the backend critical path. Its late slice waited 61 real seconds near the end, while server-rest rebuilt the server in a second feature graph. The first ARM experiment also exposed measurement attribution errors despite passing tests.
Proof
make checkpassed locally after refreshing onto83ffb0a7. Both real Postgres/DuckLake slices passed locally with exact coverage matching the original 137 integration results (135 passed, two existing ignored). All 62 CI helper tests, actionlint, workflow-shell and skills gates passed. The full hosted backend gate passed in 3m51s. The selected-package runner passed with 1,051 correctly attributed results. Both real-service slices passed again on83ffb0a7, with the same 137 exact name/status results.Risk & rollback
Only the token-rotation test runs in a separate process; it owns its database and HTTP listeners. Its real clock, production refresh floor and assertions remain intact. Normal required jobs stay on free x86 GitHub runners. Revert this PR to restore scheduling.
Post-merge ledger
Closed by: Codex · session
Codex:01a1bef1-8627-7c21-8a86-6c4743d8906fonMac-46· 2026-11-09T23:22:21Zmainis green with this change on it — blocked — backend run 42717888857 passed on merge50de124ein 4m09s (249s); all 137 integration identities/statuses match local and PR results. Infra and devcontainer passed. Frontend 42717888912 remains red after one failed-shard rerun: the unchanged mobile-Safari marketing volume test fails at line 48. Attributed outside this CI-only diff and tracked in Stabilize marketing audit and volume interaction tests #1074; do not describe the whole pipeline as green.images— n/a — only CI workflows, CI helpers and the profiling reference changed; none matches images.yml push paths.deploy— n/a — no image or deployment inputs changed, so no rollout is triggered. The earlier native-profile change was deployed and verified under perf(ci): optimize DuckDB test execution and eliminate redundant builds #1066.backend-ci-profile.mdrecords profiling, local validation, exhaustive integration coverage, archive/storage decisions and the 3m51s hosted run; it links this ledger for the final 4m09s main result and corrected hardware verdict.Specific to this change
First complete hosted backend run 42715632742 passed in 3m51s versus the preceding merged 4m56s (22.0% faster), or 53.0–55.0% faster than the original 8m11–8m33. Server early / late / rest jobs took 184 / 201 / 112 seconds; both server builds had 100% cache hits and all 137 integration results were retained. Main confirmation follows after merge.
Corrected six-job free-runner comparison: 42718540424, all six jobs passed first attempt on
50de124e. Each had 1,061 identical attributed results, identical compiler/version and coverage digest, zero warm Rust/native misses and zero cache errors. x86 samples 131.557 / 131.230 / 142.074s, median 131.557s; ARM 118.782 / 114.897 / 115.751s, median 115.751s (12.01% faster for this selected-package build/test gate). This falls below the predeclared 15% migration threshold and is not a full-backend ARM result; retain existing free x86 runners. x86 priming also reused every Rust/native object from normal CI; ARM priming populated previously missing Rust objects. Do not compare unlike priming cache states as a hardware benchmark.Main performance confirmation: 4m09s, versus preceding merged 4m56s (15.9% less elapsed time), and original 8m11–8m33 (49.3–51.5% less elapsed time). Together with the full PR run at 3m51s, report approximately four minutes, not a p95 guarantee. Server early/late/rest walls 188/227/142s; early/late execution 67.273/110.460s, both with zero compiler-cache misses.
Local disposable Postgres/RustFS containers and temporary read-only kubeconfig removed; profiling data, logs, symbols and interactive flame graphs retained in
/tmp/er-backend-profile-evidence.Context — coverage and measurements
Follow-up to #1066. That change reduced full backend runs from 8m11–8m33 to 4m42/4m57/4m56 without dropping coverage. The committed backend-ci-profile.md reference contains the profile methodology, alternatives and measurements; final hosted observations are recorded in this ledger.
The runner builds one exact er-server integration artifact, discovers every test and partitions the complete list. Missing services, missing or ambiguous artifacts, a missing rotation anchor, invalid lists, compile errors and failed children fail the gate. A subprocess barrier test proves both early processes start before either waits. The CLI/entity-diff package tests remain unfiltered because their database test names do not all start with pg_. Server lib/bin/doc coverage remains in the ordinary selected-package gate.
Original local early/late/rest execution took 61.523/154.354/10.290 seconds. Final new slices took 62.863/50.842 seconds and exact name/status lists matched all 137 original results. Workstation contention means these are correctness evidence, not a reliable hosted speedup estimate. Hosted full-gate measurements decide adoption.
The initial hardware trial passed all actual tests but two ARM machines rejected misattributed target identities: stderr Cargo headings overtook buffered stdout test output. Merge both streams before relaying and test their ordering. Remove explicit CARGO_TARGET_DIR/CARGO_TERM_COLOR because sccache hashes them even with the normal target path. Guard against a nonstandard environment before deleting only the disposable hosted checkout target. No normal runner architecture changes here.
The fresh optimized compile-once/archive experiment passed 45 jobs with identical coverage, but including producer/transfer cost its median was 202s versus 178s for existing cached builds (13.48% slower). Retain separate builds. Local disk/tmpfs Postgres trials showed no repeatable benefit; preserve ordinary storage and bootstrap coverage.