angular-cn/packages/compiler-cli/ngcc/test/execution
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
..
cluster fix(ngcc): handle `ENOMEM` errors in worker processes (#36626) 2020-04-29 14:28:26 -07:00
tasks/queues refactor(ngcc): rename `TaskQueue#markTaskCompleted()` to `markAsCompleted()` (#36626) 2020-04-29 14:28:26 -07:00
helpers.ts style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
single_processor_executor_spec.ts refactor(ngcc): support running callback before writing transformed files (#36626) 2020-04-29 14:28:26 -07:00
utils_spec.ts refactor(ngcc): expose the TaskDependencies mapping on BaseTaskQueue (#36083) 2020-03-18 15:56:21 -07:00