-
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
Remote: async upload #13655
Remote: async upload #13655
Conversation
Thanks for this @coeuvre! |
5b9cfdc
to
8e8922c
Compare
5fd6c3b
to
e9eb347
Compare
Rebased and fixed the tests. New tests are needed to cover the new code and this PR is ready to go! |
How does this interact with BES, and in particular |
BES uses
I will make followup PRs to update BES to use RemoteCache directly and remove the deduplication logic in RE doesn't read |
I really look forward to fixes for #11473, in particular to having it respect |
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.
If possible, could you split this into smaller parts during import? 😊
Add `shutdown` and `awaitTermination` to `AsyncTaskCache` which can be used to wait for in progress tasks finished. Part of #13655. PiperOrigin-RevId: 394169528
Update RemoteCacheClient#uploadActionResult to return a Future. Part of #13655. PiperOrigin-RevId: 394173767
Refactor UploadManifest to an upper level and update ExecutionServer to use it directly. Part of #13655. PiperOrigin-RevId: 394178331
Remove RemoteCache#upload. Use UploadManifest#upload directly in RemoteExecutionService. Part of #13655. PiperOrigin-RevId: 394606309
Add RxUtils#mergeBulkTransfer which is similar to waitForBulkTransfer but is used with Rx. Add UploadManifest#uploadAsync and update UploadManifest#upload to use it. Part of #13655. PiperOrigin-RevId: 395018504
Add --experimental_remote_cache_async flag, which when enabled, makes the uploads happen in the background. Part of #13655. PiperOrigin-RevId: 395020967
Update UI to display background uploads that are still active after the build with message like: ``` INFO: Build completed successfully, 5001 total actions Waiting for remote cache: 4911 uploads; 16s ``` Part of #13655. PiperOrigin-RevId: 395047830
Imported. @brentleyjones You can give it a try by setting |
@coeuvre This seems to work as advertised! Something that confused me though: at the end of a build, I saw the number of items waiting to be uploaded increase as other ones finished? For example, I saw this:
then after some finished, and the count went down, I saw it increase
that doesn't make sense to me? Also, a small UX feedback: in the profile.json, |
Ohh, another thought: this behaves like Maybe a new flag can replace |
Thanks for the feedback!
The steps of an async upload task are:
After the build finished, there could be multiple upload tasks running in the background and some of them may still waiting for the result of That being said, I understand that this may create confusion to users. One way to improve is before calling
For
Noted. |
…se after build finished. At the end of a build, the number of files waiting to be uploaded could increase as other ones finished. This PR fixes that. Also, changes to only emit profile block `upload outputs` for blocking uploads. Fixes #13655 (comment). Closes #13954. PiperOrigin-RevId: 398161750
@coeuvre Do we need a new issue to track the request for background (post-build) uploads? |
Yes, please help create a new issue to better track that (and other features you think are missing)! |
When remote cache is enabled, the outputs of locally executed actions are uploaded to the remote cache. However, the uploads take place as the part of a local action spawn which prevents dependent actions from starting .
This change introduces flag
--experimental_remote_cache_async
flag, which when enabled, makes the uploads happen in the background. Remote actions that need the output as input are still wait for the upload to finish, including the already started upload with the other inputs.Uploads that are still active after the build are waited to finish with message like:
This change also de-duplicates calls to FindMissingBlobs as well as file uploads to the remote cache. This is effectively the same as #13166 but with different implementation.
Fixes #13632.