-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Directory artifact not present in sandbox using Bazel 6.0.0rc2 #16789
Description
Description of the bug:
Using Bazel 6.0.0rc1 or rc2 and with --remote_download_outputs=toplevel (or minimal), remote_cache (or disk_cache) & sandboxed execution, directory artifacts are not present in runfiles in the sandbox.
Conditions for issue
- Bazel 6.0.0rc1 or rc2
- directory artifact (created with
ctx.actions.declare_directory) in runfiles of a test or binary target - sandboxed execution
--remote_cache(or--disk_cacheenabled)--remote_download_outputs=toplevel(orminimal)
Issue
The output directory is not present in the sandbox when the test or binary target is run.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Clone https://github.com/gregmagolan/bazel_6_remote_download_outputs_repro
Run ./repro.sh to run a test that fails if the directory artifact is not present in runfiles. Removing the --remote_download_outputs flag -or- running with --spawn_strategy=local makes the test pass.
Which operating system are you running Bazel on?
MacOS (but the issue has also been observed on Linux CI)
What is the output of bazel info release?
release 6.0.0rc2
If bazel info release returns development 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 master; git rev-parse HEAD ?
git@github.com:gregmagolan/bazel_6_remote_download_outputs_repro.git
master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ac7517ea0ef1dad51847b40899c25079b427fb6e
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
First observed when updating rules_js to Bazel 6.0.0rc1. rules_js makes heavy use of directory artifacts for the node_modules virtual store