From e8369c8b0ca39a647f5b113b0a310cfb3d9873df Mon Sep 17 00:00:00 2001 From: Markus Hofbauer Date: Thu, 28 Aug 2025 15:45:15 +0200 Subject: [PATCH] Set incompatible_strict_action_env and announce_rc in CI --- .bazelci/presubmit.yml | 1 + .bazelrc | 2 ++ examples/bzlmod/.bazelrc | 1 + tests/integration/custom_commands_test.py | 8 ++++++-- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 5889823d3d..fbe881d435 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -34,6 +34,7 @@ buildifier: build_flags: - "--keep_going" - "--build_tag_filters=-integration-test" + - "--announce_rc" test_targets: - "--" - "..." diff --git a/.bazelrc b/.bazelrc index d7e1771336..076a7005dd 100644 --- a/.bazelrc +++ b/.bazelrc @@ -20,6 +20,8 @@ build --incompatible_default_to_explicit_init_py # Ensure ongoing compatibility with this flag. common --incompatible_disallow_struct_provider_syntax +common --incompatible_strict_action_env + # Windows makes use of runfiles for some rules build --enable_runfiles diff --git a/examples/bzlmod/.bazelrc b/examples/bzlmod/.bazelrc index ca83047ccc..25fc442c81 100644 --- a/examples/bzlmod/.bazelrc +++ b/examples/bzlmod/.bazelrc @@ -7,4 +7,5 @@ test --test_output=errors --enable_runfiles # Windows requires these for multi-python support: build --enable_runfiles +build --incompatible_strict_action_env common:bazel7.x --incompatible_python_disallow_native_rules diff --git a/tests/integration/custom_commands_test.py b/tests/integration/custom_commands_test.py index 2e9cb741b0..454c2ec0c8 100644 --- a/tests/integration/custom_commands_test.py +++ b/tests/integration/custom_commands_test.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging import unittest from tests.integration import runner @@ -21,7 +20,12 @@ class CustomCommandsTest(runner.TestCase): # Regression test for https://github.com/bazel-contrib/rules_python/issues/1840 def test_run_build_python_zip_false(self): - result = self.run_bazel("run", "--build_python_zip=false", "//:bin") + result = self.run_bazel( + "run", + "--build_python_zip=false", + "--incompatible_strict_action_env=false", + "//:bin", + ) self.assert_result_matches(result, "bazel-out")