Repository navigation
build: limit concurrency of workspace scripts to CPU cores - #47
Merged
Merged
Conversation
Coverage Report for CI Build 37476535826Coverage remained the same at 93.859%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This was referenced Oct 6, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The root scripts run through
pnpm -r --parallel, which disregards the concurrency limit together with the topological order and starts the script in every selected package at once, however many cores the machine has.What
pnpm -r --no-sortinstead. Packages still run without the topological order, as before, but no more of them run at once thanworkspaceConcurrencyallows.pnpm-workspace.yamlsetsworkspaceConcurrency: 0, which pnpm reads as the number of CPU cores. Without it the limit would be the default of pnpm,min(4, cores).Notes
workspaceConcurrencyis a setting of the workspace rather than a flag of these scripts, so the other recursive commands of pnpm follow it too. On a runner with 4 vCPUs it equals the default.--no-sortas with--parallel, and no more scripts run at once than there are cores. In this repositorypnpm config get workspaceConcurrencyreads the setting back. The scripts themselves run in CI."linkDirectory" in the lockfile (true) doesn't match "publishConfig.linkDirectory" in package.json (false).mainfails the same way. The second commit pinspnpm/action-setupto 11.9.0, the version of.tool-versions, as simple-release pins 11.11.0.