aws-sdk-go-v2
aws-sdk-go-v2 copied to clipboard
ACMPCA CertificateIssuedWaiter default "retryable" behavior possibly incorrect
Documentation
- [X] I've gone though the API reference
- [X] I've checked AWS Forums and StackOverflow for answers
- [X] I've searched for previous similar issues and didn't find any solution
Describe the bug
When the CertificateIssuedWaiter sees an error come back from GetCertificate, it queries a callback set on the options to determine if it should retry based on the error seen.
The default implementation of this option callback is the certificateIssuedStateRetryable function.
This function has the following behavior:
- If no error, function returns
false, nil
which results in theWaitOutput
function returning the certificate ✅ - if there is an error, and it is a RequestInProgressException error, the function returns
true, nil
, which results in theWaitOutput
function retrying the operation ✅ - if there is an error and it is not a RequestInProgressException error, the function still returns
true, nil
, which results in theWaitOutput
function retrying the operation ❌
This behavior seems to differ from the Java SDK, which will only retry on RequestInProgressException, and otherwise rethrow other exceptions.
Seems like the function should return the error if it isn't a RequestInProgressException so that WaitOutput
will bubble the error up.
Expected behavior
Waiter should only retry on RequestInProgressException and not for every error.
Current behavior
Waiter retries on any error.
Steps to Reproduce
N/A
Possible Solution
No response
AWS Go SDK version used
github.com/aws/aws-sdk-go-v2/service/acmpca v1.14.0
Compiler and Version used
go version go1.17.6 darwin/amd64
Operating System and version
N/A
Hi @azdagron thanks for reaching out. Can you provide more information on how we can reproduce this behavior?
This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
Hi @vudh1. I didn't discover this by having a problem firsthand. Rather, I was looking through the SDK code when we migrated to v2 to make double check some usage of ours and noticed this code and thought it looked wrong. I looked up the counterpart in the Java library to see what happened there and noticed the behavior difference.
I don't know if it is a bug, but does seem to represent an inconsistency in behavior between the Go and Java SDKs.
Hi there,
The waiter definition is what controls which error is retried on, and which error is not. Since the waiter is generated based on that model definition, we have decided that at this point since this is not blocking you, its a 2 year old issue we are going to close this.
If new customers are seeing this issue and still think this should be fixed, please open a new separate issue.
Thanks, Ran~
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.