Skip to content

✨ Migrate S3, Sessions and Endpoints packages to AWS SDK v2 #5389

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

Merged
merged 12 commits into from
May 9, 2025

Conversation

punkwalker
Copy link
Contributor

@punkwalker punkwalker commented Mar 13, 2025

What type of PR is this?
/kind feature
/kind cleanup

What this PR does / why we need it:
It is initial aws-sdk-go-v2 migration for few components. This PR only migrates S3 Client to V2.
I have created this PR as a duplicate of #5272 as @mjlshen does not have cycles to work on it. So I will be working on this migration going forward. I wanted to make sure we get quicker review on this migration PRs.

Which issue(s) this PR fixes:
Fixes: #5400
Fixes: #5414

Special notes for your reviewer:
This migration will require multiple such PRs. It would be great if we can get some thoughts on the approach of this migration. It might be missing some test cases for V2 clients but we will add it as we go along.

Checklist:

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

Release note:

Migrate the S3 service to aws-sdk-go-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. labels Mar 13, 2025
@k8s-ci-robot k8s-ci-robot requested review from faiq and serngawy March 13, 2025 00:37
@k8s-ci-robot
Copy link
Contributor

Welcome @punkwalker!

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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 13, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @punkwalker. 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.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 13, 2025
@faiq
Copy link
Contributor

faiq commented Mar 13, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 13, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 13, 2025
@nrb
Copy link
Contributor

nrb commented Mar 13, 2025

Awesome, thank you @punkwalker! This is super valuable but not flashy work.

I agree that we'll need to do this in multiple PRs.

Maybe we should come up with a checklist of areas that would be logically separate and put that checklist in #2225? We could also create separate issues for each, if we think this spans releases. We can discuss at the next community meeting on Monday, 17 March?

@nrb
Copy link
Contributor

nrb commented Mar 17, 2025

From community call on March 17:

  • Identity and sessions were changed in this PR, but should be a smaller change going forward, since it's already done.
  • We'll break up work by service in pkg/cloud/services/
  • Need to make sure logging messages are the same, regardless of middleware implementation.

@nrb nrb added this to the v2.9 milestone Mar 17, 2025
@richardcase
Copy link
Member

/test ?

@k8s-ci-robot
Copy link
Contributor

@richardcase: The following commands are available to trigger required jobs:

/test pull-cluster-api-provider-aws-build
/test pull-cluster-api-provider-aws-build-docker
/test pull-cluster-api-provider-aws-test
/test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

/test pull-cluster-api-provider-aws-apidiff-main
/test pull-cluster-api-provider-aws-e2e
/test pull-cluster-api-provider-aws-e2e-blocking
/test pull-cluster-api-provider-aws-e2e-clusterclass
/test pull-cluster-api-provider-aws-e2e-conformance
/test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
/test pull-cluster-api-provider-aws-e2e-eks
/test pull-cluster-api-provider-aws-e2e-eks-gc
/test pull-cluster-api-provider-aws-e2e-eks-testing

Use /test all to run the following jobs that were automatically triggered:

pull-cluster-api-provider-aws-apidiff-main
pull-cluster-api-provider-aws-build
pull-cluster-api-provider-aws-build-docker
pull-cluster-api-provider-aws-test
pull-cluster-api-provider-aws-verify

In response to this:

/test ?

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.

@richardcase
Copy link
Member

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

@punkwalker
Copy link
Contributor Author

@richardcase Apologies, I did not get the notification for your message as I had lost access to my GitHub email.
Looks like the tests are passing but I am going to take another look at the changes to ensure we are not changing any middleware behavior with V2 SDK.

punkwalker added 2 commits May 3, 2025 00:23
Signed-off-by: Pankaj Walke <[email protected]>
Signed-off-by: Pankaj Walke <[email protected]>
punkwalker added 2 commits May 3, 2025 01:27
Signed-off-by: Pankaj Walke <[email protected]>
Signed-off-by: Pankaj Walke <[email protected]>
@punkwalker
Copy link
Contributor Author

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

@punkwalker punkwalker changed the title WIP: ⚠️ aws-sdk-go-v2 refactor starting with s3 Migrate S3, Sessions and Endpoints packages to AWS SDK v2 May 3, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 3, 2025
@punkwalker punkwalker changed the title Migrate S3, Sessions and Endpoints packages to AWS SDK v2 📦 Migrate S3, Sessions and Endpoints packages to AWS SDK v2 May 3, 2025
@punkwalker punkwalker changed the title 📦 Migrate S3, Sessions and Endpoints packages to AWS SDK v2 ✨ Migrate S3, Sessions and Endpoints packages to AWS SDK v2 May 3, 2025
@punkwalker
Copy link
Contributor Author

@richardcase The PR is Ready. Please let me know if you want me to make any changes. Thank You 🙇‍♂️

@richardcase
Copy link
Member

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

@richardcase
Copy link
Member

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

@nrb
Copy link
Contributor

nrb commented May 7, 2025

/lgtm

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

LGTM label has been added.

Git tree hash: 0765cb4b6f5809d1a89d1bae400a6dc7c1aabd1f

@richardcase
Copy link
Member

Thanks for this @punkwalker .

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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 May 9, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7b09356 into kubernetes-sigs:main May 9, 2025
19 checks passed
@k8s-ci-robot k8s-ci-robot modified the milestones: v2.9, v2.8 May 9, 2025
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.

Update session and endpoint handling for AWS SDK v2 Migrate S3 package to AWS SDK v2
6 participants