Closed matthias-bach-by closed 6 months ago
The cloud tests are failing in set-up and this seems to be a wider issue unrelated to my changes as I am also seeing that on other PRs. Happy to rebase once that is fixed on main.
Thanks for the excellent PR and sorry for the delay in getting in merged and released!
As reported in #1805, while 3.6.0 brought a beneficial change in evaluating Jira's retry-after header, in some scenarios it actually degraded the success rate of requests when hitting rate-limits due to two issues:
To address this, this PR changes the back-off behaviour to treat the retry-after time as a minimum backoff, at least as long as our maximum back-off time does allow this, and clips the retry-after header, if specified, to a minimum of one second.
I have extended the existing tests for the retry logic to assert this behaviour. If you would prefer a separate set of tests or see other changes to the approach, let me know and I'll adjust the PR.