Open
Description
Description of the problem, including code/CLI snippet
The default value of max_retries is insufficient to "clear" any rate limiting limit, for responses where the Retry-After header is missing. The default is 10, which yields a max cur_retries value of 9, which yields a maximum sleep time of ~50 seconds. At least some rate limits are computed over a 10 minute window (600 seconds) (e.g. the recently added limit on /users/:id), so ideally we'd have a default max_retries that would (cumulatively) sleep at least that long.
Expected Behavior
Default max_retries value is large enough to cause the library to sleep long enough to pass any rate limit window.
Actual Behavior
The library doesn't sleep long enough, so a exception is thrown when the rate limit is reached, despite retrying for a while.
Specifications
- python-gitlab version: 1.15.0 (but I checked the latest code in git and it appears identical)
- API version you are using (v3/v4): Whatever the library default is.
- Gitlab server version (or gitlab.com): gitlab.com