Bug or feature? Independent parallel builds sometimes throw eperm errors related to file-map.json #29333
Unanswered
JonMarbach
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm starting this as a discussion, but it could become a bug report depending on the responses here...
After upgrading from a very old version of nx (v10) to 19.4.4, our CI/CD server (GitLab) is reporting sporadic errors like this:
error : EPERM: operation not permitted, rename <path to workspace>\.nx\workspace-data\file-map.json~0208b8a5 <path to workspace>\.nx\workspace-data\file-map.json~0208b8a5 -> <path to workspace>\.nx\workspace-data\file-map.json
My hypothesis for this is that this is caused by separate builds running in parallel - but this parallelism is something we are doing outside of nx (the builds are triggered by CMake because they are part of a larger project.) The targets are independent of one another, but since they live in the same monorepo, they share a .nx folder. My guess is that separate instances of nx are simultaneuosly updating the file-map.json and clashing. In case it's relevant, I am using the package-json plugin for project discovery.
(If you are wondering why I am using 19.4.4 it's because I was having trouble with projects not being found and I had seen a few bug reports all saying that 19.4.4 is the last version that worked for them.)
I am trying out the run-many feature to regain parallelism but what we lose is that we now need to build all of our projects via a single CMake target which is overkill.
Thoughts are welcome!
Beta Was this translation helpful? Give feedback.
All reactions