Support multipart upload#999
Conversation
09dd270 to
076e447
Compare
fe9e9a9 to
a2579a2
Compare
a2579a2 to
dbbf132
Compare
f264e48 to
f5c4b9f
Compare
f5c4b9f to
6322e86
Compare
67c1b8a to
055f783
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds multipart upload support for large database files to the Turso CLI, allowing efficient uploads of files over 100MB. The implementation includes comprehensive test coverage for both single-part (v1) and multipart (v2) upload flows, with proper progress tracking and error handling.
Key changes:
- Added multipart upload implementation with automatic threshold-based selection (100MB)
- Implemented comprehensive test suite for upload functionality with mock server
- Added
--multipartflag to force multipart upload mode
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
internal/turso/tursoServer_test.go |
Comprehensive test suite with mock server, test helpers, and tests for single-part, multipart, and progress tracking functionality |
internal/turso/tursoServer.go |
Core multipart upload implementation with chunk management, progress tracking, and file locking |
internal/turso/turso.go |
Added PutBinary method and Content-Length header handling for chunk uploads |
internal/turso/databases.go |
Integrated multipart upload logic with automatic threshold-based selection (100MB) |
internal/cmd/group_flag.go |
Updated flag parsing functions to support multipart parameter |
internal/cmd/db_create.go |
Added multipart flag parameter to database creation flow |
internal/cmd/db_import.go |
Declared and registered --multipart flag for import command |
go.mod |
Added testify dependency for improved test assertions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
055f783 to
bbf466f
Compare
bbf466f to
98be41b
Compare
98be41b to
4cad823
Compare
|
This PR is good to go, but this error in CI prevents me from merging:
I'm investigating ⌛ |
I used the opportunity to also add tests for v1 upload.
AI disclosure
Claude wrote most of the code, but I revised it and iterated on it.