Skip to content

Gist Searching in GitHub Provider is now Rate Limited (and doesn't appear to be affected by OAuth authentication) #823

@CMCDragonkai

Description

@CMCDragonkai

Describe the bug

In our discovery system, we use getIdentityData method from github provider which will look up gists via https://gist.github.com/search.

It seems recently this now has some secondary rate limit applied (https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api?apiVersion=2022-11-28), which is not solvable even with authenticated requests. Atm it is done unauthenticated, because it's basically a public page that we index over.

Gists are not currently searchable via the official GitHub API, so it seems that gist search has basically become impossible to index programmatically now. This is pretty bad. Especially because it's a secondary rate limit.

image

I tried doing things like:

curl -H "Authorization: token <TOKEN>" "https://gist.github.com/search?q=user%3ACDeltakai+filename%3Acryptolink.txt+Cryptolink+between+Polykey+Keynode+and+Github+Identity&s=updated&o=desc"

But no use, it's just 429 too many requests.

The only other option right now is to change using the API for gists, and because there's no search feature, you have to basically index over all gists via the API, but we could use since to do this efficiently without having to repeat. https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#list-gists-for-a-user. Effectively only going over the new gists representing new claims. The timestamp acts like a cursor.

To Reproduce

  1. Try discovering any identity... and you may see WARN:polykey.PolykeyAgent.task v0pocinl3mpo0195g4m2kd1t8k0:Failed - Reason: ErrorProviderCall: Provider responded with 429 Too Many Requests show up in the agent logs.

Expected behavior

It needs to work just like normal and discover without problems.

Screenshots

image

Notify maintainers

@tegefaulkes

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions