-
Notifications
You must be signed in to change notification settings - Fork 123
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
✨ support for files bigger than 1MB in sync #509
✨ support for files bigger than 1MB in sync #509
Conversation
…v2.0 will use the streaming api calls to upload the content and avoid the http 400 MAX_BLOCK_SIZE_EXCEEDED error
hi @greentim , |
Hello, the commit is now verified. There was a mismatch between my committer email and my github verified email addresses.
Thanks,Tim
On Wednesday, October 12, 2022 at 06:02:16 AM CDT, Ivan Trusov ***@***.***> wrote:
hi @greentim ,
thanks a lot for your PR! Please sign your commits, we don't approve any unsigned commits due to security reasons.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@matthayes please review this PR |
hi @greentim , |
Hello @renardeinside, |
aa72d8d
to
73a326b
Compare
73a326b
to
4a17b4f
Compare
hello @renardeinside, @jeremy010203 Sorry I missed the previous message for some reason. I have resolved conflicts and I believe this should be ready for review again. |
@matthayes is it possible to have a look to that PR please? |
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.
Sorry for the delayed review. I ran a test and this appears to work. I synced a large file, then fetched it, then ran a diff, and the contents matched. Thanks for the fix!
Please fix the failing unit test. Otherwise this looks good to me. |
Here's the fix:
|
Codecov Report
@@ Coverage Diff @@
## main #509 +/- ##
==========================================
+ Coverage 93.75% 93.77% +0.01%
==========================================
Files 98 98
Lines 3796 3805 +9
Branches 474 476 +2
==========================================
+ Hits 3559 3568 +9
Misses 179 179
Partials 58 58
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Proposed changes
Bug report: #508
The rest API for put only works for files 1MB or less. There is a separate api to call for larger files, that requires three or more calls: 1 to create the request, 1 or more add-block calls to upload 1MB chunks , and finally a close. This PR will use put if the file length is < 1MB, and otherwise uses the create/add/close apis.
Types of changes
What types of changes does your code introduce to dbx?
Put an
x
in the boxes that applyFurther comments
It was necessary to switch to using AsyncMock in the tests to properly mock the calls with the change to await the result of the api call, which is necessary to get the handle for the block uploads. test_delete_secure was duplicated in main and so one was removed. We have been using this patch in my company since June 2022 with no issues.