Comments (18)
Hmm, I still sometimes run into API rate limit errors with versions like 1.13
. It fails with no helpful error when I specify 1.13.0
, so I think it's not doing the same as 1.13.x
.
It should be possible to download a specific version of Go with zero GitHub API calls, as one can download Go straight from golang.org. It's even possible to list all released versions via JSON without even hitting GitHub: https://golang.org/dl/?mode=json&include=all
from setup-go.
@kjk @mvdan @damccorm I've updated API call to use the golang-dl one. I didn't know about this.
from setup-go.
Friendly ping @damccorm - any chance this could get attention soon? Actions can't be used as CI for Go until this is fixed, since builds start failing after just a dozen or so builds. The golang.org approach suggested above should work, and there's even a PR ready :)
from setup-go.
Big thanks to @hfaulds for taking care of merging the PR! I think this can be closed for now. I'll shout if I see these flakes again.
from setup-go.
Huh, interesting - 2 questions:
- Are you able to share your repo where you're seeing this by chance? I can't get a repro
- Are you only seeing it when running this action? Or is it a more general problem?
from setup-go.
- I was getting it consistently Friday afternoon, but waiting 30 min. - 1 hour and re-running the job (through Re-run all checks) sometimes worked. Since then, I've re-ran all the jobs that failed at the time, but I just now encountered the error again: https://github.com/Harmon758/Harmonbot/runs/203474041
- That repository uses actions/setup-python as well, and I haven't encountered this issue with it.
from setup-go.
Interesting - I'm guessing its this call that's getting rate limited, I'm not really sure why though, and haven't seen this happen elsewhere.
I'll try to dig in a little more and figure out what exactly is happening here
from setup-go.
Just an idea: data returned by https://api.github.com/repos/golang/go/git/refs/tags doesn't change often so it could be stored directly in this repo and updated once a day via cron job (via GitHub Action Workflow, of course).
I did something like that so you can use that as inspiration:
- https://github.com/kjk/blog/blob/master/.github/workflows/update_from_notion.yml
- https://github.com/kjk/blog/blob/master/s/ci_update_from_notion.sh
It's quite simple: a daily cron job updates some files in the repo and if they change, it checks them in.
A bonus of such change is that it would speed up the action (by removing an http request).
from setup-go.
I like the idea here in theory and see definite advantages, I think it might create a bit of a headache with publishing though - e.g. do we bump our v1
tag every time this gets updated? Do older releases not work with newer versions of Go? - and I'm more inclined to fix this from a rate limiting side (since I don't think we should be getting rate limited here).
It also could create a weird situation where 12.x
resolves to one Go version for v1.0.0
of this action, but to a different Go version for v1.1.0
of the action which seems non-ideal.
from setup-go.
FYI, I am seeing this as well, trying to setup Github Actions on a public repo: https://github.com/pelletier/go-toml/pull/294/checks?check_run_id=204074095
Started happening after ~1h of working on it.
from setup-go.
Probably relevant: the ip address hitting this limit is 199.7.166.17 which belongs to MacStadium.
I assume GitHub uses MacStadium for running OSX jobs and it seems they're all behind the same proxy which is why they are hitting GitHub limit.
So if GitHub has such capability, you should whitelist that IP address.
from setup-go.
Also seeing this error here after adding macOS to the build matrix.
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
It also appears to have cancelled my Windows and Linux builds?
from setup-go.
I experienced this too: https://github.com/Bios-Marcel/cordless/runs/208451699
Same IP, same symptoms. Depending on what the rate limit is, might it be possible to just delay the download instead of failing?
from setup-go.
Another option would be to attribute the call not to anonymous user but to a given GitHub user.
Actions already provide GITHUB_TOKEN
secret of the repo's owner. It's just a matter of plugging it into that API call.
It might not be possible to just access it from the action but it would be possible to define github-token
argument to the action, use it if provided and document that to avoid this rate limit, the user can provide it as:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
from setup-go.
I think a reasonable temporary solution is to specify exact Go versions like 1.12.9
instead of 1.12.x
. This shouldn't require GitHub API calls, so it shouldn't have any rate limit issues.
from setup-go.
+1 to https://golang.org/dl/?mode=json&include=all
It looks like using it would eliminate the rate-limited api call
from setup-go.
Would be nice to get this merged fast and push a minor release :D
from setup-go.
I'm also facing this issue. If this is already fixed, it'd be nice to have a release so people benefit of this.
from setup-go.
Related Issues (20)
- Error with no go.sum file HOT 6
- Feature - enhance action to support configuration of private package authentication HOT 3
- Long post job cleanup HOT 8
- v4 cache attempt to write to non existent drive on windows HOT 13
- setup-go does not pick up recent Go version leading to create vulnerable builds HOT 6
- support: gotip HOT 6
- https://salla.sa/bero2030.com HOT 1
- Berroe8 HOT 1
- caches grow unbounded HOT 6
- ENOENT: no such file or directory, mkdir '/home/runner' in macos-latest HOT 3
- Use version from module and another version in matrix testing HOT 2
- Allow for collapsing log output HOT 2
- go 1.22.0-rc.1 is not found HOT 2
- setup-go does not work on macos-14 (M1) HOT 6
- How to run tests with latest golang version HOT 10
- More specific handling/detection of Go toolchain versions HOT 3
- Inaccurate description of version in go.mod HOT 2
- Please upgrade `go-actions` to 1.21.8 / 1.22.1 HOT 3
- Signing key has expired HOT 2
- Node16 deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-go.