Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

S3 copy_object won't be retried. #704

Closed
babatakao opened this issue Mar 13, 2024 · 1 comment · Fixed by #706
Closed

S3 copy_object won't be retried. #704

babatakao opened this issue Mar 13, 2024 · 1 comment · Fixed by #706

Comments

@babatakao
Copy link

Since copy_object is not mark as idempotent, the copy operation is not retried on error, while other operations such as put_object are retried.

s3 = Fog::Storage.new(...)
directory = s3.directories.new(key: 'some-bucket')

directory.files.create(key: 'test', body: 'hello') # this request will be retried on error

file = directory.files.get('test')
file.copy('some-bucket', 'test2') # this request won't be retried on error

This behavior is inconvenient and inconsistent.

https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html says AWS SDK supports retry, so how about changing copy_object as idempotent?

geemus added a commit that referenced this issue Mar 18, 2024
geemus added a commit that referenced this issue Mar 18, 2024
@geemus
Copy link
Member

geemus commented Mar 18, 2024

Good callout and thanks for the detailed report. This should now be fixed on the main branch, and released in v3.22.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants