Skip to content

✨ Migrate ec2 to AWS SDK V2#5521

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
yiannistri:ec2-sdk-v2-migration
Jul 28, 2025
Merged

✨ Migrate ec2 to AWS SDK V2#5521
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
yiannistri:ec2-sdk-v2-migration

Conversation

@yiannistri
Copy link
Copy Markdown
Contributor

@yiannistri yiannistri commented Jun 4, 2025

What type of PR is this?

/kind feature
/kind cleanup

What this PR does / why we need it:

  • Migrates ec2 packages to AWS SDK v2.

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 #5403, #5411, #5409

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Migrate EC2 packages to AWS SDK v2

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Jun 4, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @yiannistri!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 4, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @yiannistri. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@yiannistri yiannistri force-pushed the ec2-sdk-v2-migration branch 16 times, most recently from 52a7c2f to 543a41c Compare June 5, 2025 12:15
@alexander-demicev
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 5, 2025
@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 16, 2025

@yiannistri hey would you be able to rebate now that the GC or merged? Thanks!

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 18, 2025

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

Copy link
Copy Markdown
Contributor

@punkwalker punkwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yiannistri This is the biggest of V2 migration. Thank you for working on this. I have requested few changes, otherwise this LGTM.


if len(inputFilters) > 0 {
out, err := s.EC2Client.DescribeSubnetsWithContext(context.TODO(), &ec2.DescribeSubnetsInput{
out, err := s.EC2Client.DescribeSubnets(context.TODO(), &ec2.DescribeSubnetsInput{
Copy link
Copy Markdown
Contributor

@punkwalker punkwalker Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we bring the context from parent calls here instead of using context.TODO()? Similarly, should we do it for all such EC2Client. i.e, if context is available in parent method, use it instead of TODO?

P.S. I know the context.TODO() has been around but thought of improving it while we are at it :)

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 21, 2025

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

4 similar comments
@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 21, 2025

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 21, 2025

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 22, 2025

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 23, 2025

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 23, 2025

Hey @yiannistri it looks like the PR never passed the full E2Es and the EKS E2Es
Screenshot 2025-07-23 at 12 17 07

Whereas the periodics against main for those tests have good pass rates:

I suspect there might be something either causing issues, or exacerbating flakes and making them permafailures.

Would you be able to take a look at the e2e test, maybe you could even try running it from your machine if that helps debugging. Thanks!

@sowjanyadreddy
Copy link
Copy Markdown

Looks like this issue also addressed changes needed for network code in #5409 . cc : @richardcase

@richardcase
Copy link
Copy Markdown
Member

Looks like this issue also addressed changes needed for network code in #5409 . cc : @richardcase

@yiannistri - i added that issue to the list of fixes in the description.

@yiannistri
Copy link
Copy Markdown
Contributor Author

/test pull-cluster-api-provider-aws-e2e

@yiannistri
Copy link
Copy Markdown
Contributor Author

/test pull-cluster-api-provider-aws-e2e

@yiannistri
Copy link
Copy Markdown
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks

@yiannistri
Copy link
Copy Markdown
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

@yiannistri
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@yiannistri
Copy link
Copy Markdown
Contributor Author

/retest

@yiannistri
Copy link
Copy Markdown
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

2 similar comments
@yiannistri
Copy link
Copy Markdown
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

@yiannistri
Copy link
Copy Markdown
Contributor Author

/test pull-cluster-api-provider-aws-e2e-eks pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 27, 2025

/test pull-cluster-api-provider-aws-e2e

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 28, 2025

/assign @richardcase @nrb @AndiDog @dlipovetsky

For approval

@damdo
Copy link
Copy Markdown
Member

damdo commented Jul 28, 2025

All e2es are finally passing 🎉

@nrb
Copy link
Copy Markdown
Contributor

nrb commented Jul 28, 2025

/approve

Thank you for persevering on this change! It's hugely helpful.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[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

Details 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

Copy link
Copy Markdown
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

/lgtm

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: cb7dad31591eb62ec90bac46947aca6dab9d5008

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Migrate ec2 code to AWS SDK v2