Update STS client to use new async config and fix failing container resolver tests - #79
Open
arandito wants to merge 2 commits into
Open
Update STS client to use new async config and fix failing container resolver tests#79arandito wants to merge 2 commits into
arandito wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR makes two small runtime package updates:
aws-credentials-sts: adopts new async config APIUpdates
AssumeRoleCredentialsResolverto build itsAsyncSTSClientfromAsyncSTSConfig.resolve(...)instead of the deprecated synchronousConfig. Config overrides (source credentials resolver, region, and optional transport) are now assembled into a dict and resolved asynchronously, withtransportonly set when an HTTP client is provided.Warning
This depends on the parallel
smithy-pythonchange that deprecates the oldConfigin favor ofAsyncSTSConfig(smithy-lang/smithy-python#758). It must be sim-shipped in the same release as that PR; releasing independently will breakaws-credentials-sts(ImportError: cannot import name 'AsyncSTSConfig').aws-credentials-http: normalize empty query stringsFixes
ContainerCredentialsResolverto passquery=parsed.query or Nonewhen resolving fromAWS_CONTAINER_CREDENTIALS_FULL_URI.urlparseyields''for a query-less URL, and the currentURIno longer normalizes that toNone, so the constructed request URI didn't match expectations.Testing
Ran the container credentials resolver unit tests standalone:
All 12 tests pass, including the four
test_resolver_env_*cases that previously failed on the empty-query-string mismatch.9
aws-credentials-stsresolver tests currently fail withImportError: cannot import name 'AsyncSTSConfig' from 'aws_sdk_sts.config'until smithy-python#758 ships the new async config. Nothing to do here until that lands; they'll pass once the two are released together.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.