bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Propagate all experimental options to the exec configuration

Open fmeum opened this issue 1 year ago • 2 comments

Experimental flags that don't propagate to the exec configuration can create very surprising failure cases for both Bazel users and devs. Unless there is a valid reason to not propagate them, they should be.

This is now enforced by a test and existing flags have been cleaned up where possible. The test strategy is the same as for incompatible_ flags.

fmeum avatar Aug 18 '24 17:08 fmeum

This is motivated by https://github.com/bazelbuild/bazel/pull/23328, in which a number of tests based on genrule I added failed open due to an experimental flag not propagating to the exec configuration.

fmeum avatar Aug 18 '24 19:08 fmeum

@lberki Could you review this as Bazel's "Chief Flag Officer"? :⁠-⁠) @aranguyen for configurability

fmeum avatar Aug 18 '24 19:08 fmeum

@lberki Friendly ping

fmeum avatar Sep 13 '24 17:09 fmeum

Uh, sorry. I'll defer to @gregestren here. This seems like a good idea on the surface. You also probably want to give --incompatible_* the same treatment.

lberki avatar Sep 16 '24 08:09 lberki

I added a test for incompatible tests about a year ago, but back then I wasn't sure whether experimental flags should be treated in the same way.

fmeum avatar Sep 16 '24 09:09 fmeum

Do we need re-review?

gregestren avatar Oct 01 '24 22:10 gregestren

Do we need re-review?

Sorry, clicked the button accidentally while going over my pending PRs.

fmeum avatar Oct 02 '24 05:10 fmeum

Just a heads up, this is being rolled back, it breaks things internally. But the number of breakages are very small, so it's probably safe to keep for Bazel.

hvadehra avatar Oct 11 '24 11:10 hvadehra

This is still locked in for Bazel 8, right?

I'll look at getting it rolled forward again at head. Yes, the # of breakages is small. And they're almost certainly due to properties of the Google depot which don't generalize to Bazel, so there's no reason to block this outside that specific depot.

gregestren avatar Oct 11 '24 11:10 gregestren

As it turns out, rolling back does not help as it was a bad interaction with https://github.com/bazelbuild/bazel/commit/78971a932bae9d788014df9b6235fb8242b59a77

Rolling it forward, sorry for the noise.

hvadehra avatar Oct 11 '24 12:10 hvadehra