cargo-bins / cargo-binstall

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

Fallback to cargo install if returned 403s when trying to get a built release #1823

Closed gilescope closed 3 months ago

gilescope commented 4 months ago

url=https://api.github.com/repos/RustSec/rustsec/releases/tags/v0.20.0}: Received status code 403 Forbidden, will wait for 120s and retry

NobodyXu commented 4 months ago
  • maybe after a couple of retries bale and switch to cargo install?

Yes it will fallback to cargo-install if retries still failed, but currently we don't have a maximum retries allowed.

ianks commented 3 months ago

I think it just retries forever? https://github.com/oxidize-rb/actions/actions/runs/10218446168/job/28274548992?pr=40

NobodyXu commented 3 months ago

I think it just retries forever? https://github.com/oxidize-rb/actions/actions/runs/10218446168/job/28274548992?pr=40

Yes, it needs an upper bound for it

NobodyXu commented 3 months ago

Turns out that we do have a maximum retry bound in binstalk-downloader:

https://github.com/cargo-bins/cargo-binstall/blob/ad892911c662d4b58d759ef48f88b690d442d213/crates/binstalk-downloader/src/remote.rs#L247

It's currently set to 3

https://github.com/cargo-bins/cargo-binstall/blob/ad892911c662d4b58d759ef48f88b690d442d213/crates/binstalk-downloader/src/remote.rs#L42

I suppose that this is something from the binstalk-gh-repo-api which doesn't have an upper bound