-
Notifications
You must be signed in to change notification settings - Fork 182
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
When using async uploads, S3Mock incorrectly stores unsigned, chunked uploads without removing meta (chunk, checksum) information. #1662
Comments
@vlbaluk I added an integration test using TransferManager that is working just fine, see linked PR. |
@afranken, Big thanks for looking at it. I see you set explicitly Is it safe to change it for uploads to S3, or could it potentially disrupt any processes? |
@vlbaluk when I change the line to |
I added checksum support in version 2.17.0: Older versions would ignore the additional bytes the AWS SDK adds to the payload when asking for checksum validation of (mulitpart) uploads. |
see also #1123 |
Got the same problem using 3.5.1
Test output: |
@glennvdv how do you construct the async client? |
Using auto configuration from spring boot and Spring Cloud for Amazon Web Services |
@afranken We used crtBuilder() for constructing crtClient:
You may be using a different HTTP client, which could explain the difference in our setups. |
@glennvdv I meant the actual code you are using to construct the client. As I said, I can't reproduce the problem locally. @vlbaluk that looks almost exactly the same as the client I'm using in the integration tests: |
@afranken i let spring boot create the async client. From there source they do something like this
|
Many hard-coded paths, sizes etc make it hard to test with files other than the default "sampleFile.txt" which is 36bytes in size. Using even slightly larger payloads leads to errors during uploads. #1662
Many hard-coded paths, sizes etc make it hard to test with files other than the default "sampleFile.txt" which is 36bytes in size. Using even slightly larger payloads leads to errors during uploads. #1662
Many hard-coded paths, sizes etc make it hard to test with files other than the default "sampleFile.txt" which is 36bytes in size. Using even slightly larger payloads leads to errors during uploads. #1662
Some http clients (like the AWS SDKs) do not cope well if we return errors from APIs before consuming the incoming stream. Make sure we always consume all bytes before processing the streams. #1662
Some http clients (like the AWS SDKs) do not cope well if we return errors from APIs before consuming the incoming stream. Make sure we always consume all bytes before processing the streams. #1662
Some http clients (like the AWS SDKs) do not cope well if we return errors from APIs before consuming the incoming stream. Make sure we always consume all bytes before processing the streams. #1662
Some http clients (like the AWS SDKs) do not cope well if we return errors from APIs before consuming the incoming stream. Make sure we always consume all bytes before processing the streams. #1662
after testing with different configurations of clients and upload files in different sizes, I may have found the problem: We currently do not handle chunked, unsigned uploads correctly, either we cut off some of the chunks before persisting the bytes to disk, or we write the chunks together with their chunk boundaries to disk. |
uploading chunked, signed data works without issues, BTW. |
S3Mock is not functioning as expected with S3TransferManager.
Experiment: the file content is "BBBBB"
Code snippet:
Checked with 3.4.0 and 2.11.0 docker versions.
Originally posted by @vlbaluk in #1613 (comment)
The text was updated successfully, but these errors were encountered: