Open
Conversation
Open
Contributor
|
This looks way better, than mine simple solution + test coverage added. |
This was referenced Mar 15, 2026
c5d3920 to
d19a73f
Compare
Author
|
@trulede I have refactored this PR to only have the task fingerprinting fix. |
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.
Task Fingerprinting Bug
The first commit in this PR fixes a bug where two task invocations (such as in a for loop) inadvertently where writing the checksum or timestamp files for the task to the same location even though the tasks were executed with different arguments causing them to have different sources.
Reproduction
echo 1 >1.in && echo 2 >2.intask copycopy:singleonce for each *.in fileecho 2.2 > 2.incopy:singletask twice again with neither showing as up to date.Because only 2.in was changed, I was expecting the task to show one copy:single task as up to date and then re-copy 2.in to 2.out.
Fix
Instead of writing out the checksum/timestamps to a single file within the respective directory, the task is first fingerprinted. So instead of the
copy:singletask here recording the checksum/timestamp in a singlecopy-singlefile, it will take a hash of the normalized task name, working directory of the task and the declared sources/generates and store the checksum incopy-single-<hash>. This allows each distinct invocation of the sub-task with different arguments to independently manage whether it is up to date.Previously this PR also contained another fix but that has since been rolled into #2743