-
Notifications
You must be signed in to change notification settings - Fork 652
Updated EC2 detector to use v2 aws sdk #6878
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?
Changes from all commits
268359f
8610336
d8048ff
d4d0e7e
3d3e1ba
fce20cd
1f9c3af
cac4406
e40dd36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,25 @@ go 1.22.0 | |
|
||
require ( | ||
github.com/aws/aws-sdk-go v1.55.6 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do we plan on mitigating this https://nvd.nist.gov/vuln/detail/CVE-2020-8911 and https://nvd.nist.gov/vuln/detail/CVE-2020-8912 if we are still pulling in this dependency? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This should solve it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This package will be deprecated as is, a v2 will be created without this dependency |
||
github.com/aws/aws-sdk-go-v2 v1.36.3 | ||
github.com/aws/aws-sdk-go-v2/config v1.29.8 | ||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 | ||
github.com/aws/smithy-go v1.22.2 | ||
github.com/stretchr/testify v1.10.0 | ||
go.opentelemetry.io/otel v1.34.0 | ||
go.opentelemetry.io/otel/sdk v1.34.0 | ||
) | ||
|
||
require ( | ||
github.com/aws/aws-sdk-go-v2/credentials v1.17.61 // indirect | ||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect | ||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect | ||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/sso v1.25.0 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.0 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/sts v1.33.16 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/go-logr/logr v1.4.2 // indirect | ||
github.com/go-logr/stdr v1.2.2 // indirect | ||
|
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.
Hmm, this is going to be problematic.
The function signature here cannot change, that will be a breaking change
Client
interface could be extended and a type assertion can be made that will check if the passed client implements the prior functionality. This will mean that backwards compatible support for the existing API needs to be possible (even with the upgrade).ec2/v2
package is created to support the AWS v2 API and this package is deprecatedThere 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.
Hmm yeah I'm not sure if this just also should've been unexported along with Client or if there's a valid use case for a user to set their own? I see the commit that added it on the off chance you remember the rational behind it #1030 @MrAlias.
If we create a v2 package and deprecate this one, does the v2 package permanently stay as v2
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.
https://go.dev/blog/v2-go-modules
This allows also nicely deprecating the existing v1 module.
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.
Plan from SIG meeting is to create a v2 of this module.