-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure cache is done writing before exit (#6603)
### Description This PR contains intertwined changes: - Waiting on all cache writes to finish before we exit the run. We leverage the signal handler here so we can make sure we wait regardless of how/why the run exits. - Printing errors from artifact upload failures. This differs from Go where we [throw generated errors away](https://github.com/vercel/turbo/blob/main/cli/internal/cache/async_cache.go#L79C12-L79C12) (I'm not sure this is desired since we do [format these errors for human consumption](https://github.com/vercel/turbo/blob/main/cli/internal/client/cache.go#L70)) - Correctly deserialize Vercel API errors. As per the [docs](https://vercel.com/docs/rest-api/errors) there's a containing object with an `error` field that has the information. - Pass team information when saving artifacts. This matches all of the other artifact api calls. Each commit is reviewable on it's own. ### Testing Instructions The `turbo` cli is a great candidate for these. Make sure you're logged in and linked to Vercel team. For testing that we wait until upload finishes: ``` # Ensure there's no error printed at the end of the run and the "Finishing writing to cache" message appears while we upload the large debug binary [0 olszewski@chriss-mbp] /Users/olszewski/code/vercel/turborepo $ turbo_dev build --filter=cli --force ... ...Finishing writing to cache... # Should be a FULL TURBO due to the previous command [0 olszewski@chriss-mbp] /Users/olszewski/code/vercel/turborepo $ turbo_dev build --filter=cli --remote-only --remote-cache-timeout=120 ``` Closes TURBO-1770 --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
- Loading branch information
1 parent
0709591
commit fb74da2
Showing
10 changed files
with
79 additions
and
25 deletions.
There are no files selected for viewing
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
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
fb74da2
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.
Successfully deployed to the following URLs:
rust-docs – ./
rust-docs.vercel.sh
turbo-xi.vercel.sh
rustdoc.turbo.build
rust-docs-git-main.vercel.sh