What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Linux
Describe the Bug
Turborepo's concurrency setting breaks once an error is observed. If one of the executed tasks returns with 1 turbo will execute every remaining task at once regardless of the value of --concurrency
I also tested it with 1.5.*, the issue was present
I'm actually on Windows/WSL
Example, running turbo run test --concurrency 2
# ... before this point only 2 tasks were being executed at any given time
@alexaegis/advent-of-code-2021-21:test: ERROR: command finished with error: command (/home/alex/git/@alexaegis/advent-of-code/solutions/typescript/2021/21) pnpm run test exited (1)
# ... after it, you can see this is a lot more than 2
@alexaegis/advent-of-code-2016-02:test: cache miss, executing 639047a84ccf8023
@alexaegis/advent-of-code-2015-04:test: cache miss, executing 3280086c58a105dc
@alexaegis/advent-of-code-2020-05:test: cache miss, executing d6b6532f5c460697
@alexaegis/advent-of-code-2019-01:test: cache miss, executing 868b0f4fb2ba65fb
@alexaegis/advent-of-code-2018-15:test: cache miss, executing 8509e9399fb7ebd1
@alexaegis/advent-of-code-2018-03:test: cache miss, executing 05b14ceee3ab2c21
@alexaegis/advent-of-code-2018-12:test: cache miss, executing efa0d9a9a2918f24
@alexaegis/advent-of-code-2021-16:test: cache miss, executing d55648999d80d74f
@alexaegis/advent-of-code-2021-13:test: cache miss, executing 1ec18a1c68f5c9c8
@alexaegis/advent-of-code-2019-12:test: cache miss, executing bdd7390eb750ec0c
@alexaegis/advent-of-code-2020-21:test: cache miss, executing a1770238ff83c7bf
@alexaegis/advent-of-code-2020-16:test: cache miss, executing 37698a3f9f9f5d7f
@alexaegis/advent-of-code-2020-19:test: cache miss, executing 01518afe953f3653
@alexaegis/advent-of-code-2021-01:test: cache miss, executing ed7f78aed374eefa
@alexaegis/advent-of-code-2018-01:test: cache miss, executing 35d5464f25a1d456
@alexaegis/advent-of-code-2018-07:test: cache miss, executing ba5f1acdbb871f36
@alexaegis/advent-of-code-2018-09:test: cache miss, executing f81cf430f725eda6
@alexaegis/advent-of-code-2019-23:test: cache miss, executing c8a209c062bc69b6
Expected Behavior
When running a set of tasks, the number of concurrently executed tasks should never raise above the limit set by the user.
To Reproduce
I linked a branch where some tests are intentionally broken, the repo uses pnpm, run pnpm install and pnpm test for a quick reproduction
Have a repo with a lot of packages, each having a script that executes vitest on itself.
Run each of those using turbo with concurrency set to 2 (otherwise it would fill up all available RAM pretty quickly and fail. Also I usually set it higher but the difference between 2 running concurrently and all of them is easier to tell with the naked eye compared to 6 vs all of them)
What version of Turborepo are you using?
1.6.3
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Linux
Describe the Bug
Turborepo's concurrency setting breaks once an error is observed. If one of the executed tasks returns with
1
turbo will execute every remaining task at once regardless of the value of--concurrency
Example, running
turbo run test --concurrency 2
Expected Behavior
When running a set of tasks, the number of concurrently executed tasks should never raise above the limit set by the user.
To Reproduce
vitest
on itself.turbo
with concurrency set to2
(otherwise it would fill up all available RAM pretty quickly and fail. Also I usually set it higher but the difference between 2 running concurrently and all of them is easier to tell with the naked eye compared to 6 vs all of them)At workspace package json:
At each package:
1
.Reproduction Repo
https://github.com/AlexAegis/advent-of-code/tree/repro/turbo-concurrency-bug