<#22421 Allow configuration of concurrency field f...
# github-notifications
c
#22421 Allow configuration of concurrency field for node/javascript processes Issue created by chris-smith-zocdoc Is your feature request related to a problem? Please describe. Certain node based tools require a lot of resources to run, so limiting their concurrency is required on resource constrained systems. In our monorepo we've found this necessary for things like
yarn install
,
tsc
,
webpack
, and
jest
.
concurrency
was introduced in pants 2.27, but its currently only available to the plugin api, and is not exposed to the BUILD targets. Describe the solution you'd like It's unclear to me if any heuristic could be used to infer a required concurrency level from within the nodejs backend automatically. Absent that, we'd either need to • Expose the
concurrency
field to the targets (package_json, node_build_script, javascript_tests, typescript_tests) • Allow a plugin to add provide the concurrency level prior to process execution Describe alternatives you've considered Our current workaround for this is to override/copy the
setup_node_tool_process
rule, which isn't ideal. Additional context Our current machines in CI are 4 cores, setting
"concurrency": ProcessConcurrency.exactly(2)
has been effective so far at both not overscheduling the machines and allowing them to run to completion without running out of ram pantsbuild/pants