-
Notifications
You must be signed in to change notification settings - Fork 394
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
landing page: proxying and handling Github stars fetch requests #1019
Comments
@iAdramelk good catch, probably we should do the same as with the community page indeed, and cache results. |
I can't open the sentry.io URLs but OK I get the idea. In fact I see the GH API request duplicated?
I just want to repeat my Q from https://github.com/iterative/blog/pull/122#issuecomment-589873691 here:
Ivan's answer was:
But what about a simple in-app memory cache instead? Thanks |
that's exactly what we do now :) |
Do you mean on the client side or in the browser? |
OK yes, but I mean without the need for an internal API that proxies them to the same web app: just import some module that fetches the data and caches it (server side). |
I can fix this by grabbing data from GitHub at build time. The slight inaccuracy on old builds is practically a non-issue for something like stars, and it requires no runtime requests or logic. I actually have a branch moving most everything to this setup, but I think I can backport the bit that fixes this issue specifically. |
@rogermparent I would say, let's do this the same way as we do for other APIs. It's quite important for this counter to be up to date as much as possible. Also, if GH down we'll have to rely on some default value or freeze the deployment. |
I think I'm pretty much done, but we'll see if I missed anything. My solution was to implement a Gatsby build-time solution primarily, but then update it via a proxy server API like the other ones. This way we get the advantages of a solid baked-in value as well as the ability to keep the count updated to-the-minute regardless of when the last rebuild was. |
We have stars counter for the
dvc
repo on the title page. And it is not always works:https://sentry.io/organizations/iterative/issues/1510361492/
Also the it not works we didn't handle rejections in GithubLine:
https://sentry.io/organizations/iterative/issues/1519509024/
Maybe we should start proxying and caching GR request on our and as we do now for community page. And also we should add
catch
to request.The text was updated successfully, but these errors were encountered: