-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tags to execution requirements propagation in Starlark #7766
Comments
An interesting special case today is that |
Design doc link |
Tags declared on targets are not propagated to actions and therefore are not taken into consideration by bazel. This causes some issues, for instance, target marked with a tag 'no-remote' will still be executed remotely. As it was agreed in the design doc (see bazelbuild#7766 for a link), set of tags to be propagated to actions as a first iteration. This change is responsible for that first step for the Starlark Rules. RELNOTES: tags 'no-remote', 'no-cache', 'no-remote-cache', 'no-remote-exec', 'no-sandbox' are propagated now to the actions from targets. Closes bazelbuild#7766
*** Reason for rollback *** Breaks internal tests *** Original change description *** tags propagation: Starlark rules part Tags declared on targets are not propagated to actions and therefore are not taken into consideration by bazel. This causes some issues, for instance, target marked with a tag 'no-remote' will still be executed remotely. As it was agreed in the design doc (see [doc](https://docs.google.com/document/d/1X2GtuuNT6UqYYOK5lJWQEdPjAgsbdB3nFjjmjso-XHo/edit#heading=h.5mcn15i0e1ch) and #7766 for details), set o... *** RELNOTES: None. PiperOrigin-RevId: 256561364
Tags declared on targets are not propagated to actions and therefore are not taken into consideration by bazel. This causes some issues, for instance, target marked with a tag 'no-remote' will still be executed remotely. As it was agreed in the design doc (see [doc](https://docs.google.com/document/d/1X2GtuuNT6UqYYOK5lJWQEdPjAgsbdB3nFjjmjso-XHo/edit#heading=h.5mcn15i0e1ch) and bazelbuild#7766 for details), set of tags to be propagated to actions as a first iteration. This change is responsible for that first step for the Starlark Rules. RELNOTES: tags 'no-remote', 'no-cache', 'no-remote-cache', 'no-remote-exec', 'no-sandbox' are propagated now to the actions from targets. Closes bazelbuild#7766 Closes bazelbuild#8612. PiperOrigin-RevId: 256369636
*** Reason for rollback *** Breaks internal tests *** Original change description *** tags propagation: Starlark rules part Tags declared on targets are not propagated to actions and therefore are not taken into consideration by bazel. This causes some issues, for instance, target marked with a tag 'no-remote' will still be executed remotely. As it was agreed in the design doc (see [doc](https://docs.google.com/document/d/1X2GtuuNT6UqYYOK5lJWQEdPjAgsbdB3nFjjmjso-XHo/edit#heading=h.5mcn15i0e1ch) and bazelbuild#7766 for details), set o... *** RELNOTES: None. PiperOrigin-RevId: 256561364
Tags declared on targets are not propagated to actions and therefore are not taken into consideration by bazel. This causes some issues, for instance, target marked with a tag 'no-remote' will still be executed remotely. As it was agreed in the design doc (see bazelbuild#7766 for a link), set of tags to be propagated to actions as a first iteration. This change is responsible for that first step for the Starlark Rules. RELNOTES: tags 'no-remote', 'no-cache', 'no-remote-cache', 'no-remote-exec', 'no-sandbox' are propagated now to the actions from targets when '--incompatible_allow_tags_propagation' flag set to true. Closes bazelbuild#7766
was rolled back |
Tags declared on targets are not propagated to actions and therefore are not taken into consideration by bazel. This causes some issues, for instance, target marked with a tag 'no-remote' will still be executed remotely. As it was agreed in the design doc (see [doc](https://docs.google.com/document/d/1X2GtuuNT6UqYYOK5lJWQEdPjAgsbdB3nFjjmjso-XHo/edit#heading=h.5mcn15i0e1ch) and bazelbuild#7766 for details), set of tags to be propagated to actions as a first iteration. This change is responsible for that first step for the Starlark Rules. RELNOTES: tags 'no-remote', 'no-cache', 'no-remote-cache', 'no-remote-exec', 'no-sandbox' are propagated now to the actions from targets. Closes bazelbuild#7766 Closes bazelbuild#8612. PiperOrigin-RevId: 256369636
*** Reason for rollback *** Breaks internal tests *** Original change description *** tags propagation: Starlark rules part Tags declared on targets are not propagated to actions and therefore are not taken into consideration by bazel. This causes some issues, for instance, target marked with a tag 'no-remote' will still be executed remotely. As it was agreed in the design doc (see [doc](https://docs.google.com/document/d/1X2GtuuNT6UqYYOK5lJWQEdPjAgsbdB3nFjjmjso-XHo/edit#heading=h.5mcn15i0e1ch) and bazelbuild#7766 for details), set o... *** RELNOTES: None. PiperOrigin-RevId: 256561364
@ishikhman is this change applied or is this currently still in progress? It's not clear if it has been rolled back or not. |
@arlyon it will be included into our next release, 0.29, which will happen in the beginning of August. Note1: flag will be flipped to be true by default in September's release. |
Every target in Bazel supports specifying a
tags
attribute:While tags can be used for a variety of use cases (i.e. query), Bazel also defines a set of tags that have special meaning for how it executes an action. For example,
no-sandbox
tells Bazel to run this action without a sandboxing strategy andno-remote
tells it to not run the action on a remote execution system.The issue is that a user sets
tags
on a target and not on an action. So a rule implementation needs to intentionally pass the tags forward to every action it creates (as an execution requirement).If a rule doesn't add
execution_requirements = ctx.attr.tags.keys()
or similar to each action it creates then a user tagging a target asno-remote
will have no effect for execution.We need to answer the following questions:
cc: @laurentlb @cparsons @nlopezgi @agoulti @jmmv
The text was updated successfully, but these errors were encountered: