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

Be Polite #47

Closed
tgetgood opened this issue Nov 3, 2017 · 2 comments
Closed

Be Polite #47

tgetgood opened this issue Nov 3, 2017 · 2 comments

Comments

@tgetgood
Copy link
Collaborator

tgetgood commented Nov 3, 2017

If a user requests info on a very active repo, the current strategy is to spam the server until we have all the data. This has resulted in us getting banned (trying to pull everything from plotly.js).

We should throttle requests to make sure we're not issuing more than X per minute. I'm not sure what X should be but that can be tweaked.

In addition we should alert the user when a given request triggers throttling so that they know it's going to take a long time. And give them an option to abort. When applicable we should also give them advice for making a better (narrower) query.

@tgetgood
Copy link
Collaborator Author

Looks like ~300 requests per minute is the abuse threshold according to GH support. That should be plenty for us.

tgetgood added a commit to tgetgood/name-your-contributors that referenced this issue Dec 12, 2017
We should no longer be hitting abuse alarms.

Closes mntnr#47
tgetgood added a commit to tgetgood/name-your-contributors that referenced this issue Dec 12, 2017
We should no longer be hitting abuse alarms.

Closes mntnr#47
tgetgood added a commit to tgetgood/name-your-contributors that referenced this issue Dec 14, 2017
We should no longer be hitting abuse alarms.

Closes mntnr#47
RichardLitt pushed a commit that referenced this issue Jan 11, 2018
* docs: updated CLI help message.

* refactor: changed argument passing from CLI.

We're getting more and more options, and we need a cleaner way to deal
with that.

* feat: made reactions and commits optional

Added individual flags to toggle them.

* fix: added a throttle to the request pipe.

We should no longer be hitting abuse alarms.

Closes #47

* fix: broken flags interaction.

commits and local-dir can't both be active.

* fix: set concurrency to 1.

When used from a fast internet connection, parallel requests set off
the abuse alarm. If the internet is slow we can do parallel requests,
but that's not something to optimise for just yet.

* fix: PullRequestComment doesn't exist.

Comments on PullRequests are IssueComments.

* Refactor: use a queue instead of a timeouts.

Much more transparent. Now we can see how many requests are queued up
and react to it.

* fix: Only grabbing commit logs from master.

This puts the GH API version inline with the planned local version.

* refactor: more sophisticated graphql, DSL.

* refactor: reformatted queries to new DSL.

* refactor: cleaner logging.

* refactor: Passing response metadata through pipe.

Better error handling and debugging.

* refactor: removed depagination boilerplate

It's now automatically provided in the query engine.

* feat: added --full option for uncompressed output

Returns the query response JSON with all of the internal logic cleaned
out and edges collapsed into lists.

* fix: reviews and reactions are working again.

* feat: grab repo name in query

* fix: extended query DSL for multiple types.

Synopsis output is now identical to master.

* feat: grabbing more metadata

Specifically names, owners, homepages of repos and orgs.

* feat: added stub for time filtering full tree.

* fix: added guards again null nodes.

Comes up when a repo doesn't have a master branch.

* feat: added filtering for full tree output.

* fix: grabbing review comments.

As well as their reactions if specified.

* fix: removed hanging test.

Testing that we need an auth token is unproductive and wasteful.

* Docs: lots of docstrings.

* docs: documented output formats in the README.

* testing: added tests for full tree output.
@RichardLitt
Copy link
Member

🎉 This issue has been resolved in version 3.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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