-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for upload speed / remaining in the cache upload step (#8081
) ### Description When turbo is waiting for the cache, don't really expose any data to the user. This PR modifies the cache put operation to take a stream and introduces a new stream adapter that captures a running history of writes using a ring buffer. These requests are stored in a hashmap which is read by the spinner while waiting for shutdown, and a live number is posted with the remaining bytes and current upload speed. Also gracefully shuts down the upload phase when pressing ctrl-c Before: ``` >> ...Finishing writing to cache... WARNING failed to contact remote cache: skipping HTTP Request, too many failures have occurred. Last error: error sending request for url (https://vercel.com/api/v8/artifacts/1e1db6d9c17b138d): operation timed out ``` After: ``` > ...Finishing writing to cache... (1.50GB remaining, 8.86MB/s) WARNING the cache artifact for d6b10341668ff294 was too large to upload within the timeout ``` https://asciinema.org/a/s9AsFiVHQRISc22Ve0YY6IlTQ ### Testing Instructions TBD Closes TURBO-2977
- Loading branch information
Showing
17 changed files
with
418 additions
and
60 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.