openedx / repo-tools

Tools for repo maintenance, etc.
Apache License 2.0
30 stars 39 forks source link

repo_checks cannot be dry-run without getting rate limited #514

Open kdmccormick opened 3 months ago

kdmccormick commented 3 months ago

It's not critical, since we can run one check at a time, but it would be nice to be able to dry-run the entire repo_checks suite to see what needs fixing. Unfortunately, somewhere around edx-ora2, I'm getting

{
  "message": "API rate limit exceeded for user ID .... If you reach out to GitHub Support for help, please include the request ID .... and timestamp 2024-05-14 20:48:20 UTC.",
  "documentation_url": "https://docs.github.com/rest/overview/rate-limits-for-the-rest-api"
}

Either we have too many repos, or too many checks, or we need to make repo_checks more efficient, or we need to pay GitHub more money, or some combination of all of the above.

sarina commented 1 month ago

Yes, this happened to me doing https://github.com/openedx/axim-engineering/issues/1182 -

I hit the rate limit trying to do this. I don't know what repos I missed because it's not pulling the repos in alphabetical order. I got to MongoDBProxy. Looks like I got 184 repos.

20240708-repo-checksB.txt

A decent option would be to catch the rate limit exceeded and print out the repos that it didn't get to. Am I supposed to run the repo checks per repo one-by-one for the quarterly task?

sarina commented 1 month ago

One thing we could consider is just having on-call focus on the last 3 months of new repos (such as, https://github.com/orgs/openedx/repositories?q=created%3A%3E2024-03-31 for my current rotation)