You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
This PR contains various improvements to the multipart upload flow. I
realize that it's a lot in the same PR, sorry about that.
* always use multipart upload
* retry chunks when they fail. I expect that this will increase
stability compared to the previous flow.
* use the new endpoints, since there was a breaking change (there's an
upload_id that's now exposed)
* refresh token between each chunk and before `/finalize`. This was
necessary because the new flow can include several requests over more
than an hour.
* Show a spinner with the DB size during validation. The first thing we
do when we start an upload is that we check that the DB is valid. For
large uploads, this could make it look like the CLI is hanging.
* Add debug logging for multipart upload, using the
`TURSO_DEBUG_UPLOAD=1` environment variable. I wasn't able to use the
existing `--debug` flag, because that one logs the bodies of the PUT
requests, and they can contain control characters that will wreck your
terminal.
* Update the progress tracker at least every 2 seconds. Previously, it
was updated every 1% of an upload. For very large uploads, this made it
look like the CLI was hanging.
## Testing
I uploaded a very small databases (few KB), one that was ~100MB, and one
that was 1GB. There are also some automated tests in the PR.
## Failing CI test
The integration tests are failing in the CI. It's because multipart
upload isn't deployed to us-east-1 yet. I changed the integration tests
to use `eu-north-1`. You can see a passing run in that PR
(tursodatabase/tursotest#93).
## AI use
The code was mostly written by Claude, but I iterated a lot with it.
0 commit comments