-
Notifications
You must be signed in to change notification settings - Fork 20
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
Working with Github rate limits #43
Comments
Hm yeah, caching the version for a short period of time (probably max up to 1h is would fix this issue). But not sure how it would be better to do it, add a required cache dependency? :/ Go with something custom, like storing the latest version in a temporary file? Also, using any available bin sounds reasonable too, it's already downloaded anyway, so why not use it if exists when 4xx/5xx occur, this will fix not only rate limit problem but offline problem as well which is cool. About authenticated requests - that seems an overkill in this specific situation IMO, it just feels like we're trying to ignore the problem of frequent requests with a hack. |
That seems fine to me. The user will have the cache component already in practice, so adding it as a dependency would not be a big deal. I would cache the version that was found. Then, I would always make an API request. But if it fails, fallback to trying to look for the version in cache. PR welcome! |
TailwindBundle will query Github for the latest CLI binary each time
tailwind:build
is executed. When actively developing and trying things out while building manually (without running with--watch
, executing the command), a user may quickly exceed the maximum of 60reqs per hour to the Github API. This unnecessarily disallows offline development as well.Workaround
A simple workaround is to set the binary version manually, as this skips the check of the latest binary, eg.
However, a user may want to not set this value, to ensure that the binary is updated as soon as possible.
Possible fixes
There are multiple options to fix this and multiple of these solutions could be implemented together. Here, I'm listing some ideas.
The text was updated successfully, but these errors were encountered: