-
Notifications
You must be signed in to change notification settings - Fork 648
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
cfg.EndpointResolverWithOptions is ignored when cfg.EndpointResolver is nil #1513
Comments
Thank you for reporting this issue @tiedotguy and providing a detailed write-up. I agree with the assessment of root cause of this issue is that this check was missed during the update:
This should likely be:
The intention of the original short-circuit evaluation when it was written was to avoid allocation of the |
Using your example, I get the following output behavior now with the resolvers that we expect to be executed.
Regarding scenario #4, since the intention is to deprecate to the |
|
Documentation
Describe the bug
The code generated for api_client.go, generates the following function:
If the caller is using
cfg.EndpointResolverWithOptions
withoutcfg.EndpointResolver
(which is expected, ascfg.EndpointResolver
is deprecated), thencfg.EndpointResolverWithOptions
isn't used.Appears to be introduced in #1274
Expected behavior
There's 4 options that can occur:
Current behavior
Steps to Reproduce
Note, this uses s3, but any service will do as service/*/api_client.go is generated
Possible Solution
For scenario 3, it should invoke ResolverWithOptions, for scenario 4 I am unsure.
Bug is around
aws-sdk-go-v2/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java
Lines 204 to 214 in 8eaf639
Semi-related, while checking the docs to see if scenario 4 is documented, I noted that they weren't fully updated (https://pkg.go.dev/github.com/aws/[email protected]/aws#EndpointResolverWithOptions)
AWS Go SDK version used
v1.11.1
Compiler and Version used
1.17.1
Operating System and version
Linux, Windows
The text was updated successfully, but these errors were encountered: