DeLaGuardo / setup-clojure

GitHub Action to provision clojure's most popular build tools for Linux, Mac OS X and Windows.
MIT License
184 stars 27 forks source link

API Rate Limit exceeded errors #96

Closed dgtized closed 9 months ago

dgtized commented 9 months ago

On several projects using setup-clojure I've been encountering occasional failures from API rate limits.

As example:

Run DeLaGuardo/setup-clojure@12.1
  with:
    cli: latest
    bb: latest
    github-token: ***
    invalidate-cache: false
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.9-9/x64
    JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.9-9/x64

API rate limit exceeded for $IPADDRESS. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Unfortunately, it's not clear from the error what documentation needs to be checked in order to authenticate for a higher rate limit.

It looks like this was previously encountered in #40 but was then removed in #45. From the error message I can't be sure, but I wonder if the fetch step for CLI is passing the token correctly but the corresponding logic for fetching babashka is not using a token?

I'm also using caching, but I'm curious if using latest instead of a specific version might be forcing cache misses.

Thank you very much for this very useful github action, hopefully we can find a solution to address the sporadic failures.

DeLaGuardo commented 9 months ago

Thanks for using it! And thanks for reporting this issue. I'll check tomorrow. Most likely some of the API calls don't use the provided github-token. Should be easy to fix.

One question - did you provide the token yourself? GitHub is printing action arguments with default values

dgtized commented 9 months ago

I did not try providing a token, as it wasn't in the documentation. When I dug through and found #40 I considered it but wasn't sure if #45 actually removed the need for that?

DeLaGuardo commented 9 months ago

It should be fixed now. Please update to 12.2. Hopefully, you will not see rate limit error ever again :)

dgtized commented 9 months ago

Thank you!

imrekoszo commented 9 months ago

Hey there, thanks a lot for your work! Just wanted to give you a heads-up that I just saw an occurrence of this with version 12.3 at https://github.com/imrekoszo/polylith-kaocha/actions/runs/7709816905/job/21011785765

lread commented 8 months ago

Hi @DeLaGuardo! I hit a rate limit today, could be legit or maybe...

Did the setup for cli maybe not get updated to use githubAuth?