plugin-throttling.js
plugin-throttling.js copied to clipboard
fix(retry-count): don't leak retryCount between requests
Fixes #442
Issue:
retryCount was incorrectly shared between all requests AND was never being reset to 0.
Notes:
- This adds a
retryCountargument toonRateLimitandonSecondaryRateLimitfunctions.options.request.retryCountis still available as to not break backward compatibility, but sinceoptions.requestobject is shared between all requests, the retry count in there is shared too, so using it is not recommended! I updated the example in readme to use the new argument. - The test for this uses an express server - I wasn't able to replicate the issue with the
TestOctokit. Possibly because it handles therequestobject differently, I'm not sure.
This seems to be huge. If I got it correctly, this means, that current plugin implementation doesn't work in case of concurrent requests. Can we get back to it?
:tada: This issue has been resolved in version 4.3.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket: