[ci] enable bazel strict action env by default#55985
Conversation
|
I am finally pulling the trigger~ @edoakes |
There was a problem hiding this comment.
Code Review
This pull request enables Bazel's strict action environment by default, which is a great improvement for build caching and sandboxing. The changes in .bazelrc correctly apply the --incompatible_strict_action_env flag to builds, and the redundant flag is correctly removed from python/setup.py. I have one suggestion to improve the clarity of the .bazelrc configuration.
.bazelrc
Outdated
| # build --config=strict | ||
| # test --config=strict | ||
| build:strict --incompatible_strict_action_env | ||
| build --config=strict |
There was a problem hiding this comment.
For consistency and clarity, it would be good to also add test --config=strict. While bazel test inherits options from bazel build, explicitly adding this makes the configuration more readable and consistent with the previous recommendation in the comments that were removed.
build --config=strict
test --config=strict
420d2a6 to
1504c80
Compare
1504c80 to
ca0e1ec
Compare
|
seems that it does not work for all the python tests.. |
|
🚀 |
LMK if I can help |
|
seems that sending in |
c64aafc to
40526fd
Compare
Oof this might break a lot of flows though. For example if people use any tooling like |
yep, I think your concern is totally legit... let me see if there are other ways.. I am just trying to see if this fixes the python tests. I can probably also try symlink python and python3 in CI conda envs into |
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
40526fd to
113099f
Compare
I ended up just pass |
|
running this on postmerge for a more comprehensive check: https://buildkite.com/ray-project/postmerge/builds/12552 and postmerge-macos: https://buildkite.com/ray-project/postmerge-macos/builds/7661 |
|
ready to merge @edoakes , please take a look. |
| # tests, which are all hermetic, can build, test and cache as intended, ray | ||
| # Python developers do not really use bazel test to run tests locally, but more | ||
| # often just run tests with "pytest" directly. | ||
| test:ci-base --test_env=PATH |
There was a problem hiding this comment.
even when this is enabled, it only affects test (e.g. test result caching). it does not affect builds.
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com> Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com> Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com> Signed-off-by: Gang Zhao <gang@gang-JQ62HD2C37.local>
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com> Signed-off-by: sampan <sampan@anyscale.com>
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com> Signed-off-by: jugalshah291 <shah.jugal291@gmail.com>
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com> Signed-off-by: yenhong.wong <yenhong.wong@grabtaxi.com>
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com> Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
so that action env vars are properly captured and sandboxed, makes caching working properly. Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
so that action env vars are properly captured and sandboxed, makes caching working properly.