-
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
Build graph invalidation with custom flags from external repositories #17853
Comments
Took time to make a proper reproduction procedure: https://gist.github.com/layus/57fd0aeba78a9a67e8e684379f829e4d.
|
This in turns hints at more related issues: #13473, where this comment #13473 (comment) happens to be incorrect:
This happens to be an issue because it discards useful state from the daemon. Regenerating that data completely takes more than one minute. Data is not retained for as long as naively expected. |
I have a rough fix that "works for me" in #17875. Mostly POC and WIP and untested in the parsing error branch, but usable and functional. |
@layus as you have discovered already in #17875, commands like |
Which data specifically do you mean? I see the effect of One other debugging tool to look at this is Also, I'd expect |
I am not able to dig that issue right now, probably in the coming days or weeks. AFAIR the issue is that BASELINE_CONFIGURATION is changed, and that "invalidates" the whole graph. Restoring it to the normal, original value on the next build then needs to check the validity of all nodes. This basically means a traversal of all the graph nodes. |
Description of the bug:
To fix issues with rules_docker transitions leaking into our own transitions and multiplicating the number of different configurations, we have added
build --@io_bazel_rules_docker//transitions:enable=no
to our .bazelrc, as per bazelbuild/rules_docker#2068That works, but introduced a subtle and hard to track issue where running some bazel commands like cquery, dump or config would in some cases invalidate large parts of the daemon's build graph. I started investigating several months ago, and saw a breakthrough only recently.
It seems that these less frequently used commands have trouble taking that value into account. There is also some history with workspace label prefixes in custom build flags. See in general #11128 and #9177 for historical, somewhat related issues.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
This works for me, be I still have to provide a minimal repo where it works:
Which operating system are you running Bazel on?
Ubuntu Linux 20.04 (+nix)
What is the output of
bazel info release
?release 6.0.0- (@non-git)
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.Its bazel 6.0.0 from nixpkgs.
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
See description above
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: