Replies: 4 comments
-
|
I came here with the same idea. My goal was to be able to shard the tasks in a GitHub Actions matrix. I accept that there will be some overlap, and double builds of some essential root packages. But I want Turborepo to compute this graph most optimally, and even suggest the total shard count. I think it can just return groups with packages in them, as these can be fed directly to the GitHub matrix then and be used in the filter clause. So turbo needs to basically compute the most optimal build graph within some range of shards (matrix) given by the user, e.g. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, any update on this? |
Beta Was this translation helpful? Give feedback.
-
|
I assume this has been discussed before, but I couldn't find it in my search. So I thought I would make a discussion to track this. |
Beta Was this translation helpful? Give feedback.
-
|
Do we have further discussion about this topic? or any enhancements on Distributed task execution? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
turbo run testand splitturbo run test --split=4turbo run test --split=4 --partition=1(or multipleturbo run test --split=4 --partition=1)Non-goals
Background
I would like to be able to take a command like
turbo run testand distribute it across multiple agents. In order to increase parallelization in my builds and overall build time to complete.I see @sppatel has made an article on doing this https://medium.com/@sppatel/maximizing-job-parallelization-in-ci-workflows-with-jest-and-turborepo-da86b9be0ee6 but I wonder if there could be an official implementation in here.
The alternative here would be for developers to maintain they're own script or build a third party package to help consolidate effort.
Proposal
I think using @sppatel article we could build it and just need to describe the interface such as
split(for how many shards) andpartitionto specify which ones you wish to execute. We have the graph so I think it's feasible to do this.I think people may want is the balancing, which could definitely be done as an enhancement. Perhaps providing an option to be explicit about which packages are in your shards would work.
Beta Was this translation helpful? Give feedback.
All reactions