Execution Platform Scoped Spawn Strategies #20497
Replies: 6 comments 27 replies
-
Thanks for suggesting this! I have a lot of comments, but the top-level one is that I think this is a good step forward, and will be useful while we try to figure out a larger plan. I'm going to split out comments into separate discussion threads, I hope this is easier, let me know if it isn't. |
Beta Was this translation helpful? Give feedback.
-
This proposal aims to select the correct strategy for a given execution platform. It is not trying to solve the problem of picking the execution platform based on the execution strategy (as in Execution Platforms vs. Strategies. Can we make that more explicit? |
Beta Was this translation helpful? Give feedback.
-
In theory, if So, given that, you should assume the worst: that some rule will generate a Spawn with no execution platform set that should actually try to run (somewhere). |
Beta Was this translation helpful? Give feedback.
-
Here's the big one: I like the idea but dislike the flag syntax you've chosen. I don't know how deeply you've looked into Bazel's flag parsing: it's very specific and arcane (and we'd love to rip it out and replace it wholesale, but Hyrum's law applies: any replacement would have to be bug-for-bug compatible semantically and syntactically, and so isn't worth it).
I don't think these are possible, for a few reasons:
The data structure for
The Making this more complicated with a "key1=key2=value" flag seems overly complicated: not so much semantically for users (although I think it is), but definitely as an implementation detail. |
Beta Was this translation helpful? Give feedback.
-
Thanks very much for the updates. My only remaining question is that I'm not entirely sure how Aside from that (and possibly seeking any idea for flag names: Let me know what your timeline looks like for implementation. I'm happy to review PRs and help get them imported, although because of the holidays today is my last working day until January 2, 2024. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to follow up on this. I'm still happy with the proposal, but I never saw a PR to mark it as approved, and I haven't seen any incoming implementation PRs. Is this still something you're interested in working on? (In a related area, see my proposal for Selectively Enabling Execution Platforms). |
Beta Was this translation helpful? Give feedback.
-
While Bazel has the necessary primitives to configure a multi-platform build, it currently lacks a way to map registered execution platforms to spawn strategies. This complicates remote execution adoption by forcing indirect adjustments to be made such as;
no-remote-exec
to prevent theremote
strategy being used for select targets.bazel build
.To date there have been 2 proposals to address this problem.
I've have a new one to add to the pile, though with a much reduced scope. The gist is that the existing spawn strategy flags (e.g.
--spawn_strategy
,--strategy=<mnemonic>
) will be extended to accept an execution platform as a filter.e.g.
This is intended to fill a capability gap while work on #11432 continues.
Proposal;
cc @katre
Beta Was this translation helpful? Give feedback.
All reactions