-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[internal/aws] migrate to AWS v2 SDK #40123
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
Conversation
This commit addresses several lint issues identified during the AWS SDK v1 to v2 migration process: 1. Remove unused context parameters in AWS utility functions 2. Fix formatting issues with gci 3. Use appropriate assertion methods in tests
…metry-collector-contrib into 37728_internal-aws
BackendConnectionErrors.OtherCount was 1 in version 1, but HTTPCode4XXCount was 1 more after v2 conversion
@@ -90,7 +90,8 @@ func TestTelemetryEnabled(t *testing.T) { | |||
assert.EqualValues(t, 1, sink.StopCount.Load()) | |||
assert.True(t, sink.HasRecording()) | |||
got := sink.Rotate() | |||
assert.EqualValues(t, 0, *got.BackendConnectionErrors.HTTPCode4XXCount) | |||
assert.EqualValues(t, 1, *got.BackendConnectionErrors.HTTPCode4XXCount) |
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.
BackendConnectionErrors.OtherCount was 1 in version 1, but HTTPCode4XXCount was 1 more after v2 conversion
…ace from cn.getEC2Region to WithEC2IMDSRegion option
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.
linters are failing: http://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/15322638726/job/43122189337?pr=40123
also need make gotidy
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.
LGTM
c900ab7
to
ed2450b
Compare
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.
Looks very close! Couple small things
Co-authored-by: Michael Shen <[email protected]>
To be honest, I'm very lucky to have met you. |
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.
Thanks again for all your work!
Thank you @seongpil0948 💯 |
I'm planning to merge this PR by Friday 6/6 since AWS SDK v1 is approaching EOL soon. Please leave a comment before then if you think otherwise |
Thanks for your contributions @seongpil0948 ! |
Thank you to everyone who helped me with my first life contribution @mjlshen |
#### Description aws-sdk-go is being [deprecated on July 31, 2025](https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-go-v1-on-july-31-2025/). this PR updates `internal/aws/awsutil` to aws-sdk-go-v2 and Update the modules that depend on them has improved the existing partition, sts related logic <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#37728 <!--Describe what testing was performed and which tests were added.--> #### Testing I converted the existing unit test to aws-sdk-go-v2 as well, imorove partition related test <!--Describe the documentation added.--> #### Documentation - [internal endpoints module](https://pkg.go.dev/github.com/aws/[email protected]/internal/endpoints) --------- Co-authored-by: Michael Shen <[email protected]> Co-authored-by: Antoine Toulme <[email protected]>
#### Description aws-sdk-go is being [deprecated on July 31, 2025](https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-go-v1-on-july-31-2025/). this PR updates `internal/aws/awsutil` to aws-sdk-go-v2 and Update the modules that depend on them has improved the existing partition, sts related logic <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#37728 <!--Describe what testing was performed and which tests were added.--> #### Testing I converted the existing unit test to aws-sdk-go-v2 as well, imorove partition related test <!--Describe the documentation added.--> #### Documentation - [internal endpoints module](https://pkg.go.dev/github.com/aws/[email protected]/internal/endpoints) --------- Co-authored-by: Michael Shen <[email protected]> Co-authored-by: Antoine Toulme <[email protected]>
Description
aws-sdk-go is being deprecated on July 31, 2025.
this PR updates
internal/aws/awsutil
to aws-sdk-go-v2 and Update the modules that depend on themhas improved the existing partition, sts related logic
Link to tracking issue
Fixes #37728
Testing
I converted the existing unit test to aws-sdk-go-v2 as well, imorove partition related test
Documentation