foundry
foundry copied to clipboard
Foundryup failure due to GitHub API rate limiting
Getting intermittent failures from foundryup in slither-action
as seen here. The error doesn't seem abort the script and foundryup reports that it finished installing.
[-] Foundry target detected, installing foundry nightly
curl: (22) The requested URL returned error: 403
foundryup: installing foundry (version nightly, tag nightly-)
foundryup: downloading latest forge and cast
######################################################################## 100.0%
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
foundryup: downloading manpages
######################################################################## 100.0%
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
foundryup: line 128: /opt/foundry/bin/forge: No such file or directory
foundryup: installed -
foundryup: line 129: /opt/foundry/bin/cast: No such file or directory
foundryup: installed -
foundryup: done
In the first two lines we see curl returns 403 status and the next line shows nightly-
.
curl: (22) The requested URL returned error: 403
foundryup: installing foundry (version nightly, tag nightly-)
What seems to be failing is this request:
https://github.com/foundry-rs/foundry/blob/f10df79e8d3a5e02eeac9bd0c4a4297d3d96bbae/foundryup/foundryup#L79-L84
Unauthenticated requests to the GitHub API are heavily rate limited:
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 person making requests.
This seems to make foundryup
not well suited for CI environments in its current form. Perhaps it should use the nightly
tag without a commit hash?
Consider using set -o pipefail
in addition to set -e
. I think this is why the error doesn't abort the script.