-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Don't eagerly invalidate remote metadata when its TTL expires #26318
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
@tjgq This implements #26140 (comment), which breaks the existing TTL test cases in the BwoB integration test. I tried to modify them so that they verify the new behavior of the lease extension (deleting known stale action cache entries), but the lack of synchronization makes it difficult to assert on its effect. Can I just delete the tests? |
cc @coeuvre |
How about enabling build rewinding for these tests and assert build succeeded? |
src/main/java/com/google/devtools/build/lib/remote/RemoteLeaseExtension.java
Outdated
Show resolved
Hide resolved
That unfortunately doesn't work because the tests aren't full integration tests and don't go through |
@coeuvre I adapted the tests by simulating the retry. I think that the metadata stored in |
Build and action rewinding can recover from metadata whose corresponding contents are no longer available remotely, but are usually more efficient since they only invalidate action cache entries if the contents really are gone, not simply because their TTL expired.
This reverts commit 828628e.
cda58be
to
77e4be6
Compare
buildTarget("//a:bar"); | ||
waitDownloads(); | ||
|
||
// Assert: target was successfully built | ||
assertValidOutputFile("a/bar.out", "foo\nupdated bar\n"); |
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.
nit: Keep this assert. (I will do the change during import)
Let's keep it around for now to make this change simple. |
I can send a follow-up to remove it if you think that's the right move. We can also wait for this commit to settle for a while. |
Build and action rewinding can recover from metadata whose corresponding contents are no longer available remotely, but are usually more efficient since they only invalidate action cache entries if the contents really are gone, not simply because their TTL expired.
Fixes #26140