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

[Bug] Crash when API limit is reached #59

Open
iblancasa opened this issue Jan 26, 2022 · 4 comments
Open

[Bug] Crash when API limit is reached #59

iblancasa opened this issue Jan 26, 2022 · 4 comments

Comments

@iblancasa
Copy link

I was using this GitHub action when it failed because I reached the API limit. It would be nice if the GitHub Action can wait some time before doing the next query to the API instead of crashing.

/usr/local/bundle/gems/octokit-4.20.0/lib/octokit/response/raise_error.rb:14:in `on_complete': GET https://api.github.com/repos/iblancasa/jaeger-operator/commits/refs/heads/master/check-runs: 403 - API rate limit exceeded for installation ID 6268770. // See: https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting (Octokit::TooManyRequests)
	from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/middleware.rb:19:in `block in call'
	from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/response.rb:59:in `on_complete'
	from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/middleware.rb:18:in `call'
	from /usr/local/bundle/gems/octokit-4.20.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
	from /usr/local/bundle/gems/octokit-4.20.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
	from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/request/retry.rb:148:in `call'
	from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/rack_builder.rb:154:in `build_response'
	from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/connection.rb:492:in `run_request'
	from /usr/local/bundle/gems/faraday-1.3.0/lib/faraday/connection.rb:198:in `get'
	from /usr/local/bundle/gems/sawyer-0.8.2/lib/sawyer/agent.rb:94:in `call'
	from /usr/local/bundle/gems/octokit-4.20.0/lib/octokit/connection.rb:156:in `request'
	from /usr/local/bundle/gems/octokit-4.20.0/lib/octokit/connection.rb:19:in `get'
	from /usr/local/bundle/gems/octokit-4.20.0/lib/octokit/client/checks.rb:68:in `check_runs_for_ref'
	from /app/services/github_checks_verifier.rb:29:in `query_check_status'
	from /app/services/github_checks_verifier.rb:100:in `wait_for_checks'
	from /app/services/github_checks_verifier.rb:20:in `call'
	from /app/services/application_service.rb:5:in `call'
	from /entrypoint.rb:19:in `<main>'

Used version: 1.1.1

@kroehre
Copy link

kroehre commented May 10, 2022

Have you tried https://github.com/lewagon/wait-on-check-action#wait-interval-optional-default-10 ? Sounds like that's what you're asking for.

@iblancasa
Copy link
Author

Yes

@matiasalbarello
Copy link
Contributor

Hi @iblancasa. Yes you tried (and didn’t work) or yes it worked? So far, that waiting interval is the only mechanism to make less api calls.
What would you suggest?

@iblancasa
Copy link
Author

Sorry. My message was not clear.

Yes, I tried and it didn't work. Actually, the stacktrace I pasted in my first message is using that parameter.

I would expect to not have a crash: keep trying until the GitHub action timeouts or something except a crash. Probably print a message saying: "I can not perform this task because this reason" and fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants