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

GitHub API rate limit #61

Open
tegioz opened this issue Jun 12, 2023 · 2 comments
Open

GitHub API rate limit #61

tegioz opened this issue Jun 12, 2023 · 2 comments

Comments

@tegioz
Copy link
Contributor

tegioz commented Jun 12, 2023

With the actual number of repositories and teams, a validation job takes ~20 API requests, whereas a reconciliation one takes ~500 requests. The installation access token we'll be using for the CNCF org (enterprise cloud) has a rate limit of 15000 requests per hour, which means that at the moment we should be be able to handle a bit less than 30 pull requests per hour on the CNCF people repo that modify the config.yaml permissions file.

We have some ideas to both reduce the API usage and improve how the situation is handled should the rate limit be reached, but in the meantime we wanted to bring awareness about this limitation (although we don't expect it to be a problem in the short term).

/cc @jeefy @RobertKielty

@jeefy
Copy link
Member

jeefy commented Oct 8, 2023

Could using something like https://github.com/kubernetes/test-infra/tree/master/ghproxy (or a new implementation of it) be helpful?

@tegioz
Copy link
Contributor Author

tegioz commented Oct 9, 2023

Thanks @jeefy! I didn't know about ghproxy/ghcahe, added to the toolbox 😉

One of the ideas I mentioned we had to reduce API usage would be similar to that: the Rust GitHub library we use in CLOWarden (octorust) includes a feature named httpcache that does something similar transparently but within the same process (we just run a single instance of the CLOWarden server).

We still need to test this thoroughly to make sure everything works as expected, but we'll keep this in mind. Thanks again 🙂

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

No branches or pull requests

2 participants