Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] Fix an issue with folder iteration during caching. #3211

Merged
merged 3 commits into from
Feb 6, 2022

Conversation

iclanton
Copy link
Member

@iclanton iclanton commented Feb 6, 2022

Summary

Currently, there is an issue with the algorithm that iterates through files that will be passed to tar. If there are fewer than 10 (the folder iteration concurrency) subfolders inside the folders that are to be cached, folders more than two levels deep will not be iterated through, so their files will not be cached. This happens because the iterator completes before any of the tertiary-level folders are added to the queue.

Details

This PR fixes the issue by iterating through each folder level serially instead of trying to add all subfolders to the same queue. This can result in slightly less parallelism, but it will always capture all folders.

How it was tested

Tested on a project with four subfolders inside its lib folder and files more than three levels deep that produced cache entries that are missing files.

@iclanton iclanton merged commit 5c212ab into microsoft:master Feb 6, 2022
@iclanton iclanton deleted the fix-file-collector branch February 6, 2022 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants