-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WEB-880] [turborepo] Persistent task concurrency validation not taking into account whether package has the script defined #4291
Comments
Actually, upon further testing, the filter isn't a necessary step here. If I have a |
Running into the same with npm. In my case only 4 out of 10 workspaces have the persistent script (
|
I just hit this too. Current workaround: (1) Run any npm run dev --workspaces --if-present Swap |
Better workaround: Downgrade Also consider disabling the update notifier in this case? https://turbo.build/repo/docs/reference/command-line-reference#--no-update-notifier. |
Experiencing the same issue on macOS, with 1.8.5-1.8.8. |
+1 We had to disable the |
I'm also seeing issues as a result of this on 1.8.8 and it's causing confusion for people onboarding onto a monorepo project I recently built. |
Hey all, thanks for reporting, we'll fix this up shortly! |
still having this issue tonight, reverting back to 1.8.3 seems to fix this issue. |
|
Same here... Cant update |
same issue yarn dev
yarn run v1.22.19
$ turbo dev --no-cache --continue
ERROR run failed: error preparing engine: Invalid persistent task configuration:
You have 10 persistent tasks but `turbo` is configured for concurrency of 10. Set --concurrency to at least 11
Turbo error: error preparing engine: Invalid persistent task configuration:
You have 10 persistent tasks but `turbo` is configured for concurrency of 10. Set --concurrency to at least 11
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
I just bumped into this issue at v1.9.3. |
Well, do what they say until resolved:
I guess it can be increased based on the number of projects in the workspace. |
Hey all, I'm sorry I wasn't able to get to this yet. Taking pat leave for some time, but I've passed this on to the team. I've let the team know about this open issue, but if anyone is able to make a PR even if just to revert #4205, it may be worth merging until we can find a real fix. @nathanhammond is also on leave for some time, which is why you haven't heard from him in a while. |
I just got this issue in v1.9.3
|
Same issue in v1.10.12: pnpm dev
> turbo dev --filter=!doc --no-cache --continue
ERROR run failed: error preparing engine: Invalid persistent task configuration:
You have 13 persistent tasks but `turbo` is configured for concurrency of 13. Set --concurrency to at least 14
Turbo error: error preparing engine: Invalid persistent task configuration:
You have 13 persistent tasks but `turbo` is configured for concurrency of 13. Set --concurrency to at least 14
ELIFECYCLE Command failed with exit code 1. When I set the concurrency to 14, the command takes effect: "dev": "turbo dev --filter=!doc --concurrency 14" |
I got the same error with |
Same here on |
Just an update, we talked about this at the team meeting and we want to fix it. PRs welcome |
Hey, any updates on this one? I have 10+ packages overall but the "dev" script is defined in one of them only. I guess it shouldn't fail in this case. "turbo": "^1.10.16" |
Is it possible to set the concurrency in |
The linked PR fixes the issue. Should be released in the next minor. Thanks for the patience as we were working towards the rust port ❤️ |
What version of Turborepo are you using?
1.8.5
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Windows
Describe the Bug
I believe this is related to #4205. If you have a task which is designated as
persistent
, it will validate that concurrency limits are not breached. However, the calculation of how many parallel tasks will be executed is not taking into account that not every package in the defined filter has the script defined.For instance, I have a turbo task
dev
which is flagged as persistent. This is launched as:turbo run dev --filter=@scope/app.*...
The count of tasks gets indicated as 24 in my example, which breaches the concurrency limit of 10. The count of 24 is the total count of packages matching the filter and all of its dependencies. However, only 4 of the packages in the filter's scope actually have
dev
scripts defined. This same issue does not occur if a filter is not defined. Effectively, the validation of concurrency limits should verify if a package in the filter's scope actually has the script defined before erroring. Packages without the script defined should not be counted in the validation.Expected Behavior
Since in my example only 4
dev
scripts exist within the filter's scope, the turbo task should be permitted to run as it will not breach concurrency limits.To Reproduce
a
andb
b
a dependency ofa
persistent
turbo task (e.g.dev
) inturbo.json
a
matching the persistent task's nameturbo run <task_name> --filter=a... --concurrency=1
In this example, only package
a
will run a script because it's the only one with the script defined. However, the count will be detected as exceeding the limit of 1 parallel task because it's using a count of all packages in scope and not the number of scripts which will be executed.Reproduction Repo
No response
WEB-880
TURBO-1141
The text was updated successfully, but these errors were encountered: