Replies: 4 comments 2 replies
-
The document link to Execution Platforms vs Strategies above is broken for me. This one works. |
Beta Was this translation helpful? Give feedback.
-
Please, no. This would blur the semantic difference.
Or, is that we create a default exec platform that inherits from the host platform? Personally, I like separating the exec platform attributes from the non-exec platform rule. It makes it easier to understand. However, I am ambivalent about whether there is a strict distinction between an exec and a non-exec platform. I am trying to think of the foot-gun scenarios. 🤔 |
Beta Was this translation helpful? Give feedback.
-
Can you clarify the differences you're thinking of besides I'm curious to know what |
Beta Was this translation helpful? Give feedback.
-
Note that |
Beta Was this translation helpful? Give feedback.
-
Background
Currently, Bazel has three ways platforms can be used:
These are all declared using the same rule,
platform
.However, there are a number of attributes on the
platform
rule that only make sense for execution platforms:platforms.exec_properties
platforms.remote_execution_proeprties
exec_properties
for remote actions.There are also some future possible additions and/or changes:
Execution Platforms vs Strategies
, discussed adding further attributes to control which execution strategies are compatible with specific execution platforms.--experimental_platform_in_output_dir
could be to use properties on the target platform to get the name for the output dir, instead of using--experimental_override_name_platform_in_output_dir
.exec_properties
of the target platform and use that to make decisions. While this hasn't happened in Bazel, Google's internal Blaze uses this in a few places.The actual question
Okay, I even surprised myself with all that, but this has been brewing for some time. Now for my actual questions for users:
Is an exec platform different enough to use a different rule?
Based on the above, target platforms have a very few attributes: a name, a parent, constraint values, and maybe a generic "properties" grab-bag for rules and Bazel to use. (Or maybe we force Bazel, at least, to use actual attributes for things like output path segments).
Execution platforms, on the other hand, also have a name, a parent, and constraint values, but also have execution properties (which can be used for execution strategies including remote), and may have further things added in the future.
Is it worth splitting these up? An execution platform would need the following semantics that a platform doesn't have:
ExecPlatformInfo
provider that is similar to the existingPlatformInfo
, but that's just a Simple Matter of Programming.I'd like to know what actual users think, and whether this is worth advancing. (I have an ulterior motive: I want to add a new feature to execution platforms and so this is the right time to decide whether to split them out. Proposal to come after this question is resolved.)
Beta Was this translation helpful? Give feedback.
All reactions