Allow shortcutting in customBackoff based on error#2898
Allow shortcutting in customBackoff based on error#2898AllanZhengYP merged 3 commits intoaws:masterfrom
Conversation
73bc534 to
2d3441b
Compare
Codecov Report
@@ Coverage Diff @@
## master #2898 +/- ##
=======================================
Coverage 96.96% 96.96%
=======================================
Files 300 300
Lines 8992 8992
Branches 1677 1677
=======================================
Hits 8719 8719
Misses 273 273
Continue to review full report at Codecov.
|
2d3441b to
8a00490
Compare
|
Thanks @nullren This is a long-losting feature we'd love to have |
|
@nullren You don't need to change any source code in |
Adds the error as a parameter to the `customBackoff` function. This should be a non-breaking change for all clients. If the result of the custom backoff is negative, then use that as a signal to shortcut remaining retries. This would make explicit a previously undefined behavior if clients returned a negative value from `customBackoff`.
57e3753 to
5868bb3
Compare
@AllanFly120 just squashed everything into the same commit without those |
|
@AllanFly120 i fixed the TS parameter addressing the comment i missed. are there now any other next steps that i can do here to help drive this forward? 😅 |
|
@AllanFly120 sorry! just pinging again to see what i can do if i've missed anything else here. |
|
@nullren Nice! The code change looks good to me now. To make sure the feature works as expected, can you add a test case spying on |
|
@AllanFly120 i hope i didn't misunderstand you. i added a new test in |
|
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. |
Adds the error as a parameter to the
customBackofffunction. This should be a non-breaking change for all clients.If the result of the custom backoff is negative, then use that as a signal to shortcut remaining retries. This would make explicit a previously undefined behavior if clients returned a negative value from
customBackoff.Previously stated in issue #2896 (cc @ajredniwja):
Checklist
npm run testpasses.d.tsfile is updatednpm run add-changebundle exec rake docs:apiand inspectdoc/latest/index.htmlif documentation is changed