Merge pull request #11285 from olemarkus/warm-fix-errors

Make warm pool no ASG found error retryable
This commit is contained in:
Kubernetes Prow Robot 2021-04-23 08:14:02 -07:00 committed by GitHub
commit c3727bffa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,9 @@ func (e *WarmPool) Find(c *fi.Context) (*WarmPool, error) {
AutoScalingGroupName: e.Name,
})
if err != nil {
if awsup.AWSErrorCode(err) == "ValidationError" {
return nil, nil
}
return nil, err
}
if warmPool.WarmPoolConfiguration == nil {
@ -96,6 +99,9 @@ func (*WarmPool) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *WarmPool) error
_, err := svc.PutWarmPool(request)
if err != nil {
if awsup.AWSErrorCode(err) == "ValidationError" {
return fi.NewTryAgainLaterError("waiting for ASG to become ready")
}
return fmt.Errorf("error modifying warm pool: %w", err)
}
} else {