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

Report errors leading to failure to abort multipart upload #2990

Closed
2 tasks
janklimo opened this issue Mar 6, 2024 · 3 comments · Fixed by #2991
Closed
2 tasks

Report errors leading to failure to abort multipart upload #2990

janklimo opened this issue Mar 6, 2024 · 3 comments · Fixed by #2991
Assignees
Labels
feature-request A feature should be added or improved. in-progress Work is in progress to resolve the issue.

Comments

@janklimo
Copy link

janklimo commented Mar 6, 2024

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.

def abort_upload(upload_id, options, errors)
@client.abort_multipart_upload(
bucket: options[:bucket],
key: options[:key],
upload_id: upload_id
)
msg = "multipart upload failed: #{errors.map(&:message).join("; ")}"
raise MultipartUploadError.new(msg, errors)
rescue MultipartUploadError => error
raise error
rescue => error
msg = "failed to abort multipart upload: #{error.message}"
raise MultipartUploadError.new(msg, errors + [error])
end

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 janklimo added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 6, 2024
@alextwoods
Copy link
Contributor

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?

@mullermp
Copy link
Contributor

mullermp commented Mar 6, 2024

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

@jterapin jterapin added in-progress Work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 11, 2024
@jterapin jterapin assigned jterapin and alextwoods and unassigned jterapin Mar 11, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. in-progress Work is in progress to resolve the issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants