rules_sh icon indicating copy to clipboard operation
rules_sh copied to clipboard

Fails on Bazel's CI for Bazel >= 7.3 on Windows

Open avdv opened this issue 1 year ago • 3 comments

Describe the bug The test module run for PR https://github.com/bazelbuild/bazel-central-registry/pull/3288 fails on Windows:

C:/b/bk-windows-j20f/bazel-org-repo-root/output/rules_sh-0.5.0/tests/sh_binaries/BUILD.bazel:3:23: Executing genrule //sh_binaries:genrule failed: (Exit 127): bash.exe failed: error executing Genrule command (from target //sh_binaries:genrule)
...
/usr/bin/bash: line 1: c:\\b\\3mrahdhj\\execroot\\_main\\bazel-out\\x64_windows-fastbuild\\bin\\sh_binaries\\hello_world.exe.runfiles/_main/sh_binaries/hello_world: No such file or directory

See https://buildkite.com/bazel/bcr-presubmit/builds/9106

To Reproduce Run bazel test ... in tests directory on Windows with Bazel >= 7.3.

Expected behavior All tests should pass.

Environment

  • OS name + version: Windows
  • Bazel version: 7.3.0 - 7.4.1
  • Version of the rules: 0.5.0

avdv avatar Dec 02 '24 09:12 avdv

Note, this only happens when using --build_tests_only (which is used by default on BCR tests).

I tracked this down to ~https://github.com/bazelbuild/bazel/commit/282ac623df3523e2e31a2de9c002e5c50da19fec~ https://github.com/bazelbuild/bazel/commit/610fe7bb25c8853fd9b55d85cb08d2bf4e3ee8b7

avdv avatar Dec 03 '24 08:12 avdv

@fmeum do you have an idea how I can fix this? Should I create an issue in bazelbuild/bazel?

avdv avatar Dec 03 '24 08:12 avdv

Thanks for catching this. Could you file an issue on the Bazel repo? This needs a fix and probably also a point release. I'll dig into why it happens.

fmeum avatar Dec 03 '24 11:12 fmeum