-
Notifications
You must be signed in to change notification settings - Fork 78
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
refactor(deps): upgrade to aws-sdk-go-v2
#529
Merged
terrytangyuan
merged 6 commits into
argoproj:master
from
agilgur5:deps-update-aws-sdk-go-v2
Nov 2, 2023
Merged
refactor(deps): upgrade to aws-sdk-go-v2
#529
terrytangyuan
merged 6 commits into
argoproj:master
from
agilgur5:deps-update-aws-sdk-go-v2
Nov 2, 2023
Commits on Oct 20, 2023
-
refactor(deps): upgrade to aws-sdk-go-v2
- `aws-sdk-go` has [a vuln](https://osv.dev/vulnerability/GO-2022-0646) in the v1 EncryptionClient - it's fixed in the v2 client - we don't use this functionality, but still get reported this vuln - instead add an ignore for the vuln, figured I might as well make the upgrade to v2 - confirmed that `go.mod` has latest versions (e.g. `config` [released v1.19.0](https://github.com/aws/aws-sdk-go-v2/releases/tag/release-2023-10-16) this week) - follow the [migration instructions](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) - migrate all `session` usage to `config.LoadDefaultConfig` per [instructions](https://aws.github.io/aws-sdk-go-v2/docs/migrating/#configuration-loading) - this includes shared config handling, so I believe `session.SharedConfigEnable` is no longer necessary per [instructions](https://aws.github.io/aws-sdk-go-v2/docs/migrating/#migrating-from-newsessionwithoptions) - the docs on ["Speciyfing Credentials"](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials) seem to state this as well, if I'm understanding correctly - see also `config.WithRegion` mention in the [instructions](https://aws.github.io/aws-sdk-go-v2/docs/migrating/#migrating-from-newsession-with-awsconfig-options) - migrate credential usage - [`Config.Credentials`](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config) still exists, but the function is now [`Retrieve(context)`](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#CredentialsProvider) instead of `Get` - the [`Credentials` struct](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Credentials) otherwise looks the same, has the `AccessKeyId`, `SecretAccessKey`, and `SessionToken` that were used in v1 - STS credentials are retrieved a bit differently now [per instructions](https://aws.github.io/aws-sdk-go-v2/docs/migrating/#aws-security-token-service-credentials) - use a `config` instead of a `session` to create a client, then use `NewAssumeRoleProvider` instead of `NewCredentials - NOTE: I used `context.Background()` for all of the contexts that are now required - it may make more sense for context to be passed into these functions, but that would be a breaking change and require downstream changes in Argo projects, so I left that out for now and just went with `Background` as a default Signed-off-by: Anton Gilgur <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ff0e768 - Browse repository at this point
Copy the full SHA ff0e768View commit details -
- this was just straight up missing from the migration guide's imports - found it myself: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/sts Signed-off-by: Anton Gilgur <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for af8205e - Browse repository at this point
Copy the full SHA af8205eView commit details
Commits on Oct 30, 2023
-
- more idiomatic Go, less memory use, and makes it easier to replace with an argument later Signed-off-by: Anton Gilgur <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for de319d1 - Browse repository at this point
Copy the full SHA de319d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6395467 - Browse repository at this point
Copy the full SHA 6395467View commit details
Commits on Oct 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9c6a1a7 - Browse repository at this point
Copy the full SHA 9c6a1a7View commit details
Commits on Nov 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 01d5602 - Browse repository at this point
Copy the full SHA 01d5602View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.