-
Notifications
You must be signed in to change notification settings - Fork 578
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
feat(clients): change runtime config from constant to provider functions #2574
Conversation
6c0e1fa
to
4704ed8
Compare
Codecov Report
@@ Coverage Diff @@
## main #2574 +/- ##
=======================================
Coverage ? 60.59%
=======================================
Files ? 516
Lines ? 27633
Branches ? 6760
=======================================
Hits ? 16744
Misses ? 10889
Partials ? 0 Continue to review full report at Codecov.
|
Looks like the protocol tests are failed because they don't have |
4704ed8
to
d2228a9
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
Resolves #2557
Description
This change makes runtime default configs as a function instead of constant. As a result, different client instance won't share the same runtime config (e.g. HTTP handlers). This change also uses inline nullish coalescing in replace of fully loaded default configuration. This change makes sure the SDK won't load default value/provider at all when corresponding custom config is supplied.
This change may increase the code size because each nullish coalescing operator is transcribed to more inline code. However the difference is unnoticeable, tested on a React project with only S3 and GetObject command.
Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.