-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(core): ensure external dependency hashes are resolved in a deterministic way #17926
fix(core): ensure external dependency hashes are resolved in a deterministic way #17926
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 9cd8f87. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
443d9bb
to
879e3ed
Compare
The regression has been introduced by #16926. This issue is preventing us to upgrade to 16.4.x, since our build cache no longer works correctly, and even without changing anything, the build needs to re-execute nearly all targets. |
Since @meeroslav is the author of the pull request, i am going to mention him. |
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.
Looks good to me
Have you pinpointed where (and why) exactly is the error happening on CI? The proposed PR looks ok, and I think it improves accuracy, but I don't see any evidence supporting that this would actually fix the linked problem. |
@meeroslav i have added a test which fails if the patch is not applied. The hashed value of appB was dependent if appA was hashed prior to it. |
879e3ed
to
910d943
Compare
Rebased and applied requested changes in the fixup commit. |
…inistic way External dependency hashes were not deterministic and could cause cache misses, since the hash was dependent on which task was hashed when. This was caused by the externalDepsHashCache which was filled with values which are dependent on the visited set. Fixes nrwl#17917
… deterministic way
… deterministic way
910d943
to
9cd8f87
Compare
Hi @meeroslav i have rebased again and applied requested changes in the 2nd fixup commit. |
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.
Looks good! Thank you!
Thank you for making the changes! LGTM 🎉 |
@FrozenPandaz thank you for the feedback and for merging this, do you have any estimate on when this will be released? |
Betting this will fix the caching problems I have observed as well since 16.2.x, and reported in #17081 |
@skrtheboss we are planning a patch today |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
External dependency hashes are not deterministic and could cause cache misses, since the hash is dependent on which task was hashed when.
Expected Behavior
Task hashes should not depend on which task have been hashed earlier.
Related Issue(s)
Fixes #17917