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(s3): parse MultipartUploadResponse to check error in body #4735

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

waynexia
Copy link
Member

S3 may return an error when the HTTP code is 200. Like this https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html#API_CompleteMultipartUpload_Example_4

This patch defines a MultipartUploadResult result which only contains error's definition. It will be deserialized on complete multipart upload's 200 result, to check if the body contains any error.

For more background reference to awslabs/aws-sdk-rust#1163

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
core/src/services/s3/writer.rs Outdated Show resolved Hide resolved
core/src/services/s3/writer.rs Outdated Show resolved Hide resolved
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@Xuanwo Xuanwo merged commit 9a50ef5 into apache:main Jun 14, 2024
76 checks passed
@waynexia waynexia deleted the parse-s3-result branch June 14, 2024 15:21
@tisonkun
Copy link
Member

@Xuanwo @waynexia I wonder if we need to release a 0.47.1 for this fix.

@waynexia Or we can work around this issue temporary in downstream like GreptimeDB?

@waynexia
Copy link
Member Author

It seems hard to downstream users to know the actual result, the error in body is discared before this method returns.

@tisonkun
Copy link
Member

tisonkun commented Jun 15, 2024

Then let's try to run a 0.47.1 release. But the unaligned version number among release artifactes is quite painful to bump ...

@Xuanwo
Copy link
Member

Xuanwo commented Jun 15, 2024

I'm willing to run this release.

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