Repository navigation
fix: Hash tracked outputs as task inputs - #14831
Open
anthonyshew wants to merge 1 commit into
Open
anthonyshew wants to merge 1 commit into
anthonyshew wants to merge 1 commit into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Description
Closes #14820.
A tracked file can match a task's
outputswithout matching its explicitinputs. Editing and committing that file leaves the task hash unchanged, so a cache hit can overwrite the edit with older bytes.Include Git-tracked output files in the task's file hashes. Respect output exclusions and keep untracked generated outputs out of the added input set. Include output patterns in hash deduplication so tasks with different outputs do not share the wrong file hashes.
calculate_file_hashes file_hashes_for_inputs + SCM::get_tracked_output_hashesDeferred input hashing retains these tracked-output hashes.
Testing Instructions
The new caching regression warms the cache, commits an edit to
dist/LICENSE, and requires a cache miss with a different hash. It then deletes the untracked generated artifact and checks that a cache hit restores the artifact without changing the committed LICENSE.Additional regression cases cover output exclusions, distinct output selections, staged and deleted files, nested repository roots, and deferred inputs.