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

wasm-pack does not rate limit its version check if the request fails #653

Closed
sgrif opened this issue May 21, 2019 · 4 comments
Closed

wasm-pack does not rate limit its version check if the request fails #653

sgrif opened this issue May 21, 2019 · 4 comments
Assignees
Labels
bug Something isn't working PR attached there's a PR open for this issue
Milestone

Comments

@sgrif
Copy link

sgrif commented May 21, 2019

🐛 Bug description

When wasm-pack looks for a more recent version, it limits this check to once every 24 hours normally. When the request fails, however, it will try again on the next run. Based on our logs, there are folks who are running wasm-pack in a loop on their home network. Since all of these version checks are currently being blocked (#651), this has resulted in a substantial enough spike in 4xx traffic to be noticeable on our graphs.

If the reason this failed is because crates.io has gone down due to being overloaded, this can amplify the problem. There should be some form of exponential backoff in the case of an error.

🤔 Expected Behavior

wasm-pack should not immediately retry its version check if the last one failed.

@fitzgen
Copy link
Member

fitzgen commented May 23, 2019

It seems fine to me to apply the 24 hours rate limiting regardless if the check succeeded or failed.

@fitzgen
Copy link
Member

fitzgen commented May 23, 2019

+cc @drager @daubaris

@drager
Copy link
Member

drager commented May 25, 2019

Thanks for bringing this up @sgrif! I will try to get a PR that fixes this.

@drager
Copy link
Member

drager commented May 26, 2019

Fixed in #660.

@ashleygwilliams ashleygwilliams added the PR attached there's a PR open for this issue label Jun 11, 2019
@ashleygwilliams ashleygwilliams added this to the 0.9.0 milestone Jun 11, 2019
@ashleygwilliams ashleygwilliams added the bug Something isn't working label Jun 11, 2019
@drager drager closed this as completed Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR attached there's a PR open for this issue
Projects
None yet
Development

No branches or pull requests

4 participants