Skip to content

✨ Migrate ec2 to AWS SDK V2 #5521

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yiannistri
Copy link

@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

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. labels Jun 4, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ankitasw for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Jun 4, 2025
@k8s-ci-robot
Copy link
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
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.

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
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 11, 2025
@yiannistri yiannistri force-pushed the ec2-sdk-v2-migration branch from 17c1c53 to 2e0229a Compare June 12, 2025 09:00
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 12, 2025
@yiannistri yiannistri force-pushed the ec2-sdk-v2-migration branch from 2e0229a to aa39537 Compare June 12, 2025 09:06
@yiannistri yiannistri mentioned this pull request Jun 12, 2025
5 tasks
@yiannistri yiannistri force-pushed the ec2-sdk-v2-migration branch 6 times, most recently from a5d2bd5 to aa39537 Compare June 12, 2025 14:24
miyadav added a commit to miyadav/cluster-api-provider-aws that referenced this pull request Jun 13, 2025
1.Since ssm interface provided earlier is removed , new is now at  pkg/cloud/services/ssm/service.go
2.Modified client code for ssm client  pkg/cloud/scope/clients.go
3.In the ec2 package updated references of aws-sdk-go/ssm to point to aws-sdk-go-v2/ssm
4.Types provided by aws-sdk-go-v2/ssm/types pacakage those , references in launchtemplate_test for ec2 package is updated as well
*The launchtemplate_test.go failures are ignored for now , believe the update done by - kubernetes-sigs#5521 will fix it*
@yiannistri yiannistri force-pushed the ec2-sdk-v2-migration branch 4 times, most recently from 0ece196 to 9704c3a Compare June 13, 2025 08:58
@damdo
Copy link
Member

damdo commented Jun 19, 2025

Hey @yiannistri would you be able to rebase? Thanks!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 19, 2025
@yiannistri yiannistri force-pushed the ec2-sdk-v2-migration branch from 9704c3a to 9711485 Compare June 20, 2025 09:55
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 20, 2025
Copy link
Contributor

@nrb nrb left a comment

Choose a reason for hiding this comment

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

Thank you for taking on this piece in particular, it's a big one!

metadataOptions.InstanceMetadataTags = infrav1.InstanceMetadataState(*v.MetadataOptions.InstanceMetadataTags)
}
metadataOptions.HTTPEndpoint = infrav1.InstanceMetadataState(string(v.MetadataOptions.HttpEndpoint))
metadataOptions.HTTPPutResponseHopLimit = int64(*v.MetadataOptions.HttpPutResponseHopLimit)
Copy link
Contributor

Choose a reason for hiding this comment

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

This one would still need a nil check since it's de-referencing a pointer.

@yiannistri yiannistri force-pushed the ec2-sdk-v2-migration branch from 9711485 to 4f9ce70 Compare June 23, 2025 08:56
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 23, 2025
@damdo
Copy link
Member

damdo commented Jun 24, 2025

/retest

@k8s-ci-robot
Copy link
Contributor

@yiannistri: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-e2e-eks 1f72f29 link false /test pull-cluster-api-provider-aws-e2e-eks
pull-cluster-api-provider-aws-e2e 17c1c53 link false /test pull-cluster-api-provider-aws-e2e
pull-cluster-api-provider-aws-e2e-blocking 4f9ce70 link true /test pull-cluster-api-provider-aws-e2e-blocking

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. needs-priority needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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
6 participants