sympy / sympy-bot-old

SymPy pull request helper
http://reviews.sympy.org/
Other
24 stars 16 forks source link

API limit exceeded #147

Open asmeurer opened 11 years ago

asmeurer commented 11 years ago

GitHub must have lowered their API limit, because now doing something like `sympy-bot list gives something like

$./sympy-bot list
> Using config file /Users/aaronmeurer/.sympy/sympy-bot.conf
> Loaded configuration file
Total pull count 65
Processing pulls... 1773 1772 1771 1770 1769 1768 1766 1765 1761 1750 1746 1738 1737 1735 1734 1731 1729 1724 1723 1722 1716 1712 1710 1708 1703 1702Could not get pull request 1702, retrying in 1 seconds...
Could not get pull request 1702, retrying in 2 seconds...
Could not get pull request 1702, retrying in 4 seconds...
Could not get pull request 1702, retrying in 8 seconds...
Could not get pull request 1702, retrying in 16 seconds...
Could not get pull request 1702, retrying in 32 seconds...
Could not get pull request 1702, retrying in 64 seconds...
Could not get pull request 1702, retrying in 128 seconds...
Could not get pull request 1702, retrying in 256 seconds...
Could not get pull request 1702, retrying in 512 seconds...

If I go to the api page in my browser (like https://api.github.com/repos/sympy/sympy/pulls/1702), it says

{
  "message": "API Rate Limit Exceeded for 67.22.187.2"
}

I guess the good news is that with the retrying algorithm, it will eventually work again for a headless tester.

But we should change sympy-bot list, and possibly other parts of the system to reduce the number of API calls.

asmeurer commented 11 years ago

According to http://developer.github.com/v3/#rate-limiting, the limit is 60 per hour for unauthenticated requests and 5000 per hour for authenticated requests. So we just need to change all API requests to be authenticated if possible (i.e., if the user has already authenticated anyway, or if there is an OAuth token).

certik commented 11 years ago

That's exactly right.

On Tue, Feb 12, 2013 at 10:19 AM, Aaron Meurer notifications@github.comwrote:

According to http://developer.github.com/v3/#rate-limiting, the limit is 60 per hour for unauthenticated requests and 5000 per hour for authenticated requests. So we just need to change all API requests to be authenticated if possible (i.e., if the user has already authenticated anyway, or if there is an OAuth token).

— Reply to this email directly or view it on GitHubhttps://github.com/sympy/sympy-bot/issues/147#issuecomment-13447102.

asmeurer commented 11 years ago

Also, let's include the "message" from the API in the "could not get pull request..." output.