-
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(js): unique hash for each execution #14154
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
I don't think the error is related to this change.
|
8bf973d
to
090d10b
Compare
@wSedlacek I rebased and kicked off CI again. We will see if it passes this time. |
Thank you for getting this change in! It means a lot to me! |
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. |
Context
A few weeks ago there was an attempt to make it so that you could invoke more
then one
@nrwl/js:node
per process. This change introduced auniqueKey
inorder to make each execution get unique hashes and thus track the process
independently even if the same
options.args
were provided (such as whenrunning the target but on many different projects)
A bug was introduced with that change, where the
hashedKey
was created as anew array on each invocation and the WeakMap would never match. That was fixed
shortly after by using JSON.stringify()
However, even after that fix the hashes were still not quite unique. The
hashedKeys
stored in thehashedMap
were, but thehashed
which was used tokey the
processMap
would still be the same. In effect this would mean the goalof being able to call
@nrwl/js:node
was still not working.A use case where I am invoking executors like this:
https://github.com/brandingbrand/flagship/blob/main/libs/orchestrate-nx/src/executors/run-all/impl.ts
It is the same idea as the
@angular/devkit:all-of
https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/architect/builders/all-of.ts
Current Behavior
When running more than one
@nrwl/js:node
the process ids will colide causingthe executor to end some processes early and to duplicate others depending on
the order which the
@nrwl/js:node
was called.Expected Behavior
Each call of
@nrwl/js:node
should be unique and track it's processescompletely independently.
Related Issue(s)
#13813
#13908