-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builds running with systemd wipe out cache #16314
Comments
Hello @jordan-bonecutter, It would be helpful if you can provide a sample code repo and complete steps to reproduce the above request and verify at our end. Thanks! |
As mentioned this will be reproducible in any bazel repo with any build rule, so let's try
|
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
@bazelbuild/triage this is still an issue with the newest version of bazel (6.4.0). Can this issue remain open? |
Description of the bug:
I'm testing running a bazel build in a systemd service. This all runs fine and the build completes as it should. However, the build running as the systemd service seems to have a cache completely separate from the build when I run in a terminal. Not only is it separate but it also seems to wipe out the cache for builds outside of systemd. Vice-versa is the same, building without systemd wipes out systemd caches.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
On a server with a bazel build rule, let's say
foo
for example, create the following systemd service file:Replacing the proper values with your own. Now start this service with
sudo systemctl start builder.service
. Check the journalctl logs withsudo journalctl -u builder -f
to confirm that it's running properly. Notice that it doesn't utilize any cached objects during the build. While it's building runbazel build //foo
in another terminal. Once the bazel server is available it will begin building but again without using any cached objects.Which operating system are you running Bazel on?
NAME="Ubuntu" VERSION="20.04.3 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.3 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal
What is the output of
bazel info release
?release 5.0.0
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 master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
No
The text was updated successfully, but these errors were encountered: