Open SinimaWath opened 1 month ago
I'm not sure if this is related, but I also noticed that commands such as bazel info
or bazel mod
cause invalidaiton of large portions of skyframe. It can be easily verified with bazel build && bazel dump --skyframe=summary && bazel info && bazel dump --skyframe=summary
@tpasternak You are right.
Checked and even just bazel info
invalidate part of cache, thanks!
@tpasternak Are you using --disk_cache
or --remote_cache
when you reproduce this?
I'm seeing some weird Skyframe invalidation when using these flags, but not without them.
Changed keys without new values: [ActionLookupData0{actionLookupKey=ConfiguredTargetKey{label=@@rules_java~//toolchains:platformclasspath, config=BuildConfigurationKey[b85621dae172f731976165fe86631f99030f401e70ed2b02d58c69595e5ea36d]}, actionIndex=0}]
Possibly related: https://github.com/bazelbuild/bazel/issues/22367
@tpasternak Could you build Bazel with the patch I added to that issue and rerun on your reproducer?
Does this repro with --noexperimental_merged_skyframe_analysis_execution
? I'm wondering if it's the limitation described in this commit description (and afaik not yet lifted since then): https://github.com/bazelbuild/bazel/commit/d94816a68980628e43f509bcd6a49e98984658b5 (although I would concur that bazel info
at least ought not to invalidate anything).
@fmeum with your help I figured out what's wrong - I was using --override_repository
when running build, but not when running bazel info
. When I tried bazel info --override_repository
it didn't trigger skyframe eviction
Probably my comments are unrelated to the original issue, sorry for messing
Does this repro with
--noexperimental_merged_skyframe_analysis_execution
? I'm wondering if it's the limitation described in this commit description (and afaik not yet lifted since then): d94816a (although I would concur thatbazel info
at least ought not to invalidate anything).
@tjgq
Repro without --noexperimental_merged_skyframe_analysis_execution
Description of the bug:
Running: 1 -
bazel info
2 -bazel cquery target
3 -bazel run/build target
Invalidate part of cache (for example, suddenly npm modules start extracting, but must be taken from cache). For more info see reproduction steps
Which category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Add to
~/.bazelrc
:1 -
git clone https://github.com/bazelbuild/examples.git
- Clone examples repo 2 -cd frontend
- go to frontend example. 3 -bazel build //next.js:next
- build application 4 -bazel build //next.js:next
- check build is from cache 5 -bazel info && bazel cquery //next.js:next && bazel build //next.js:next
After step 5, in logs (
bazel info server_log
) we see there wereExtracting npm package
(building without info and cquery doesn't have extracting npm package):Which operating system are you running Bazel on?
macos
What is the output of
bazel info release
?release 7.1.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 HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
https://github.com/bazelbuild/bazel/issues/17914
Any other information, logs, or outputs that you want to share?
GrpcServerImpl.executeCommand
logs, without --client-env (removed it)