Open mering opened 14 hours ago
I acknowledge that the use of zip
in test-setup.sh
is non-hermetic, but the non-hermeticity was not introduced by https://github.com/bazelbuild/bazel/commit/7a183118187a8a799f2c23d935d3330e33527604; the test wrapper has always expected certain shell utilities to be provided by the execution environment. The only thing that changed is that we used to fail silently (and produce an incorrect result!) when zip
was unavailable, and we fail loudly now.
Are you able to use --nozip_undeclared_test_outputs
instead? (This will also become the default in Bazel 8.)
@tjgq Thanks for your quick reply. With this option the test indeed doesn't fail any more but still prints the following warning:
external/bazel_tools/tools/test/test-setup.sh: line 396: file: command not found
Description of the bug:
When writing files to
$TEST_UNDECLARED_OUTPUTS_DIR
,test-setup.sh
requires thefile
andzip
tools to be installed on the RBE runners itself. Since 7a183118187a8a799f2c23d935d3330e33527604 the build fails if these tools are not available. This violates hermeticity.@bazel_tools
should provide all necessary functionality it needs in a hermetic way.Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Use an
sh_test
with the following script:and run it with Bazel 7.4+ on an RBE runner with out
file
andzip
tools available (for example a plaindebian:12
image from Docker Hub).Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?7.4.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
The functionality never worked and starting from 7a183118187a8a799f2c23d935d3330e33527604 (@tjgq FYI) it is a hard error.
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response