[nextest-runner] store records in the state dir, not the cache dir#3043
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates nextest's test run recordings from the cache directory to the state directory, which is more semantically appropriate since recordings represent accumulated state that cannot be regenerated, not cache data.
Changes:
- Renamed
records_cache_dirtorecords_state_dirand moved fromcache_dir.rstostate_dir.rs - Renamed
CacheDirErrortoStateDirErrorand updated all error messages - Added automatic one-time migration from
~/.cache/nextest/to~/.local/state/nextest/on Unix systems - Updated all references across the codebase including internal tools and integration tests
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
site/src/docs/features/record-replay-rerun.md |
Updated documentation to reflect new state directory location |
nextest-runner/src/record/state_dir.rs |
Renamed from cache_dir.rs; added migration logic and comprehensive tests |
nextest-runner/src/record/session.rs |
Updated to use records_state_dir and state_dir terminology |
nextest-runner/src/record/mod.rs |
Updated module declarations and exports |
nextest-runner/src/errors.rs |
Renamed CacheDirError to StateDirError and updated error messages |
internal-tools/zstd-dict/src/main.rs |
Updated internal tool to use state directory logic |
integration-tests/tests/integration/record_replay.rs |
Updated test comments and documentation |
cargo-nextest/src/errors.rs |
Updated error type references |
cargo-nextest/src/dispatch/utility/store.rs |
Updated to use records_state_dir |
cargo-nextest/src/dispatch/core/run.rs |
Updated to use records_state_dir |
cargo-nextest/src/dispatch/core/replay.rs |
Updated to use records_state_dir |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3043 +/- ##
==========================================
+ Coverage 83.98% 84.01% +0.02%
==========================================
Files 154 154
Lines 41768 41873 +105
==========================================
+ Hits 35079 35178 +99
- Misses 6689 6695 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The state dir is a more reasonable place to put records, since they're not regenerable. Also add a migration path. This won't affect too many folks but I want to put it in place while the impact is minimal.
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.
The state dir is a more reasonable place to put records, since they're not regenerable.
Also add a migration path. This won't affect too many folks but I want to put it in place while the impact is minimal. I'll remove the migration soon.