Skip to content

Conversation

@trivikr
Copy link
Member

@trivikr trivikr commented Jul 8, 2020

Issue #, if available:
Internal JS-1909

Description of changes:
use fromStatic to return default config values

Verified that integration tests no longer throw No max_attempts found for profile default in SDK configuration files error:

On master:

$ yarn test:integration-legacy --tags @acm
yarn run v1.22.4
$ cucumber-js --fail-fast --tags @acm
.(node:5683) UnhandledPromiseRejectionWarning: Error: No max_attempts found for profile default in SDK configuration files
    at new ProviderError (/local/home/trivikr/workspace/aws-sdk-js-v3/packages/property-provider/dist/cjs/ProviderError.js:17:28)
    at /local/home/trivikr/workspace/aws-sdk-js-v3/packages/retry-config-provider/dist/cjs/fromSharedConfigFiles.js:23:27
    at step (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/tslib/tslib.js:141:27)
    at Object.next (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/tslib/tslib.js:122:57)
    at fulfilled (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/tslib/tslib.js:112:62)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5683) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)
(node:5683) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
.(node:5683) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 7)
....(node:5683) UnhandledPromiseRejectionWarning: Error: No max_attempts found for profile default in SDK configuration files
    at new ProviderError (/local/home/trivikr/workspace/aws-sdk-js-v3/packages/property-provider/dist/cjs/ProviderError.js:17:28)
    at /local/home/trivikr/workspace/aws-sdk-js-v3/packages/retry-config-provider/dist/cjs/fromSharedConfigFiles.js:23:27
    at step (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/tslib/tslib.js:141:27)
    at Object.next (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/tslib/tslib.js:122:57)
    at fulfilled (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/tslib/tslib.js:112:62)
(node:5683) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 14)
.(node:5683) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 14)
..

2 scenarios (2 passed)
5 steps (5 passed)
0m00.055s
Done in 2.38s.

On PR branch:

$ yarn test:integration-legacy --tags @acm
yarn run v1.22.4
$ cucumber-js --fail-fast --tags @acm
.........

2 scenarios (2 passed)
5 steps (5 passed)
0m00.152s
Done in 2.45s.

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 Report

Merging #1341 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1341      +/-   ##
==========================================
+ Coverage   77.67%   77.69%   +0.01%     
==========================================
  Files         286      287       +1     
  Lines       11955    11978      +23     
  Branches     2623     2627       +4     
==========================================
+ Hits         9286     9306      +20     
- Misses       2669     2672       +3     
Impacted Files Coverage Δ
packages/middleware-retry/src/defaultStrategy.ts 100.00% <100.00%> (ø)
.../middleware-sdk-transcribe-streaming/src/signer.ts 80.00% <100.00%> (ø)
...kages/retry-config-provider/src/defaultProvider.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 16ca2a4...00a293b. Read the comment docs.

Copy link
Contributor

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@trivikr trivikr merged commit 4386064 into aws:master Jul 8, 2020
@trivikr trivikr deleted the retry-config-provider-fromStatic branch July 8, 2020 17:56
@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 18, 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