bazel: incompatible_allow_tags_propagation
Tags are not currently being propagated from a bazel’s target to the actions’ execution requirements. which would be very useful in order to be able to mar certain targets as ‘no-remote’ or ‘no-cache’. At the moment, this is possible only on action/rule level or via adjustments to the rules. Detailed description of the issue is in #7766. Design is described in the proposal.
In order to make the transition smoother, a flag --incompatible_allow_tags_propagation
has been introduced.
What does it change?
-
If the flag
--incompatible_allow_tags_propagation
set totrue
, bazel will take tags specified on target level, filter them based on prefix and propagate to the actions, that are created for the target. Propagated prefixes: “block-”, “requires-”, “no-”, “supports-”, “disable-”, “local”, “cpu:” -
If set to
false
tags are not propagated.
Migration notes
Check the tags with the prefixes: “block-”, “requires-”, “no-”, “supports-”, “disable-”, “local”, “cpu:”. Most likely they were not propagated and with the flag --incompatible_allow_tags_propagation
they will be, therefore the build behavior might change.
Plan
By Bazel 1.0: Make functionality usable
- Starlark rules are able to propagate tags under
--incompatible_allow_tags_propagation
flag - Native rules (C++, for example) are able to propagate tags under
--incompatible_allow_tags_propagation
flag
After Bazel 1.0:: Stabilize
- fix everything that is failing/unstable incrementally
- move ‘tags propagation’ from experimental to supported feature
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (16 by maintainers)
Commits related to this issue
- Tags propagation: added incompatible flag reverted rollback of tags propagation: https://github.com/bazelbuild/bazel/commit/29eecb56c5f0f26b4751ec9eb79954412fb2991c Tags declared on targets are not ... — committed to bazelbuild/bazel by deleted user 5 years ago
- renamed 'incompatible_allow_tags_propagation' to 'experimental_allow_tags_propagation' RELNOTES: use 'experimental_allow_tags_propagation' to propagate tags to actions from target or rules. Tags that... — committed to ishikhman/bazel by deleted user 5 years ago
- renamed 'incompatible_allow_tags_propagation' to 'experimental_..' renamed `--incompatible_allow_tags_propagation` to `--experimental_allow_tags_propagation` RELNOTES[NEW]: tags: use `--experimental... — committed to bazelbuild/bazel by deleted user 5 years ago
- Release 0.29.0 (2019-08-28) Baseline: 6c5ef5369a3ffceb8a65cc159a2fff1401242810 Cherry picks: + 338829f2633e91ae0492ee4169446465e10b5994: Fix retrying of SocketTimeoutExceptions in HttpConne... — committed to bazelbuild/bazel by a-googler 5 years ago
- Release 0.29.0 (2019-08-28) Baseline: 6c5ef5369a3ffceb8a65cc159a2fff1401242810 Cherry picks: + 338829f2633e91ae0492ee4169446465e10b5994: Fix retrying of SocketTimeoutExceptions in HttpConne... — committed to buchgr/bazel by a-googler 5 years ago
- propagated for cc_library and cc_binary Part of #8830 RELNOTES[NEW]: tags: use `--experimental_allow_tags_propagation` flag to propagate tags to the action's execution requirements from cc_library o... — committed to bazelbuild/bazel by deleted user 5 years ago
- Tags propagation for java rules Part of #8830 RELNOTES[NEW]: tags: use --experimental_allow_tags_propagation flag to propagate tags to the action's execution requirements from java targets. Such tag... — committed to bazelbuild/bazel by deleted user 5 years ago
- Release 1.0.0 (2019-10-10) Baseline: 97a82646dadd93bf52d47828bda42e3383b657c6 Cherry picks: + a0e3bb207fe2044120a2555a37162ee1f2b17500: Remove support for authentication and .netrc + ada... — committed to bazelbuild/bazel by a-googler 5 years ago
- Release 1.0.0 (2019-10-10) Baseline: 97a82646dadd93bf52d47828bda42e3383b657c6 Cherry picks: + a0e3bb207fe2044120a2555a37162ee1f2b17500: Remove support for authentication and .netrc + ada... — committed to bazelbuild/bazel by a-googler 5 years ago
- Propogate tags for the AndroidBinary actions (#9) Tags are not propagated from targets to actions for Android rules. https://github.com/bazelbuild/bazel/issues/8830 This PR adds basic propagation o... — committed to nkoroste/bazel by antonlopyrevsc 4 years ago
- limit_malloc: Disarm under valgrind Fixes a nightly build failure seen here: https://drake-cdash.csail.mit.edu/viewTest.php?onlydelta&buildid=1336134 This solution may seem like overkill, when I cou... — committed to rpoyner-tri/drake by rpoyner-tri 4 years ago
- limit_malloc: Disarm under valgrind (#14040) * limit_malloc: Disarm under valgrind Fixes a nightly build failure seen here: https://drake-cdash.csail.mit.edu/viewTest.php?onlydelta&buildid=1336134 ... — committed to RobotLocomotion/drake by rpoyner-tri 4 years ago
- Propogate tags for the AndroidBinary actions (#9) Tags are not propagated from targets to actions for Android rules. https://github.com/bazelbuild/bazel/issues/8830 This PR adds basic propagation o... — committed to nkoroste/bazel by antonlopyrevsc 4 years ago
- Propogate tags for the AndroidBinary actions Tags are not propagated from targets to actions for Android rules. https://github.com/bazelbuild/bazel/issues/8830 This PR adds basic propagation of tags... — committed to nkoroste/bazel by nkoroste 3 years ago
- Propagate tags for the AndroidBinary actions Tags are not propagated from targets to actions for Android rules. https://github.com/bazelbuild/bazel/issues/8830 This PR adds basic propagation of tags... — committed to bazelbuild/bazel by nkoroste 3 years ago
- perf: remove no-remote-cache execution requirements These were introduced to reduce load on a remote-cache instance to avoid network saturation. A month later, a feature was added in one remote-cache... — committed to bazelbuild/rules_docker by alexeagle 2 years ago
- perf: remove no-remote-cache execution requirements These were introduced to reduce load on a remote-cache instance to avoid network saturation. A month later, a feature was added in one remote-cache... — committed to bazelbuild/rules_docker by alexeagle 2 years ago
- perf: remove no-remote-cache execution requirements (#2043) These were introduced to reduce load on a remote-cache instance to avoid network saturation. A month later, a feature was added in one rem... — committed to bazelbuild/rules_docker by alexeagle 2 years ago
- Merge branch 'levsha/IDX-2223-propagate-tags' into 'master' Propagate tags. https://github.com/bazelbuild/bazel/issues/8830 Closes IDX-2223 Closes IDX-2223 See merge request dfinity-lab/public/i... — committed to dfinity/ic by deleted user 2 years ago
What still needs to be done to flip this one? I think it’s a common surprise for folks when tags don’t propagate as they expect. Based on the comment here https://github.com/bazelbuild/bazel/blob/53f189973e1372d53c7cc2a041a3e34adcff4fbe/src/main/java/com/google/devtools/build/lib/packages/semantics/BuildLanguageOptions.java#L35-L38 it doesn’t seem super clear how we would break apart the
build
vsquery
impact of this flagSGTM. I would love to see this is flipped.
Migration tooling (of any kind) - but I do not think it is posisble 😃 Breakage does seem non-existent