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

Add UI to deal with GitHub rate limiting in Dashboard #2591

Open
humphd opened this issue Dec 10, 2021 · 3 comments
Open

Add UI to deal with GitHub rate limiting in Dashboard #2591

humphd opened this issue Dec 10, 2021 · 3 comments
Labels
area: dashboard Related to Telescope's dashboard (the page that has stats) type: enhancement New feature or request

Comments

@humphd
Copy link
Contributor

humphd commented Dec 10, 2021

We've got a bunch of fancy new GitHub components for our posts, each of which make various calls to the GitHub API from the browser. GitHub's API is rate limited, and for unauthenticated requests:

the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the user making requests.

I haven't hit this yet, but it's just a matter of time. As we scroll through posts, eventually we'll hit the 60/hour limit and the API call will fail. When that happens, our GitHub components need to render something useful to the user.

We should also consider switching to use GitHub's official JS client, which has built-in code for handling throttling and retrying rate-limited calls.

cc @Kevan-Y who hit this in the backend. NOTE: https://github.com/octokit/octokit.js works in browser and node, so we could use this in the backend too, when talking to the GitHub API.

@humphd humphd added type: enhancement New feature or request area: front-end labels Dec 10, 2021
@Andrewnt219
Copy link
Contributor

Is this for the dashboard?

@humphd
Copy link
Contributor Author

humphd commented Dec 10, 2021

No, for the React front-end with GitHub info in the sidebar of a post. We can manage this on the server side for the Dashboard with caching in Redis.

@TDDR TDDR changed the title Add UI to deal with GitHub rate limiting in front-end Add UI to deal with GitHub rate limiting in Dashboard Jan 20, 2022
@TDDR TDDR added area: dashboard Related to Telescope's dashboard (the page that has stats) and removed area: front-end labels Jan 20, 2022
@AmasiaNalbandian AmasiaNalbandian added this to the 2.6 Release milestone Jan 25, 2022
@aserputov aserputov modified the milestones: 2.6 Release, 2.7 Release Feb 2, 2022
@aserputov aserputov self-assigned this Feb 3, 2022
@TueeNguyen TueeNguyen modified the milestones: 2.7 Release, 2.8 Release Feb 17, 2022
@tpmai22
Copy link
Contributor

tpmai22 commented Mar 8, 2022

@tcvan0707 if you cna put some details about your struggle. People will be able to help out

@aserputov aserputov modified the milestones: 2.8 Release, 2.9 Release Mar 9, 2022
@tcvan0707 tcvan0707 removed their assignment Mar 22, 2022
@aserputov aserputov removed their assignment Mar 22, 2022
@aserputov aserputov removed this from the 2.9 Release milestone Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dashboard Related to Telescope's dashboard (the page that has stats) type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants