Skip to content

Commit 6d00520

Browse files
authored
Fix nested Bazel execution deadlock (#8176)
The action to set up Bazel in GitHub CI provides a system or user RC file which overrides the output_user_root. This can cause the nested Bazel client to try to connect to the outer Bazel server, effectively creating a dead lock. So apparently: - the system rc is required in order for Build Kit to work correctly - and the home rc needs to be ignored for GH to work correctly
1 parent 584af6c commit 6d00520

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

third_party/bazel/jars/extension.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def _bazel_build_jars_impl(rctx):
2424
if "windows" in rctx.os.name.lower():
2525
build_cmd = [bazel, "build"]
2626
else:
27-
build_cmd = [bazel, "--output_user_root=%s" % rctx.path("output"), "build"]
27+
# prevent external RC files from overriding --output_user_root (like on GH CI)
28+
build_cmd = [bazel, "--nohome_rc", "--output_user_root=%s" % rctx.path("output"), "build"]
2829

2930
for target in rctx.attr.jars:
3031
rctx.report_progress("building: %s" % target)

0 commit comments

Comments
 (0)