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: rate limit exceeded when a query returns many repos #140

Open
caleb15 opened this issue Mar 27, 2022 · 1 comment
Open

bug: rate limit exceeded when a query returns many repos #140

caleb15 opened this issue Mar 27, 2022 · 1 comment
Labels
bug GitHub :octocat: Github-specific issue

Comments

@caleb15
Copy link

caleb15 commented Mar 27, 2022

➜  a git:(master) ✗ mp init "org:15five"
2022/03/26 20:43:46 GET https://api.github.com/search/code?page=5&q=org%3A15five: 403 You have exceeded a secondary rate limit. Please wait a few minutes before you try again. []

When iterating through the results the program should sleep to avoid hitting a rate limit.
Workaround: using a more specific search. Although if a very large organization tried microplane they could run into the issue even with a specific search.

@caleb15 caleb15 changed the title rate limit exceeded when a query returns many repos bug: rate limit exceeded when a query returns many repos Mar 27, 2022
@nathanleiby nathanleiby added bug GitHub :octocat: Github-specific issue labels Mar 28, 2022
@nathanleiby
Copy link
Contributor

Thanks for reporting!

Agreed, there should be better backoff/retry logic here.

If it's possible that a search can take several minutes, we may need to explore other UX.

Turbolift solves this problem elegantly by offloading search to another specialized CLI and being composable with that. It think microplane would do well to use this approach, too. https://github.com/Skyscanner/turbolift#identifying-the-repos-to-operate-upon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug GitHub :octocat: Github-specific issue
Projects
None yet
Development

No branches or pull requests

2 participants