-
Notifications
You must be signed in to change notification settings - Fork 629
🌱Migrate elb to AWS SDK v2 #5572
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
Hi @phuhung273. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
@phuhung273 it looks like the linter test is not happy, would you be able to fix it? Thanks! |
75dd933
to
f32eb9c
Compare
Sure thanks @damdo for taking a look, lint issue fixed. |
/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e |
/test pull-cluster-api-provider-aws-e2e |
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.
Looks reasonable to me, left one question.
/assign @punkwalker @nrb @richardcase
@damdo: GitHub didn't allow me to assign the following users: punkwalker. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@phuhung273 update: I have created a PR #5574 which will solve ServiceLimiter problem. You can find more details in it. On Side note: Looks like you implemented a new method |
8d549b6
to
257712d
Compare
Sure @damdo, I'm still not really get used to how an actual error looks like. If this run doesn't work I will try my local |
/test pull-cluster-api-provider-aws-e2e-blocking |
@phuhung273 there are panics in the CAPA controller (here)
Would you please be able to check? Having a quick look it might be starting from here and propagating down to the awserrors/errors.go:268 |
Thanks @damdo for pointing it out. Fixed by adding a nil check to ServiceLimiter. Let me know if we should start full e2e or wait for unresolved conversations. |
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.
LGTM 🚀
@phuhung273 Make sure to make the remaining small changes.
pkg/cloud/throttle/throttle.go
Outdated
|
||
if smithyErr != nil { | ||
limiter.ReviewResponseV2(ctx, smithyErr.ErrorCode()) | ||
return out, metadata, err | ||
} | ||
|
||
return out, metadata, nil |
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.
@phuhung273
Thank you for fixing this 👍 The nil check is good on smithyErr
.
However, Can you just return the err from L173 instead of nil? If the error is not smithy error, we will not be able to unwrap it, in such cases error should be passed to next middleware which can take care of it.
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.
I did it. But after looking at the function, I can see we initialize smithyErr
right at the start
cluster-api-provider-aws/pkg/cloud/awserrors/errors.go
Lines 239 to 240 in a2d41b7
func ParseSmithyError(err error) *SmithyError { | |
smithyErr := &SmithyError{} |
So the only way for ParseSmithyError
to return nil is when input err is nil. Then returning err
or nil are the same.
But I think your explanation is good, it can even cover the case someone changing the logic of ParseSmithyError
in the future. We should use your logic.
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.
Yeah, it's just the pattern of AWS SDK middleware, so didn't want to change it.
/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e |
/test pull-cluster-api-provider-aws-e2e |
Thank you for helping out the entire process @damdo |
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.
Thanks
/lgtm
@punkwalker let us know if you are happy with these latest changes.
/assign @richardcase @nrb
LGTM label has been added. Git tree hash: c6ed3cdc90c7eaafbd2c7ae1b3deb5477eeb3a5b
|
/assign @AndiDog @dlipovetsky |
Yes. LGTM. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nrb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
/kind deprecation
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #5405
Special notes for your reviewer:
Checklist:
Release note: