[nextest-runner] add support for reading archives#3012
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for consuming recorded runs directly from portable archive files (.zip) via the -R/--run-id style selector across cargo nextest run (rerun), cargo nextest store info, and cargo nextest replay.
Changes:
- Introduces
PortableArchivereading support and a unifiedStoreReadertrait for reading from either on-disk stores or portable archives. - Adds
RunIdOrArchiveSelectorto allow CLI args to accept either a run ID selector or an archive path. - Extends
store info,replay, and rerun-from-recording flows to operate directly on portable archives, plus new integration coverage.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| nextest-runner/src/record/run_id_index.rs | Adds RunIdOrArchiveSelector parsing/display + unit tests. |
| nextest-runner/src/record/rerun.rs | Adds rerun-outstanding computation path for portable archives. |
| nextest-runner/src/record/replay.rs | Generalizes replay conversion to work with dyn StoreReader (store or archive). |
| nextest-runner/src/record/reader.rs | Introduces StoreReader trait; implements it for RecordReader; exposes shared decompression helper. |
| nextest-runner/src/record/portable.rs | Adds PortableArchive and PortableStoreReader to read portable archives + run logs. |
| nextest-runner/src/record/mod.rs | Re-exports new archive-reading types and constants. |
| nextest-runner/src/record/format.rs | Exposes portable-archive filenames/constants and manifest accessors needed for reading. |
| nextest-runner/src/errors.rs | Adds PortableArchiveReadError and wraps it via RecordReadError::PortableArchive. |
| integration-tests/tests/integration/snapshots/integration__record_replay__store_info_portable_archive.snap | New snapshot for store info output when reading an archive. |
| integration-tests/tests/integration/snapshots/integration__record_replay__rerun_error_invalid_run_id.snap | Updates clap error output to reflect new rerun arg name. |
| integration-tests/tests/integration/record_replay.rs | Adds end-to-end tests for archive-based store info, replay, and rerun-from-archive flows. |
| integration-tests/tests/integration/fixtures.rs | Adds helper to validate output for filtered runs/replays by expected test names. |
| cargo-nextest/src/errors.rs | Wires portable-archive read errors into CLI expected errors + exit codes. |
| cargo-nextest/src/dispatch/utility/store.rs | Enables store info to accept archive paths and run without workspace for archive inputs. |
| cargo-nextest/src/dispatch/utility/debug.rs | Adds debug extract-portable-archive utility for extracting archive contents/metadata. |
| cargo-nextest/src/dispatch/core/tests.rs | Updates CLI parsing tests to accept archive paths for store info / replay / rerun. |
| cargo-nextest/src/dispatch/core/run.rs | Extends --rerun/-R to accept archives and adds rerun resolution from archives. |
| cargo-nextest/src/dispatch/core/replay.rs | Extends replay to accept archives and supports workspace-free archive replay execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e2cae04 to
8d85a54
Compare
db68e6b to
c4540c0
Compare
c4540c0 to
d986e82
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d986e82 to
7998959
Compare
7998959 to
f27b298
Compare
f27b298 to
c319f9b
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3012 +/- ##
==========================================
- Coverage 83.21% 82.98% -0.24%
==========================================
Files 155 155
Lines 41330 42068 +738
==========================================
+ Hits 34394 34909 +515
- Misses 6936 7159 +223 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c319f9b to
0458b82
Compare
0458b82 to
1874347
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add support for the
-Roption tocargo nextest run,cargo nextest store info, andcargo nextest replay.I've already used this to debug a test leak on Windows (#3020).