-
Notifications
You must be signed in to change notification settings - Fork 71
Optimize target group operations #495
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
Conversation
|
|
||
| ResourceTypeTargetGroup ResourceType = resourceTypePrefix + "targetgroup" | ||
|
|
||
| maxArnsPerGetResourcesApi = 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can you add link to the limit please
| if err != nil { | ||
| return model.TargetGroupStatus{}, | ||
| fmt.Errorf("Failed UpdateTargetGroup %s due to %s", aws.StringValue(latticeTgSummary.Id), err) | ||
| fmt.Errorf("Failed UpdateTargetGroup %s due to %s", aws.StringValue(latticeTg.Id), err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: %w for err
| // Can get only one arn through the above search criteria. | ||
| arn := arns[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets throw or log error when assumption does not work
| if match { | ||
| switch status { | ||
| case vpclattice.TargetGroupStatusCreateInProgress, vpclattice.TargetGroupStatusDeleteInProgress: | ||
| return nil, errors.New(LATTICE_RETRY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retrun fmt.Errorf("%w, delete in progress id=%d", runtime.RetryErr)
What type of PR is this?
enhancement
Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:
Testing done on this change:
Automation added to e2e:
Will this PR introduce any new dependencies?:
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.