Skip to content

feat: add retry-config-provider #1282

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

Merged
merged 13 commits into from
Jun 18, 2020
Merged

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jun 18, 2020

Issue #, if available:
Internal issue at JS-1813

Description of changes:

adds retry-config-provider to read values from environment or config file:

Env Var Config File
maxAttemptsProvider AWS_MAX_ATTEMPTS max_attempts
retryModeProvider AWS_RETRY_MODE retry_mode

Similar to region-provider but with following differences:

  • the defaultProvider passes the values to fromEnv and fromSharedConfigFiles as there are two methods to export
  • fromSharedConfigFiles doesn't read for values from credentials file.
  • doesn't export fromEnv and fromSharedConfigFiles as they're not required by external code.

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

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2020

Codecov Report

Merging #1282 into master will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1282      +/-   ##
==========================================
+ Coverage   73.04%   73.14%   +0.09%     
==========================================
  Files         287      290       +3     
  Lines       12730    12774      +44     
  Branches     2922     2933      +11     
==========================================
+ Hits         9299     9343      +44     
  Misses       3431     3431              
Impacted Files Coverage Δ
packages/middleware-retry/src/defaultStrategy.ts 100.00% <100.00%> (ø)
packages/region-provider/src/defaultProvider.ts 100.00% <100.00%> (ø)
packages/region-provider/src/fromEnv.ts 100.00% <100.00%> (ø)
...kages/region-provider/src/fromSharedConfigFiles.ts 100.00% <100.00%> (ø)
...kages/retry-config-provider/src/defaultProvider.ts 100.00% <100.00%> (ø)
packages/retry-config-provider/src/fromEnv.ts 100.00% <100.00%> (ø)
...retry-config-provider/src/fromSharedConfigFiles.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f61141...d6eecea. Read the comment docs.

@alexforsyth
Copy link
Contributor

Can you verify that its a bug that the tests impact packages/middleware-retry/src/defaultStrategy.ts, and that the unit tests do not actually impact it?

Copy link
Contributor

@alexforsyth alexforsyth left a comment

Choose a reason for hiding this comment

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

LGTM after minor feedback

Co-authored-by: Alexander Forsyth <[email protected]>
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants