Uh oh!
There was an error while loading. Please reload this page.
handle rate limiter & github server-side errors - #63
Conversation
cmerrick
commented
May 24, 2019
Hi @mredolatti, thanks for your contribution! In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. |
cmerrick
commented
May 24, 2019
You did it @mredolatti! Thank you for signing the Singer Contribution License Agreement. |
| raise AuthException(resp.text) | ||
| if resp.status_code == 404: | ||
| raise NotFoundException(resp.text) | ||
| for _ in range(0, 3): # 3 attempts |
There was a problem hiding this comment.
Couldn't this be replaced with the backoff library?
There was a problem hiding this comment.
Hi @luandy64 i'm not familiar with that library, but i'll look into it as soon as possible and tidy up the PR.
Thanks and sorry for the delay!
There was a problem hiding this comment.
@mredolatti I sumbled on this example: https://github.com/singer-io/tap-exchangeratesapi/blob/master/tap_exchangeratesapi/__init__.py#L38
There was a problem hiding this comment.
I'll take a look at this tonight and see if I can put the branch up to speed
There was a problem hiding this comment.
@luandy64@osterman could it be that the backoff library doesn't provide an easy way to use headers like: X-RateLimit-Remaining, X-RateLimit-Reset to determine how long to back off: litl/backoff#38?
nehiljain
commented
Jul 7, 2020
Are there plans to work on this? @osterman or @mredolatti ? I am having the same issue as well |
henriblancke
commented
Jul 7, 2020
@cmerrick@mredolatti any way we can help to get this over the line? |
osterman
commented
Jul 7, 2020
@nehiljain Sorry - no resources available on outside to put towards it at this time |
KBorders01
commented
Jan 3, 2021
@osterman@mredolatti@luandy64, what needs to happen to merge this PR? It looks like the code that's there already is much better than the current code, which has no retry capability. Also, it doesn't look like backoff will handle the rate limit headers anyway. This issue is blocking me from using Stitch's hosted Github tap, and instead I have to run it on my own. |
antoine-lizee
commented
Oct 6, 2021
Up! Can we merge this? |
savicbo
commented
May 1, 2022
@luandy64 can we merge this PR or is has it been implemented elsewhere? Hitting the GitHub ratelimit is affection our ability to use Stitch as well |
mredolatti
commented
May 3, 2022
is this still an issue? i took a look at backoff a while ago and didn't see a straightforward way to use it while relying on the response's headers to actually wait the correct amount of time. Do we need to add that behavior into |
bgreen-litl
commented
May 5, 2022
@mredolatti latest backoff (2.0.1) has the |
loeakaodas
commented
May 5, 2022
@mredolatti@bgreen-litl basic backoff functionality was added in #143. This PR should probably be closed and a custom wait time functionality can be added in a new PR based on the latest version in master. |
luandy64
commented
May 23, 2022
@savicbo@mredolatti@bgreen-litl@antoine-lizee@KBorders01@henriblancke@nehiljain Correct me if I'm wrong, but if you run tap-github/tap_github/__init__.py Lines 198 to 207 in 4f7ba58 |
KBorders01
commented
May 23, 2022
@luandy64 that is correct, it looks like this issue has been resolved in another PR. |
Two issues were found while using this library:
To deal with these scenarios, simple retry logic was added, and in the case of a rate limiting situation, we wait until the next reset time to move forward with the next retry.