Skip to content
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

Fix upload part size when disable_multipart is set #131

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

cappyzawa
Copy link
Member

An error occurred in my pipeline using s3-resource.

0 B / 3.46 MB [------------------------------------------------------] 0.00 % 0serror running command: ConfigError: part size must be at least 5242880 bytes

I set disable_mutipart: true in source configuration.

Before, when deisalbe_multipart is set, upload part size is file size + 1.

uploader.PartSize = fSize + 1

S3 compatible provider has a minimum size of the upload part.
Amazon S3 Multipart Upload Limits - Amazon Simple Storage Service

So, if the file size is smaller than this, the upload fails.
I fixed it.

Sorry, I can't write the test for these changes.
But I confirmed that this patch works for a pipeline that has errors.

3.46 MB / 3.46 MB [======================================] 100.00 % 6.50 MB/s 0s

Signed-off-by: cappyzawa <cappyzawa@yahoo.ne.jp>
@vito
Copy link
Member

vito commented Jul 11, 2019

thanks!

@vito vito merged commit e797176 into concourse:master Jul 11, 2019
@cappyzawa cappyzawa deleted the fix/multipart branch July 11, 2019 13:29
jamieklassen pushed a commit to vmware-archive/release-notes that referenced this pull request Jul 15, 2019
concourse/s3-resource#131

Signed-off-by: Jamie Klassen <cklassen@pivotal.io>
nader-ziada pushed a commit to vmware-archive/release-notes that referenced this pull request Jul 18, 2019
concourse/s3-resource#131

Signed-off-by: Jamie Klassen <cklassen@pivotal.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants