Skip to content

ci: build the test archives without debug info - #584

Merged
MarcusKainth merged 1 commit into
mainfrom
ci/archive-no-debuginfo
Sep 25, 2026
Merged

MarcusKainth merged 1 commit into
mainfrom
ci/archive-no-debuginfo

Conversation

@MarcusKainth

@MarcusKainth MarcusKainth commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

What this changes, and why

Most of a test job's setup time goes to downloading the workspace test archive, and build-tests spends a minute and a half uploading it. The archive is 2.63 GB, and almost all of it is DWARF: a driver test binary is about 465 MB with full debug info and about 9 MB without. This PR builds the archive with CARGO_PROFILE_TEST_DEBUG=0. The variable is set on the build-tests job, so rust-cache keys on it.

A failing test reports the same thing it does now, because the panic message and its file and line come from the panic location, and debug info doesn't carry that. A RUST_BACKTRACE backtrace names functions but gives no lines.

line-tables-only would keep backtrace lines, but it leaves the archive at 860 MB (measurement run 36121287631, below).

Evidence

Measurement (throwaway PR #583, closed)

The same archive command under each setting, one runner per variant. The size is ls -l tests.tar.zst:

run 36121287631, cold cache compile archive
full debug info (main) 10 m 51 s 2,631,156,768 B
line-tables-only 9 m 11 s 862,464,538 B
CARGO_PROFILE_TEST_DEBUG=0 8 m 15 s 186,629,387 B
run 36122853256, warm cache compile archive step upload download
full debug info (main) 6 m 15 s 402 s 78 s 54 s
CARGO_PROFILE_TEST_DEBUG=0 4 m 21 s 264 s 3 s (level 0) 4 s

This PR's CI run 36122982586

Attempt 1 ran with a cold cache, because the new variable changes rust-cache's key. Attempt 2 reran build-tests and its dependents against the cache attempt 1 saved:

Cache Key:
    v0-rust-build-tests-Linux-x64-3f7eabcb-b396b1ba
  - CARGO_PROFILE_TEST_DEBUG
Restored from cache key "v0-rust-build-tests-Linux-x64-3f7eabcb-b396b1ba" full match: true.
    Finished `test` profile [optimized] target(s) in 4m 26s
before: run 36116301376 (main code, PR #580) this PR, attempt 2
test-archives artifact 2,632,939,881 B 191,650,427 B
Archive the suites 448 s 316 s
Upload the archives 83 s 6 s
Download the test archives, per group 33 to 363 s 3 to 7 s
Start the pinned ClickHouse, per group 15 to 18 s 15 to 24 s

Every group passed on both attempts, and ci-passed succeeded.

A panic's location survives debug = 0 (scratch crate, local):

$ CARGO_PROFILE_TEST_DEBUG=0 cargo test -q
thread 'fails' panicked at src/lib.rs:4:5:
assertion `left == right` failed: the value
  left: 2
 right: 3
$ make actionlint zizmor; echo "exit=$?"
No findings to report. Good job! (10 suppressed)
exit=0

Invariants

None. CI build settings only; no SQL and no computation path changes.

Spec impact

  • None. No contract in SPEC.md is touched

Checks

  • make gates: not run locally. CI's lint job ran make lint and every test group passed
  • No AI attribution trailers in the commits

Written mostly by Claude Opus 5.5.

The workspace archive was 2.63 GB (2,631,156,768 bytes), almost all of
it DWARF: a driver test binary is about 465 MB with full debug info and
about 9 MB without. Uploading it took 78 to 83 s and a test job's
download took 33 to 363 s.

With CARGO_PROFILE_TEST_DEBUG=0 the same archive is 187 MB. Line tables
only (line-tables-only) would keep 860 MB. A panic's message and its
file and line come from the panic location, which does not depend on
debug info, so a failing test reports the same thing it reports now.

The variable is set on the job so rust-cache includes it in its key; the
dependencies it restores were built under the same setting.
@github-actions github-actions Bot added the area: ci Workflows, the Makefile, and the scripts they run label Sep 25, 2026
@MarcusKainth
MarcusKainth marked this pull request as ready for review September 25, 2026 11:21
@MarcusKainth
MarcusKainth merged commit 2e14289 into main Sep 25, 2026
35 checks passed
@MarcusKainth
MarcusKainth deleted the ci/archive-no-debuginfo branch September 25, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci Workflows, the Makefile, and the scripts they run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant