Skip to content
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

Misleading backoff parameter #34

Open
michellemay opened this issue May 7, 2024 · 0 comments
Open

Misleading backoff parameter #34

michellemay opened this issue May 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@michellemay
Copy link

michellemay commented May 7, 2024

Current Behavior

backoff_options.retry_after is misleading. It seems to be an absolute number of seconds. However, it's a multiplicative factor.

See backoff_factor=self.backoff_options.retry_after, in PlatformClient

And relevant implementation from urllib3:
https://github.com/urllib3/urllib3/blob/b34619f94ece0c40e691a5aaf1304953d88089de/src/urllib3/util/retry.py#L143

:param float backoff_factor:
        A backoff factor to apply between attempts after the second try
        (most errors are resolved immediately by a second try without a
        delay). urllib3 will sleep for::

            {backoff factor} * (2 ** ({number of previous retries}))

        seconds. 

The readme is wrong as well:

The exponential backoff parameters are as follows:

retry_after - The amount of time, in seconds, to wait between throttled request attempts.

Optional, will default to 5.

Expected Behavior

Change the variable name to match what it does.

Steps To Reproduce

No response

Environment

Python Version
OS Version
...

Debug logs

No response

Anything else?

No response

@michellemay michellemay added the bug Something isn't working label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant