Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(install): retry downloads of registry info / tarballs #26278

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

nathanwhit
Copy link
Member

Fixes #26085.

Adds a basic retry utility with some defaults, starts off with a 1ms wait, then 10x for each successive attempt, up to a max of 1 second and 5 attempts.

I've applied the retry in the http client, reusing an existing function, so this also applies to retrying downloads of deno binaries in upgrade and compile. I can make a separate function that doesn't retry so this doesn't affect upgrade and compile, but it seemed desirable to have retries there too, so I left it in.

@nathanwhit nathanwhit requested review from dsherret and bartlomieju and removed request for dsherret October 15, 2024 19:17
cli/http_util.rs Show resolved Hide resolved
cli/util/retry.rs Show resolved Hide resolved
cli/util/retry.rs Outdated Show resolved Hide resolved
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathanwhit nathanwhit merged commit 7c3c13c into main Oct 15, 2024
17 checks passed
@nathanwhit nathanwhit deleted the install-retry branch October 15, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make deno install automatically retry network requests.
3 participants