angular-cn/packages/compiler-cli/ngcc/test/execution/cluster
George Kalpakas 4779c4b94a fix(ngcc): handle `ENOMEM` errors in worker processes (#36626)
When running in parallel mode, worker processes forward errors thrown
during task processing to the master process, which in turn exits with
an error.

However, there are cases where the error is not directly related to
processing the entry-point. One such case is when there is not enough
memory (for example, due to all the other tasks being processed
simultaneously).

Previously, an `ENOMEM` error thrown on a worker process would propagate
to the master process, eventually causing ngcc to exit with an error.
Example failure: https://circleci.com/gh/angular/angular/682198

This commit improves handling of these low-memory situations by
detecting `ENOMEM` errors and killing the worker process, thus allowing
the master process to decide how to handle that. The master process will
put the task back into the tasks queue and continue processing tasks
with the rest of the worker processes (and thus with lower memory
pressure).

PR Close #36626
2020-04-29 14:28:26 -07:00
..
executor_spec.ts fix(ngcc): support recovering when a worker process crashes (#36626) 2020-04-29 14:28:26 -07:00
package_json_updater_spec.ts refactor(ngcc): notify master process about transformed files before writing (#36626) 2020-04-29 14:28:26 -07:00
worker_spec.ts fix(ngcc): handle `ENOMEM` errors in worker processes (#36626) 2020-04-29 14:28:26 -07:00