-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate to Go AWS SDK V2 #224
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
base: main
Are you sure you want to change the base?
Conversation
I haven't reviewed yet, but just from a quick look, there are a lot of files changed only for the copyright update, so it's hard to even browse the changes in the diff. Chunking up/squashing the commits so the copyright update only updates are separated would probably help a lot. Same with the other changes, so it's easier to review a single commit without the copyrights. |
I'm having similar difficulties. We generally try to handle linting and tweaks like this in separate PRs to make the important changes readable. |
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.
One preliminary question - have we tried these changes with PPM? You can tweak the PPM go.mod
to include the platform-lib
modules from your local project directory and do any PPM refactoring necessary, then see if you run into issues. That may help catch any blockers early instead of later.
@jonyoder I haven't yet but that is my plan once all the integrations tests are working. Once all the tests pass, I'll use PPM as a final integration / end-to-end test before these changes get merged. |
@CDRayn I know SDK updates can be tough, especially as the repo is constantly changing, but is there a way to break this PR down a bit further like Greg is suggesting? I imagine a separate copyright work would be approved and merged rather quickly |
About
This PR migrates
platform-lib
to the v2 version of the Go AWS SDK. This migrations is necessary due to the v1 version of the SDK being deprecated and AWS dropping support for it on 7/31/2025. The high level changes made as part of the migration will be summarized below, but the official migration guide is a good resource for reviewers who wish to better understand the context and motivation behind the changes in this PR.Summary of Changes
Configuration Loading & Initialization
The v2 version of the SDK replaces the
session
package and its associated functionality with the simplified config. The Configuration Loading section of the migration guide explains the changes to this area between versions of the SDK. For flexibility, this PR updatesplatform-lib
to leave parsing / consuming the AWS config to the consumer of this library and expects anOptions
interface passed to it.S3 Copier
The S3 copier implementation was removed by this PR since the v2 version of the SDK adds builtin support for moving and copying objects between S3 buckets.
Go context parameter
v2 of the SDK adds support for the use of Go's
ctx context.Context
interface. This PR addsctx context.Context
to the signatures of functions that may result in network operations or long running tasks, and which may need to be cancelled.Formatting
For readability and clarity, lines in the code base that exceeded 120 characters in length were wrapped across multiple lines. Some variable and symbol declarations were updated because their name collided with package imports or Go builtin items.