yegor256 / 0pdd

Puzzle Driven Development (PDD) Chatbot Assistant for Your GitHub Repositories
https://www.0pdd.com
MIT License
128 stars 32 forks source link

API rate limit exceeded #212

Open g4s8 opened 6 years ago

g4s8 commented 6 years ago

0pdd returns an error for a webhook:

403 - API rate limit exceeded for user ID 24456188. // See: https://developer.github.com/v3/#rate-limiting
    /app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/response/raise_error.rb:16:in `on_complete'
    /app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/response.rb:9:in `block in call'
    /app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/response.rb:61:in `on_complete'
    /app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/response.rb:8:in `call'
    /app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
    /app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
    /app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/rack_builder.rb:143:in `build_response'
    /app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/connection.rb:387:in `run_request'
    /app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/connection.rb:138:in `get'
    /app/vendor/bundle/ruby/2.3.0/gems/sawyer-0.8.1/lib/sawyer/agent.rb:94:in `call'
    /app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/connection.rb:156:in `request'
    /app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/connection.rb:19:in `get'
    /app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/client/repositories.rb:29:in `repository'
    /app/0pdd.rb:400:in `repo'
    /app/0pdd.rb:295:in `block in <top (required)>'
0crat commented 6 years ago

@yegor256/z please, pay attention to this issue

0crat commented 6 years ago

@g4s8/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

0crat commented 6 years ago

Job #212 is now in scope, role is DEV

0crat commented 6 years ago

Bug was reported, see §29: +15 point(s) just awarded to @g4s8/z

0crat commented 6 years ago

The job #212 assigned to @robsonataide/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job

0crat commented 6 years ago

The job #212 assigned to @fybwid/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job

yosefbennywidyo commented 6 years ago

@0crat wait @yegor256 I need more details with this issue

0crat commented 6 years ago

@0crat wait @yegor256 I need more details with this issue (here)

@fybwid The impediment for #212 was registered successfully by @fybwid/z

yosefbennywidyo commented 6 years ago

The current API limit rate is 5000 request per hour noted here. @yegor256, is Conditional Requests possible to do?

yegor256 commented 6 years ago

@fybwid yes, we can do conditional requests, why not?

yosefbennywidyo commented 6 years ago

@g4s8 The current API limit rate is 5000 request per hour noted here and your log also display it at first line.

My opinion, is not the 0pdd who can't get the webhook but it's because the current user is over the allowed quota.

g4s8 commented 6 years ago

@fybwid but this log was posted as a comment by 0pdd user, so current user is 0pdd in this log. And I don't think it's a webhook quota, but API quota - 0pdd uses Github API to post comments and close tickets.

yosefbennywidyo commented 6 years ago

@g4s8 yes, I'm agree that it wasn't the webhook quota but API quota. It's the same as what I said before, and for more details, on your first line log 403 - API rate limit exceeded for user ID 24456188. // See: https://developer.github.com/v3/#rate-limiting, is this user ID 24456188 belong to 0pdd? Also in my opinion, the webhook process is happened but because it's exceed the API limit rate then we got 403.

g4s8 commented 6 years ago

@fybwid yes, it's 0pdd user, see https://api.github.com/user/24456188

yosefbennywidyo commented 4 years ago

I've find sample here: https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/conditional_get.rb

and here: https://www.rubydoc.info/gems/sinatra/Sinatra%2FHelpers:etag

Still, I need more enlightenment with applying the conditional requests.