Skip to content
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

Migrate EC2 to aws-sdk-go-v2 #16460

Merged
merged 14 commits into from
Apr 14, 2024

Conversation

rifelpet
Copy link
Member

@rifelpet rifelpet commented Apr 10, 2024

Ref: #16424

This largely finishes the migration to aws-sdk-go-v2. I'll update the issue with remaining steps and blockers.

This is a large PR and I did my best to break up commits into logical chunks, though each commit isnt necessarily able to compile. To get each commit to compile would have involved adding an extra AWSCloud.EC2V2() interface method and gradually migrating consumers to use it and then clean it up afterwards, which would have had a much wider impact.

/cc @hakman

@k8s-ci-robot k8s-ci-robot requested a review from hakman April 10, 2024 02:52
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/api area/nodeup area/provider/aws Issues or PRs related to aws provider area/provider/spotinst Issues or PRs related to spotinst provider area/rolling-update labels Apr 10, 2024
@rifelpet rifelpet force-pushed the aws-sdk-go-v2-ec2-final branch from 9626c43 to 1c24423 Compare April 10, 2024 02:55
@rifelpet rifelpet mentioned this pull request Apr 10, 2024
15 tasks
@hakman
Copy link
Member

hakman commented Apr 10, 2024

@rifelpet I think I am seeing a new error that prevents deleting the AWS clusters:

security-group:sg-062e8760d65edf1da error deleting resources, will retry: cannot revoke ingress for ID "sg-062e8760d65edf1da": operation error EC2: RevokeSecurityGroupIngress, https response error StatusCode: 400, RequestID: ea681b1f-28fa-4c1c-8b58-7ccd9b795e8d, api error InvalidRequest: The request received was invalid.

@hakman
Copy link
Member

hakman commented Apr 10, 2024

This is indeed huge, but looks great. Very nice work @rifelpet!
Still needs the fix for deleting the clusters, but LGTM.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 12, 2024
@rifelpet rifelpet force-pushed the aws-sdk-go-v2-ec2-final branch from daa1e86 to 78d8fb6 Compare April 13, 2024 20:03
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 13, 2024
@rifelpet
Copy link
Member Author

@rifelpet I think I am seeing a new error that prevents deleting the AWS clusters:

security-group:sg-062e8760d65edf1da error deleting resources, will retry: cannot revoke ingress for ID "sg-062e8760d65edf1da": operation error EC2: RevokeSecurityGroupIngress, https response error StatusCode: 400, RequestID: ea681b1f-28fa-4c1c-8b58-7ccd9b795e8d, api error InvalidRequest: The request received was invalid.

I was able to repro this with a very simple script. It seems like a bug in the v2 SDK given that it worked fine with the v1 SDK, but I changed the cleanup to use SecurityGroupRuleIDs instead and now it is passing 🤞🏻

@rifelpet
Copy link
Member Author

/retest

1 similar comment
@rifelpet
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 14, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 14, 2024
@k8s-ci-robot k8s-ci-robot merged commit f6faf5a into kubernetes:master Apr 14, 2024
23 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api area/nodeup area/provider/aws Issues or PRs related to aws provider area/provider/spotinst Issues or PRs related to spotinst provider area/rolling-update cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants