-
Notifications
You must be signed in to change notification settings - Fork 158
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
Is Remote Build without the Bytes handled correctly when using the S3 proxy backend with a lifecycle policy? #624
Comments
Hi. I think that's correct (if unfortunate). IIRC in bazel's current setup, the build-without-the-bytes feature requires that none of the referenced (but not downloaded) blobs are deleted during the build. This isn't great, but I think people are working to make bazel cope with this scenario without crashing- see bazelbuild/bazel#14126 and bazelbuild/bazel#16660. You might want to wait for this feature to land before using build-without-the-bytes and cache eviction in the proxy backend. This could be improved on the bazel-remote side if we could figure out a way to implement a performant LRU-like eviction policy for the proxy backends. https://github.com/znly/bazel-cache has something that apparently works for GCS, but I don't have a GCS account to experiment with so I haven't tried implementing that in bazel-remote, and I haven't had time to investigate a similar solution for s3. |
Thanks for the reply. From this closed issue #185, bazel-remote can handle Build without the Bytes correctly using the local disk cache. So it seems like bazel-remote is able to know all the referenced blobs for each AC, right? Based on that, maybe we could make a request to S3 and ask it to update the timestamp (just like the option --s3.update_timestamps does)? |
When the s3.update_timestamps option is enabled, we update the timestamp of any blob after it is successfully retried from the backend. We should do the same when checking for blob existence in the Contains() function. I don't think this is sufficient to make builds-without-the-bytes work with the s3 proxy backend when eviction is enabled, but it might help. Relates to buchgr#624.
Hmmm. I see that the s3.update_timestamps feature was only used when fetching blobs from the backend, but not when checking for their existence. If we also update blob timestamps after they're confirmed to exist (ie in I don't think this will be sufficient however, because if bazel-remote finds a cache hit in the disk cache, it returns immediately without talking to the proxy backend. If we added such a call synchronously then I think that would slow bazel-remote down quite a bit, and if we added an async call we would need to be careful not to spike the number of active goroutines. |
When the s3.update_timestamps option is enabled, we update the timestamp of any blob after it is successfully retried from the backend. We should do the same when checking for blob existence in the Contains() function. I don't think this is sufficient to make builds-without-the-bytes work with the s3 proxy backend when eviction is enabled, but it might help. Relates to buchgr#624.
Thanks! I think this is enough for my case. I will close this issue. Thanks for the help! |
Hi guys,
I have a question.
For example, I setup a 7-day life policy on a S3 bucket. Suppose the bazel remote cache cannot find ac/cas locally and it asks S3. In the meantime, the S3 life policy triggers and it deletes corresponding ac/cas items. After that, the bazel client seems to throw digest not found exeception and fails the build. So it seems that the bazel remote cache will not make a request to validate the ac/cas items in S3?
Thanks
The text was updated successfully, but these errors were encountered: