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

r/s3_bucket: Retry tagging on OperationAborted #2008

Merged
merged 1 commit into from
Oct 23, 2017

Conversation

radeksimko
Copy link
Member

This is to address a failure which came up from one of our smoke tests:

[05:03:38]	Error applying plan:
[05:03:38]	
[05:03:38]	1 error(s) occurred:
[05:03:38]	
[05:03:38]	* aws_s3_bucket.tectonic: 1 error(s) occurred:
[05:03:38]	
[05:03:38]	* aws_s3_bucket.tectonic: "atc-inst-1282-10e665e9abe013026fccacc6d623a5e3": OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
[05:03:38]	status code: 409, request id: AF3A905545907743, host id: cbTfeOjd6fqm+dDa/a3Y2ARNfp91hNucVLtrAweY/waRZPYHgJmSKBfd4QHDpmr6dV56JwOpLn0=

Snippet from debug log:

2017/10/17 04:00:38 [DEBUG] [aws-sdk-go] DEBUG: Response s3/PutBucketTagging Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 409 Conflict
Connection: close
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Tue, 17 Oct 2017 04:00:36 GMT
Server: AmazonS3
X-Amz-Id-2: cbTfeOjd6fqm+dDa/a3Y2ARNfp91hNucVLtrAweY/waRZPYHgJmSKBfd4QHDpmr6dV56JwOpLn0=
X-Amz-Request-Id: AF3A905545907743


-----------------------------------------------------
2017/10/17 04:00:38 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>OperationAborted</Code><Message>A conflicting conditional operation is currently in progress against this resource. Please try again.</Message><RequestId>AF3A905545907743</RequestId><HostId>cbTfeOjd6fqm+dDa/a3Y2ARNfp91hNucVLtrAweY/waRZPYHgJmSKBfd4QHDpmr6dV56JwOpLn0=</HostId></Error>

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Oct 23, 2017
@@ -31,3 +31,24 @@ func retryOnAwsCode(code string, f func() (interface{}, error)) (interface{}, er
})
return resp, err
}

func retryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Any ideas on how to best surface these kinds of helper functions for others are much welcome 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

The only way I can think of is to spend some time on replacing "the old way" with these helpers in all places, b/c most people like to learn from existing code.

Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

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

👍

@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants