-
Notifications
You must be signed in to change notification settings - Fork 26.3k
ngcc: new cluster worker entry-point #36637
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
Closed
petebacondarwin
wants to merge
12
commits into
angular:master
from
petebacondarwin:ngcc-worker-entry-point
Closed
ngcc: new cluster worker entry-point #36637
petebacondarwin
wants to merge
12
commits into
angular:master
from
petebacondarwin:ngcc-worker-entry-point
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52c8f72
to
441dae7
Compare
…angular#36569)" This reverts commit 66effde.
78c8abb
to
e22f60b
Compare
gkalpak
approved these changes
Apr 16, 2020
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.
Yay! 🎊 👌 💯
packages/compiler-cli/ngcc/src/locking/lock_file_with_child_process/index.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/ngcc/test/execution/cluster/package_json_updater_spec.ts
Outdated
Show resolved
Hide resolved
The change in e041ac6 to support sending unlocker process output to the main ngcc console output prevents messages require that the main process relinquishes the event-loop to allow the `stdout.on()` handler to run. This results in none of the messages being written when ngcc is run in `--no-async` mode, and some messages failing to be written if the main process is killed (e.g. ctrl-C). It appears that the problem with Windows and detached processes is known - see nodejs/node#3596 (comment). But in the meantime, this commit is a workaround, where non-Windows `inherit` the main process `stdout` while on Windows it reverts to the async handler approach, which is better than nothing.
c3b5dfb
to
9932209
Compare
The `main.ts` and `worker.ts` had duplicate logic, which has now been moved to a single function called `getSharedSetup()`.
9932209
to
ee34b76
Compare
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The change in e041ac6 to support sending unlocker process output to the main ngcc console output prevents messages require that the main process relinquishes the event-loop to allow the `stdout.on()` handler to run. This results in none of the messages being written when ngcc is run in `--no-async` mode, and some messages failing to be written if the main process is killed (e.g. ctrl-C). It appears that the problem with Windows and detached processes is known - see nodejs/node#3596 (comment). But in the meantime, this commit is a workaround, where non-Windows `inherit` the main process `stdout` while on Windows it reverts to the async handler approach, which is better than nothing. PR Close #36637
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The `main.ts` and `worker.ts` had duplicate logic, which has now been moved to a single function called `getSharedSetup()`. PR Close #36637
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The change in e041ac6 to support sending unlocker process output to the main ngcc console output prevents messages require that the main process relinquishes the event-loop to allow the `stdout.on()` handler to run. This results in none of the messages being written when ngcc is run in `--no-async` mode, and some messages failing to be written if the main process is killed (e.g. ctrl-C). It appears that the problem with Windows and detached processes is known - see nodejs/node#3596 (comment). But in the meantime, this commit is a workaround, where non-Windows `inherit` the main process `stdout` while on Windows it reverts to the async handler approach, which is better than nothing. PR Close #36637
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
matsko
pushed a commit
that referenced
this pull request
Apr 16, 2020
The `main.ts` and `worker.ts` had duplicate logic, which has now been moved to a single function called `getSharedSetup()`. PR Close #36637
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: merge
The PR is ready for merge by the caretaker
cla: yes
refactoring
Issue that involves refactoring or code-cleanup
target: patch
This PR is targeted for the next patch release
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.
This refactoring simplifies the clustering by providing a new entry-point file for cluster workers.
This reduces the complexity of the code (not having to check for
cluster.isMaster
so much) and also removes the need to do parse and execute as much code in the worker processes.