bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Remote spawn strategy should fallback a better spawn strategy

Open hhclam opened this issue 9 years ago • 6 comments

feature request:

--spawn_strategy=remote will fallback to running the action with standalone spawn strategy. It should fallback to a better strategy, like a sandbox strategy or a persistent worker strategy.

  • Bazel version (output of bazel info release):

0.4.4

Have you found anything relevant by searching the web

https://github.com/bazelbuild/bazel/issues/1531

hhclam avatar Feb 21 '17 18:02 hhclam

This will be fixed once @ulfjack's and mine refactoring of the SpawnStrategy architecture is done. The general idea is that Spawns will be executed not by a single strategy (as they're now), but instead via a configurable scheduler that will delegate to a configurable set of strategies. A remote cache strategy could then indicate something like a cache miss, which would prompt the scheduler to execute them using the next best strategy (e.g. remote execution, local workers, local sandboxed or local standalone).

philwo avatar Feb 21 '17 20:02 philwo

Is there a tracking issue for the work? That sounds great by the way.

hhclam avatar Feb 21 '17 20:02 hhclam

This sounds great, any idea of a rough timeline for this? weeks/months?

ianoc-stripe avatar Feb 21 '17 20:02 ianoc-stripe

I've been working on the underlying infrastructure since mid-December. Unfortunately, I think it'll be months rather than weeks for all the pieces to come together.

Here's my commit history; everything with TestStrategy in the commit notes is related to this bug: https://github.com/bazelbuild/bazel/commits/master?author=ulfjack

ulfjack avatar Feb 22 '17 08:02 ulfjack

Maybe I can get the Spawn scheduler done and in earlier - I have an internal prototype of the idea, which still lacks the configurability that I'd like to see. But I've been testing that proof of concept with a few colleagues to gather feedback and it seems to work fine. I've assigned this the Bazel 0.6 milestone and will work on it, once I fixed the more high priority bugs that are currently assigned to me.

philwo avatar Feb 22 '17 09:02 philwo

Marking this as a duple of #1531.

ulfjack avatar Apr 19 '17 07:04 ulfjack