-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update module github.com/aws/aws-sdk-go-v2 to v0.31.0 #36
base: master
Are you sure you want to change the base?
Conversation
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: go.sum
|
85668f9
to
8880661
Compare
|
This PR contains the following updates:
v0.24.0
->v0.31.0
Release Notes
aws/aws-sdk-go-v2 (github.com/aws/aws-sdk-go-v2)
v0.31.0
aws.Config Retryer member
If your application sets the
Config.Retryer
member the application will needto be updated to set a function that returns an
aws.Retryer
. In addition, ifyour application used the
config.WithRetryer
helper a function that returnsan
aws.Retryer
needs to be used.If your application used the
retry.Retryer
type, update to using theaws.Retryer
type instead.API Client enum value names
If your application used the enum values in the API Client's
types
package between v0.31.0 and the latest version of the client module you may need to update the naming of the enum value. The enum value name casing were updated to camel case instead lowercased.v0.30.0
smithy-go module relocation
If your application uses
smithy-go
utilities for request pipeline your application will need to be updated to refer to the new import path ofgithub.com/aws/smithy-go
. If you application did not usesmithy-go
utilities directly, your application will update automatically.EC2 IMDS module relocation
If your application used the
ec2imds
module, it has been relocated tofeature/ec2/imds
. Your application will need to update to the new import path,github.com/aws/aws-sdk-go-v2/feature/ec2/imds
.CredentialsCache Constructor and ExpiryWindow Options
The
aws#CredentialsCache
type was updated, and a new constructor function,NewCredentialsCache
was added. This function needs to be used to initialize theCredentialCache
. The constructor also has function options to specify additional configuration, e.g. ExpiryWindow and Jitter.If your application was specifying the
ExpiryWindow
with thecredentials/stscreds#AssumeRoleOptions
,credentials/stscreds#WebIdentityRoleOptions
,credentials/processcreds#Options
, orcredentials/ec2rolecrds#Options
types theExpiryWindow
option will need to specified on theCredentialsCache
constructor instead.AWS Sigv4 Signer Refactor
The
aws/signer/v4
package'sSigner.SignHTTP
andSigner.PresignHTTP
methods were updated to take functional options. If your application provided a custom implementation for API client'sHTTPSignerV4
orHTTPPresignerV4
interfaces, that implementation will need to be updated for the new function signature.Configuration Loading
The
config#LoadDefaultConfig
function has been updated to require acontext.Context
as the first parameter, with additional optional function options as variadic additional arguments. Your application will need to update its usage ofLoadDefaultConfig
to pass incontext.Context
as the first parameter. If your application used theWith...
helpers those should continue to work without issue.The v2 SDK corrects its behavior to be inline with the AWS CLI and other AWS SDKs. Refer to https://docs.aws.amazon.com/credref/latest/refdocs/overview.html for more information how to use the shared config and credentials files.
v0.29.0
aws.BuildableHTTPClient move
The
aws
'sBuildableHTTPClient
HTTP client implementation was moved toaws/transport/http
asBuildableClient
. If your application used theaws.BuildableHTTPClient
type, update it to use theBuildableClient
in theaws/transport/http
package.Slice and Map API member types
This release includes several code generation updates for API client's slice map members. Using API modeling metadata the Slice and map members are now generated as value types instead of pointer types. For your application this means that for these types, the SDK no longer will have pointer member types, and have value member types.
To migrate to this change you'll need to remove the pointer handling for slice and map members, and instead use value type handling of the member values.
Boolean and Number API member types
Similar to the slice and map API member types being generated as value, the SDK's code generation now has metadata where the SDK can generate boolean and number members as value type instead of pointer types.
To migrate to this change you'll need to remove the pointer handling for numbers and boolean member types, and instead use value handling.
v0.28.0
v0.27.0
Configuration
The
config
module's exported types were trimmed down to add clarity and reduce confusion. Additional changes to theconfig
module' helpers.WithCredentialsProvider
,WithHTTPClient
, andWithEndpointResolver
to functions instead of structs.MFATokenFuncProvider
, useAssumeRoleCredentialOptionsProvider
for setting options forstscreds.AssumeRoleOptions
.WithWebIdentityCredentialProviderOptions
toWithWebIdentityRoleCredentialOptions
AssumeRoleCredentialProviderOptions
toAssumeRoleCredentialOptionsProvider
EndpointResolverFuncProvider
toEndpointResolverProvider
API Client
Options
type getter methods have been removed. Use the struct members instead.smithy.OperationError
tosmithy.OperationInvokeError
.v0.26.0
Configuration
The
config
module's exported types were trimmed down to add clarity and reduce confusion. Additional changes to theconfig
module' helpers.WithCredentialsProvider
,WithHTTPClient
, andWithEndpointResolver
to functions instead of structs.MFATokenFuncProvider
, useAssumeRoleCredentialOptionsProvider
for setting options forstscreds.AssumeRoleOptions
.WithWebIdentityCredentialProviderOptions
toWithWebIdentityRoleCredentialOptions
AssumeRoleCredentialProviderOptions
toAssumeRoleCredentialOptionsProvider
EndpointResolverFuncProvider
toEndpointResolverProvider
API Client
Options
type getter methods have been removed. Use the struct members instead.smithy.OperationError
tosmithy.OperationInvokeError
.v0.25.0
Design changes
The v2 preview SDK
v0.25.0
release represents a significant stepping stone bringing the v2 SDK closer to its target design and usability. This release includes significant breaking changes to the v2 preview SDK. The updates in thev0.25.0
release focus on refactoring and modularization of the SDK’s API clients to use the new client design, updated request pipeline (aka middleware), refactored credential providers, and configuration loading packages.We've also bumped the minimum supported Go version with this release. Starting with v0.25.0 the SDK requires a minimum version of Go
v1.15
.As a part of the refactoring done to v2 preview SDK some components have not been included in this update. The following is a non exhaustive list of features that are not available.
We expect additional breaking changes to the v2 preview SDK in the coming releases. We expect these changes to focus on organizational, naming, and hardening the SDK's design for future feature capabilities after it is released for general availability.
Relocated Packages
In this release packages within the SDK were relocated, and in some cases those packages were converted to Go modules. The following is a list of packages have were relocated.
github.com/aws/aws-sdk-go-v2/aws/external
=>github.com/aws/aws-sdk-go-v2/config
modulegithub.com/aws/aws-sdk-go-v2/aws/ec2metadata
=>github.com/aws/aws-sdk-go-v2/ec2imds
moduleThe
github.com/aws/aws-sdk-go-v2/credentials
module contains refactored credentials providers.github.com/aws/aws-sdk-go-v2/ec2rolecreds
=>github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds
github.com/aws/aws-sdk-go-v2/endpointcreds
=>github.com/aws/aws-sdk-go-v2/credentials/endpointcreds
github.com/aws/aws-sdk-go-v2/processcreds
=>github.com/aws/aws-sdk-go-v2/credentials/processcreds
github.com/aws/aws-sdk-go-v2/stscreds
=>github.com/aws/aws-sdk-go-v2/credentials/stscreds
Modularization
New modules were added to the v2 preview SDK to allow the components to be versioned independently from each other. This allows your application to depend on specific versions of an API client module, and take discrete updates from the SDK core and other API client modules as desired.
API Clients
The following is a list of the major changes to the API client modules
v0.25.0
, you'll need to add the API client's module to your application's go.mod file.types
package within the API client's module, e.g.github.com/aws/aws-sdk-go-v2/service/s3/types
These types were moved to improve documentation and discovery of the API client, operation, and input/output types. For example Amazon S3's ListObject's operation ListObjectOutput.Contents input parameter is a slice of types.Object.Request
suffix. The method now invokes the operation instead of constructing a request, which needed to be invoked separately. The operation methods were also expanded to include functional options for providing operation specific configuration, such as modifying the request pipeline.Configuration
In addition to the
github.com/aws/aws-sdk-go-v2/aws/external
package being made a module atgithub.com/aws/aws-sdk-go-v2/config
, theLoadDefaultAWSConfig
function was renamed toLoadDefaultConfig
.The
github.com/aws/aws-sdk-go-v2/aws/defaults
package has been removed. Its components have been migrated to thegithub.com/aws/aws-sdk-go-v2/aws
package, andgithub.com/aws/aws-sdk-go-v2/config
module.Error Handling
The
github.com/aws/aws-sdk-go-v2/aws/awserr
package was removed as a part of the SDK error handling refactor. The SDK now uses typed errors built around Go v1.13's errors.As and errors.Unwrap features. All SDK error types that wrap other errors implement theUnwrap
method. Generic v2 preview SDK errors created withfmt.Errorf
use%w
to wrap the underlying error.The SDK API clients now include generated public error types for errors modeled for an API. The SDK will automatically deserialize the error response from the API into the appropriate error type. Your application should use
errors.As
to check if the returned error matches one it is interested in. Your application can also use the generic interface smithy.APIError to test if the API client's operation method returned an API error, but not check against a specific error.API client errors returned to the caller will use error wrapping to layer the error values. This allows underlying error types to be specific to their use case, and the SDK's more generic error types to wrap the underlying error.
For example, if an Amazon DynamoDB Scan operation call cannot find the
TableName
requested, the error returned will contain dynamodb.ResourceNotFoundException. The SDK will return this error value wrapped in a couple layers, with each layer adding additional contextual information such as ResponseError for AWS HTTP response error metadata , and smithy.OperationError for API operation call metadata.Logging an error value will include information from each wrapped error. For example, the following is a mock error logged for a Scan operation call that failed because the table was not found.
Endpoints
The
github.com/aws/aws-sdk-go-v2/aws/endpoints
has been removed from the SDK, along with all exported endpoint definitions and iteration behavior. Each generated API client now includes its own endpoint definition internally to the module.API clients can optionally be configured with a generic aws.EndpointResolver via the aws.Config.EndpointResolver. If the API client is not configured with a custom endpoint resolver it will defer to the endpoint resolver the client module was generated with.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.