Consolidate run_hash and KARVA_RUN_ID into a single identifier#769
Merged
Conversation
Merging this PR will not alter performance
|
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.
Summary
Closes #729. The runner used to mint two identifiers per
karva testinvocation:run_hash(a millisecond timestamp encoded into the cache directory name and used as a sort key forread_recent_durations/prune_cache), andKARVA_RUN_ID(a UUID v4 exposed to test code for log and artifact correlation). Two identifiers doing nearly the same job meant "where do I get the run id?" had two answers.RunHashnow carries both a millisecond timestamp and a UUID v4. The cache directory becomesrun-<ms>-<uuid>so the timestamp prefix preserves the chronological sort that prune and read-recent-durations rely on, andKARVA_RUN_IDbecomes the bare<ms>-<uuid>form, derived from the same source of truth. As a side benefit, dense CI matrices that start multiple runs in the same millisecond no longer collide on the cache directory.from_existingcontinues to accept legacyrun-<ms>directories on disk: a missing UUID falls back toUuid::nil()and an unparseable timestamp falls back to0, so prune cleans those up first rather than panicking.Test plan
ci