bazelbuild / bazelbuild/bazelisk
Bazelisk corrupts the bazel installation if it's run multiple times concurrently
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
I was trying to use Bazelisk in a CI setup where multiple CI agents run on a single instance. I observed the following error when multiple bazelisk processes attempt to install bazel concurrently:
```
2023/03/09 02:31:53 Downloading https://releases.bazel.build/6.0.0/release/bazel-6.0.0-linux-x86_64...
Opening zip "/var/lib/buildkite-agent/.cache/bazelisk/downloads/bazelbuild/bazel-6.0.0-linux-x86_64/bin/bazel (deleted)": open(): No such file or directory
FATAL: Failed to open '/var/lib/buildkite-agent/.cache/bazelisk/downloads/bazelbuild/bazel-6.0.0-linux-x86_64/bin/bazel (deleted)' as a zip file: (error: 2): No such file or directory
```
Contributor guide
Research direction
Start by reproducing concurrent Bazelisk processes using the cache path shown in the report and inspect the installation and download flow that produces the deleted bazel path. Verify the behavior with multiple agents sharing one cache; done means concurrent runs complete successfully without corrupting or deleting the installed Bazel executable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100