cargo-bins / cargo-binstall

Binary installation for rust projects
GNU General Public License v3.0
1.62k stars 60 forks source link

Add --maximum-resolution-timeout to cargo-binstall scripts #1892

Closed nth10sd closed 3 months ago

nth10sd commented 3 months ago

After #1862 landed, does it make sense to add --maximum-resolution-timeout to -y --force cargo-binstall calls in install-from-binstall-release.ps1 and install-from-binstall-release.sh?

NobodyXu commented 3 months ago

It has a default value, and it also supports environment variable BINSTALL_MAXIMUM_RESOLUTION_TIMEOUT

nth10sd commented 3 months ago
INFO has_release_artifact{release=GhRelease { repo: GhRepo { owner: "cargo-bins", repo: "cargo-binstall" }, tag: "v1.10.2" } artifact_name="cargo-binstall-aarch64-apple-darwin.bin"}:do_send_request{request=Request { method: GET, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.github.com")), port: None, path: "/repos/cargo-bins/cargo-binstall/releases/tags/v1.10.2", query: None, fragment: None }, headers: {"accept": "application/vnd.github+json", "x-github-api-version": "2022-11-28"} } url=[https://api.github.com/repos/cargo-bins/cargo-binstall/releases/tags/v1.10.2}:](https://api.github.com/repos/cargo-bins/cargo-binstall/releases/tags/v1.10.2%7D:) Received status code 403 Forbidden, will wait for 120s and retry
 INFO has_release_artifact{release=GhRelease { repo: GhRepo { owner: "cargo-bins", repo: "cargo-binstall" }, tag: "v1.10.2" } artifact_name="cargo-binstall-aarch64-apple-darwin.bin"}:do_send_request{request=Request { method: GET, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.github.com")), port: None, path: "/repos/cargo-bins/cargo-binstall/releases/tags/v1.10.2", query: None, fragment: None }, headers: {"accept": "application/vnd.github+json", "x-github-api-version": "2022-11-28"} } url=[https://api.github.com/repos/cargo-bins/cargo-binstall/releases/tags/v1.10.2}:](https://api.github.com/repos/cargo-bins/cargo-binstall/releases/tags/v1.10.2%7D:) Received status code 403 Forbidden, will wait for 120s and retry

Strange, I still get these messages even after going to 1.10.2 and setting / not setting BINSTALL_MAXIMUM_RESOLUTION_TIMEOUT.

In any case, I'm not sure if it's an issue in my setup - I switched to Homebrew and worked around it.

NobodyXu commented 3 months ago

I think you have hit gh api rate limit, I'd recommend try passing a gh-token with read-only access to public repositories as env variabi3 GITHUB_TOKEN.

nth10sd commented 3 months ago

Got it, thank you for your help!