-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel excessively re-fetches external repositories #10961
Comments
This might happen if you have different flags for build and for query. If you have:
You can enable it for query too. "common" means both "build" and "query", so you can try:
|
Syncing all flags in StarlarkSemanticsOptions.java using |
I can confirm this fixed it for us too, in our case it was There's more conversation about this here too https://bazelbuild.slack.com/archives/CA31HN1T3/p1583983830261700 But I wonder if we should force these flags to only ever be in a |
Changing the flags passed to Bazel can force the reevaluation of the WORKSPACE. This is expected, but Bazel can spend a lot of time redownloading git repositories. When I run Small repro: WORKSPACE:
BUILD:
Example commands to run:
Most of the incompatible flags force a redownload. Each of the command spends around one minute downloading io_bazel, according to the console output:
|
There's a new report filed at #11895. |
Same issue here, except it doesn't appear as though my build and query commands can be unified to use the same arguments, so the workaround given doesn't help in my case. Bazelrc File:
I've gone through them and they don't appear to be valid commands for query, unless I missed something. In this case, is there a fix or workaround? What is the source of my woes? This is a big issue for my teams workflow because we use |
Can you identify which flag causes the problem? Bazel will do a reload if a flag (that affects the loading phase) changes. If you identify which flag is problematic, we can look for a solution (it's possible that a Bazel flag doesn't behave well; or it can be a problem in your bazelrc). |
@laurentlb it is the |
Thanks, I've filed a separate issue for this. |
Is there a way to spot the flag which is causing this issue? Say, comparing logs? |
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 14 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 ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
Description of the problem / feature request:
Since 2.2.0, Bazel fetches external repository more frequently. The culprit seems to be a3a2215, as the
STARLARK_SEMANTIC
value stored in the marker file changes with the commands.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I am able to constantly reproduce it executing a
run
orbuild
command followed by aquery
command.What operating system are you running Bazel on?
MacOS 10.15.3
What's the output of
bazel info release
?release 2.2.0
The text was updated successfully, but these errors were encountered: