Skip to content
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

Fix config::Builder::set_credentials_provider to override what's previsouly set #3278

Merged
merged 12 commits into from
Dec 1, 2023

Conversation

ysaito1001
Copy link
Contributor

Motivation and Context

Fixes awslabs/aws-sdk-rust#973

Description

Prior to the PR, if a customer explicitly passed a credentials provider to a client's config Builder::set_credentials_provider, what's passed did not override a credentials provider previously set (actual use case).

While in general, we recommend customers single-source a credentials provider through aws_config::ConfigLoader::credentials_provider, we should eliminate the said footgun in case they directly pass a credentials provider to a client's config Builder.

The PR reverts test signature updates in #3156 (in hindsight, having to update test signatures in that PR was a sign of regression).

Testing

Added a Kotlin test to CredentialProviderConfigTest.kt to verify the fix

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ysaito1001 ysaito1001 requested review from a team as code owners December 1, 2023 16:39
Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

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

LGTM

@rcoh rcoh enabled auto-merge (squash) December 1, 2023 16:41
Copy link

github-actions bot commented Dec 1, 2023

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@rcoh rcoh merged commit 81fc83e into smithy-rs-release-1.x.y Dec 1, 2023
41 checks passed
@rcoh rcoh deleted the ysaito/fix-set-credentials-provider branch December 1, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants