Skip to content

[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

Merged
merged 24 commits into from
Jun 6, 2025

Conversation

seongpil0948
Copy link
Contributor

@seongpil0948 seongpil0948 commented May 17, 2025

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 them

has 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

@seongpil0948 seongpil0948 requested a review from a team as a code owner May 17, 2025 12:16
@seongpil0948 seongpil0948 requested a review from songy23 May 17, 2025 12:16
@github-actions github-actions bot requested review from Aneurysm9 and mxiamxia May 17, 2025 12:16
@seongpil0948 seongpil0948 marked this pull request as draft May 17, 2025 12:19
seongpil0948 and others added 8 commits May 18, 2025 05:36
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)
Copy link
Contributor Author

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

@songy23 songy23 added dependencies Pull requests that update a dependency file Skip Changelog PRs that do not require a CHANGELOG.md entry labels May 29, 2025
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mjlshen mjlshen left a 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

@seongpil0948
Copy link
Contributor Author

Looks very close! Couple small things

To be honest, I'm very lucky to have met you.

@seongpil0948 seongpil0948 requested a review from mjlshen May 31, 2025 10:16
Copy link
Contributor

@mjlshen mjlshen left a 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!

@maxday
Copy link
Member

maxday commented May 31, 2025

Thank you @seongpil0948 💯

@songy23
Copy link
Member

songy23 commented Jun 2, 2025

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

@songy23 songy23 merged commit 4fec8ff into open-telemetry:main Jun 6, 2025
177 checks passed
@github-actions github-actions bot added this to the next release milestone Jun 6, 2025
@songy23
Copy link
Member

songy23 commented Jun 6, 2025

Thanks for your contributions @seongpil0948 !

@seongpil0948
Copy link
Contributor Author

Thanks for your contributions @seongpil0948 !

Thank you to everyone who helped me with my first life contribution @mjlshen

rockdaboot pushed a commit to rockdaboot/opentelemetry-collector-contrib that referenced this pull request Jun 10, 2025
#### 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]>
@seongpil0948 seongpil0948 deleted the 37728_internal-aws branch June 14, 2025 14:47
dd-jasminesun pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Jun 23, 2025
#### 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file exporter/awscloudwatchlogs awscloudwatchlogs exporter exporter/awsemf awsemf exporter exporter/awsxray internal/aws receiver/awscontainerinsight receiver/awsxray Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[internal/aws] migrate to AWS v2 SDK
7 participants