aws-sdk-ruby icon indicating copy to clipboard operation
aws-sdk-ruby copied to clipboard

Report errors leading to failure to abort multipart upload

Open janklimo opened this issue 4 months ago • 2 comments

Describe the feature

Report upload errors that trigger multipart upload abort. In this code, the original errors get lost if the exception is raised while aborting the upload.

https://github.com/aws/aws-sdk-ruby/blob/0c9cf8177e0476a415e28aa7140d3bc91a75bb6e/gems/aws-sdk-s3/lib/aws-sdk-s3/multipart_stream_uploader.rb#L98-L111

The exception thrown being

Seahorse::Client::NetworkingError
Failed to open TCP connection to xxx.s3.eu-central-1.amazonaws.com:443 (getaddrinfo: Temporary failure in name resolution) (Seahorse::Client::NetworkingError)

Use Case

Started seeing these errors pop up recently:

Aws::S3::MultipartUploadError
failed to abort multipart upload: Failed to open TCP connection to xxx.s3.eu-central-1.amazonaws.com:443 (getaddrinfo: Temporary failure in name resolution) (Aws::S3::MultipartUploadError)

It would be useful to see what upload errors lead up to the abort.

Proposed Solution

Report MultipartUploadError with a list of original upload errors, together with any subsequent errors.

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

SDK version used

aws-sdk-s3 (1.143.0)

Environment details (OS name and version, etc.)

macOS 14.3.1

janklimo avatar Mar 06 '24 04:03 janklimo

I believe the errors that resulted in the upload being aborted should be accessible through the errors accessor on the MultipartUploadError that is raised, but they aren't exposed in the message.

Maybe we should add those to the message or add a to_s method that will include them?

alextwoods avatar Mar 06 '24 18:03 alextwoods

msg = "failed to abort multipart upload: #{error.message}" 

This should probably be similar to line 104 - we should collect the errors for the message and put them on the accessor

mullermp avatar Mar 06 '24 19:03 mullermp

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Mar 12 '24 17:03 github-actions[bot]