aws-sdk-go-v2 icon indicating copy to clipboard operation
aws-sdk-go-v2 copied to clipboard

ACMPCA CertificateIssuedWaiter default "retryable" behavior possibly incorrect

Open azdagron opened this issue 3 years ago • 3 comments

Documentation

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 the WaitOutput function returning the certificate ✅
  • if there is an error, and it is a RequestInProgressException error, the function returns true, nil, which results in the WaitOutput 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 the WaitOutput 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

azdagron avatar Feb 09 '22 16:02 azdagron

Hi @azdagron thanks for reaching out. Can you provide more information on how we can reproduce this behavior?

vudh1 avatar Mar 25 '22 22:03 vudh1

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.

github-actions[bot] avatar Mar 28 '22 00:03 github-actions[bot]

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.

azdagron avatar Mar 28 '22 14:03 azdagron

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~

RanVaknin avatar May 02 '24 20:05 RanVaknin

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 May 02 '24 20:05 github-actions[bot]