Skip to content

Commit b4af6ae

Browse files
authored
Merge pull request #7878 from eksctl-io/fix-sdk-retries
Retry throttling errors, disable retry rate-limiting
2 parents d0829b1 + 07324eb commit b4af6ae

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pkg/eks/retryer_v2.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package eks
22

33
import (
4+
"errors"
45
"net/http"
56

67
"github.com/aws/aws-sdk-go-v2/aws"
7-
88
"github.com/aws/aws-sdk-go-v2/aws/retry"
99

1010
"github.com/aws/aws-sdk-go/aws/awserr"
1111
"github.com/aws/smithy-go"
12-
"github.com/pkg/errors"
1312
)
1413

1514
const (
@@ -39,7 +38,10 @@ func (r *RetryerV2) IsErrorRetryable(err error) bool {
3938
}
4039

4140
var oe *smithy.OperationError
42-
return errors.As(err, &oe) && oe.Err != nil && isErrorRetryable(oe.Err)
41+
if !errors.As(err, &oe) {
42+
return true
43+
}
44+
return oe.Err != nil && isErrorRetryable(oe.Err)
4345
}
4446

4547
func isErrorRetryable(err error) bool {

pkg/eks/services_v2.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"sync"
66

77
"github.com/aws/aws-sdk-go-v2/aws"
8+
"github.com/aws/aws-sdk-go-v2/aws/ratelimit"
89
"github.com/aws/aws-sdk-go-v2/aws/retry"
910
"github.com/aws/aws-sdk-go-v2/service/cloudformation"
1011
"github.com/aws/aws-sdk-go-v2/service/ec2"
@@ -85,6 +86,7 @@ func (s *ServicesV2) CloudFormation() awsapi.CloudFormation {
8586
o.StandardOptions = []func(*retry.StandardOptions){
8687
func(so *retry.StandardOptions) {
8788
so.MaxAttempts = maxRetries
89+
so.RateLimiter = ratelimit.None
8890
},
8991
}
9092
})

0 commit comments

Comments
 (0)