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.
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
Add fallback keys to caching #2340
Add fallback keys to caching #2340
Changes from 11 commits
6e474d4
d2a35b6
760caed
2255bb7
742ab53
363c2e0
0e18ba2
1a1c0f8
8b8b0b8
742643a
e8daf98
d6c7671
05bf184
bf30fc5
2473825
42f2ecd
9e8e406
44de426
65b27ff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be useful to add some comments here with some example segments (e.g.
yarn.lock, !node_modules/yarn.lock
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like we discussed, I think there's the potential for a lot of perf problems here. A segment like
**/yarn.lock, !node_modules
will end up iterating thousands of times over files that will never match. Maybe we'll just need to build in more optimizations for scenarios like this over time.Might be nice to show (in telemetry and logs, but maybe just in "debug mode") the # of files enumerated, # of files hashed, and total time. In extreme cases (e.g. 35 seconds to calculate the key), we output a warning in the log, otherwise the user will just think upload/download time is slow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is that
**/yarn.lock
will be expensive query whether we saydir /s *' or
dir /s yarn.lock` because the file system has to enumerate all the directories either way, but yes - definite room for improvement.