Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove "local execution delay" from dynamic spawn scheduler #7327
The dynamic spawn scheduler implements a "local execution delay", controlled via the
This delay exists so that, in the case of a build that is fully cached remotely, we don't end up running any actions locally. The delay allows the scheduler to try to score a cache hit for every action and, assuming all cache hits succeed before this delay, the local counterparts never start. But as soon as an action takes longer than this delay, the scheduler assumes that the build is unclean and it will have to do work, so it starts also scheduling actions locally.
This delay is only paid once per build and, because it's set to 1 second by default, it's not a big penalty -- but regardless, it's ugly and we should remove it.
To remove this delay, we can propagate a cache miss signal from the remote execution logic to the dynamic scheduler. We can then use this signal to decide when it's time for the dynamic spawn scheduler to start running actions locally.