-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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): atomic writes of nxdeps.json #12920
fix(core): atomic writes of nxdeps.json #12920
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
When writing nxdeps.json prevent parallel processes from seing half-written files and prevent half written files to be left in case of process crash tob The issue marked as closed by this has not been reproducible, so this fix was done based only on reading the issue description and code inspection. It may be that the problem is caused by something else, but even if this PR turns out not to solve the problem it introduces very little complexity, and should be completely safe, and with some likelyhood will solve or at least improve the issue If the problem persists this change will log some info about the error that occurred but will proceed without saving the cache ISSUES CLOSED: nrwl#9146
ef8432c
to
6837280
Compare
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.
Changes look good to me. Rebased it and rerunning the tests to see if they pass.
May also fix #12389? |
Yes, that should also be fixed. 🤞 |
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
The issue #9146 describes how Nx will now and then experience errors because of invalid
nxdeps.json
file.Expected Behavior
When writing nxdeps.json prevent parallel processes from seing half-written files and prevent half written files to be left in case of process crash tob
The issue marked as closed by this has not been reproducible, so this fix was done based only on reading the issue description and code inspection.
It may be that the problem is caused by something else, but even if this PR turns out not to solve the problem it introduces very little complexity, and should be completely safe, and with some likelyhood will solve or at least improve the issue
If the problem persists this change will log some info about the error that occurred but will proceed without saving the cache
Related Issue(s)
Fixes #9146