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

Intensive usage leads to GitHub API RateLimit exceeded #48

Open
pega3 opened this issue Jul 6, 2020 · 3 comments
Open

Intensive usage leads to GitHub API RateLimit exceeded #48

pega3 opened this issue Jul 6, 2020 · 3 comments
Labels
wontfix This will not be worked on

Comments

@pega3
Copy link
Contributor

pega3 commented Jul 6, 2020

User Squiddy reported that installation of a PR did not work because he got an error message about the GitHub API RateLimit being exceeded.
I tried to run my version of the launcher with a different PR and get the same error message, so it seems there is an overall limit. We should:

@MCOfficer
Copy link
Member

This is already being reported in the console. From the log:

17:09:17 [ERROR] Github API RateLimit exceeded!
17:09:17 [INFO] RateLimit resets in 58 minutes
17:09:17 [ERROR] Install failed: Failed to read JSON: missing field `workflow_runs` at line 1 column 248

I tried to reduce the API calls as much as possible already, but some things (looking at you, PR installations) require roundabout API calls to get what we want, because the actions API sucks.

Is there anything left to address in this issue?

@pega3
Copy link
Contributor Author

pega3 commented Jul 7, 2020

Yah, I saw that it's written out in the log and the original reporter also saw that message, so that's probably sufficient. Unless we decide to display a pop-up or something like it in case something goes wrong.

As for working around the actions API insufficiencies, a couple of things come to my mind, but nothing which could be implemented in a reasonable amount of time with the current resources. (Caching the results somewhere and only going to the actions API if the result cannot be found in the cache / tweaking the search criteria so that the most sought responses are retrieved with the least amount of calls (if not already done) / hard-coding the releases int the tool (don't change) / keeping the resources on a separate server and retrieve them from there / split the load on several "mirror-"projects / writing "our" criteria on a separate table which we could use to perform the searching on)

So, I guess this is a will-not-fix right now....
Let's hope the launcher does not get too popular. ;-)

@pega3 pega3 closed this as completed Jul 7, 2020
@MCOfficer
Copy link
Member

MCOfficer commented Jul 7, 2020

I do have one idea. I already have a (proprietary, shame on me) blob of code that acts as proxy for actions artifacts (https://endlesssky.mcofficer.me/artifacts.html). The backend uses its own github token, if ratelimits become too common of a problem, we can route most stuff through there.

It should be noted that as of now, each client has an individual ratelimit based on IP. If we were to route more traffic through said backend, that's when the launcher's popularity matters.

Let's just keep an eye on this for now.

@MCOfficer MCOfficer reopened this Jul 7, 2020
@MCOfficer MCOfficer added the wontfix This will not be worked on label Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants