trivago / parallel-webpack

Builds multi-config webpack projects in parallel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't let SIGINT output errors

yannickguillemot opened this issue · comments

At my organization, we currently parallelize four configs. It has resulted in console outputs multiplied by 4 when building with webpack or starting a watch task.
I managed to make most of the logs silent with the json option. But, when shutting down the process with Ctrl+C (SIGINT), I still get 4 log messages that bleed out in the next prompt.

Worker Farm: Received message for unknown child. This is likely as a result of premature child death, the operation will have been re-queued.
Worker Farm: Received message for unknown child. This is likely as a result of premature child death, the operation will have been re-queued.
Worker Farm: Received message for unknown child. This is likely as a result of premature child death, the operation will have been re-queued.
➜  my-app git:(yg/better-logs) ✗ Worker Farm: Received message for unknown child. This is likely as a result of premature child death, the operation will have been re-queued.

Would it be possible to make those silent as well?

FYI, using the latest release, 1.6.1.

You could set max-retries to 0 which prevents the errors from happening at all. See https://github.com/trivago/parallel-webpack#specifying-retry-limits for documentation.

It'll be adjusted to be the new default as part of #36 and I'd like to generally improve the UI of parallel-webpack as part of #20. Perhaps you can add your requirements there as well?

I tried using --max-retries=0. It does prevent the [WEBPACK] Forcefully shut down [name].js errors to appear which is nice. However, I still see the "Worker Farm" errors appearing. I wonder if there is a way we can have those silent as well.
I am happy to help adding this as a requirememt. It is just unclear how you'd want me to. Just add a comment to #36 and #20?

EDIT: After more testing, --max-retries=0 doesn't seem to silent logs.

I'm getting "Worker Farm: Received message for unknown child...." too with a 4 variation parallel-webpack --watch where regular webpack --watch doesn't have any issues. I'm using nodemon-webpack-plugin. Works fine but these errors are scary and noisy. What do they really mean?