-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Fix unconditional Skyframe invalidation with --lockfile_mode=update
#19842
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
Conversation
meteorcloudy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for figuring this out!!
|
@meteorcloudy I flagged the original issue for Bazel 6.4.0 since I assume we want lockfiles to work well in 6.4.0 before we turn them on by default in 7.X.0. Do you agree? |
61d3807 to
fc1ca22
Compare
|
I had to update the test to allow networking. |
|
To fix the test failure, you'll have to add |
|
Or enable internet access |
fc1ca22 to
64d52e2
Compare
Nice, changed it to do that. |
Ok, let's get this one in 6.4 |
Ensure that `BazelLockFileModule` only updates `MODULE.bazel.lock` if the content of the file needs to change. Every such update changes the file's metadata, which results in Skyframe invalidation of, in particular, all configurations. This broke `bazel config`, which uses `MemoizingEvaluator#getDoneValues()` to directly observe Skyframe state. Since this type of invalidation can also be caused by users and deviates from the usual "incremental correctness" guarantees provided by Bazel, let `config` show a descriptive error when no configurations are found.
64d52e2 to
7f0bba2
Compare
|
I'm importing this one to accelerate the process. Sent out to @gregestren @katre for review |
…update Ensure that `BazelLockFileModule` only updates `MODULE.bazel.lock` if the content of the file needs to change. Every such update changes the file's metadata, which results in Skyframe invalidation of, in particular, all configurations. This broke `bazel config`, which uses `MemoizingEvaluator#getDoneValues()` to directly observe Skyframe state. Compared to the original commit bazelbuild@78db9ae, this cherry-pick does not include the change to `bazel config` as it may not be backwards compatible (changes the exit code in certain situations). Fixes bazelbuild#19823 Closes bazelbuild#19842. PiperOrigin-RevId: 574133346 Change-Id: I5886c91fc6b7b938a7dee59ea75aa7b8afb5b161 Fixes bazelbuild#19843
#19848) …update Ensure that `BazelLockFileModule` only updates `MODULE.bazel.lock` if the content of the file needs to change. Every such update changes the file's metadata, which results in Skyframe invalidation of, in particular, all configurations. This broke `bazel config`, which uses `MemoizingEvaluator#getDoneValues()` to directly observe Skyframe state. Compared to the original commit 78db9ae, this cherry-pick does not include the change to `bazel config` as it may not be backwards compatible (changes the exit code in certain situations). Fixes #19823 Closes #19842. PiperOrigin-RevId: 574133346 Change-Id: I5886c91fc6b7b938a7dee59ea75aa7b8afb5b161 Fixes #19843
Ensure that
BazelLockFileModuleonly updatesMODULE.bazel.lockif the content of the file needs to change. Every such update changes the file's metadata, which results in Skyframe invalidation of, in particular, all configurations. This brokebazel config, which usesMemoizingEvaluator#getDoneValues()to directly observe Skyframe state.Since this type of invalidation can also be caused by users and deviates from the usual "incremental correctness" guarantees provided by Bazel, let
configshow a descriptive error when no configurations are found.Fixes #19823