Fix `config::Builder::set_credentials_provider` to override what's previsouly set (#3278)
## Motivation and Context Fixes https://github.com/awslabs/aws-sdk-rust/issues/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](https://github.com/awslabs/aws-sdk-rust/issues/973#issuecomment-1827224049)). While in general, we recommend customers single-source a credentials provider through [aws_config::ConfigLoader::credentials_provider](https://docs.rs/aws-config/1.0.1/aws_config/struct.ConfigLoader.html#method.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 https://github.com/smithy-lang/smithy-rs/pull/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 <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] 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._ --------- Co-authored-by:John DiSanti <jdisanti@amazon.com>
Loading
Please register or sign in to comment