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

Display HTTP timeout setting on timeout #1922

Closed
zanieb opened this issue Feb 23, 2024 · 0 comments · Fixed by #1961
Closed

Display HTTP timeout setting on timeout #1922

zanieb opened this issue Feb 23, 2024 · 0 comments · Fixed by #1961
Labels
error messages Messaging when something goes wrong good first issue Good for newcomers

Comments

@zanieb
Copy link
Member

zanieb commented Feb 23, 2024

We can hint to change the HTTP_TIMEOUT when a timeout is encountered and display the current value

Related:

@zanieb zanieb added good first issue Good for newcomers error messages Messaging when something goes wrong labels Feb 23, 2024
charliermarsh pushed a commit that referenced this issue Feb 25, 2024
## Summary

Closes #1922

When a timeout occurs, it hints to the user to configure the
`UV_HTTP_TIMEOUT` env var.

Before
```
error: Failed to download distributions
  Caused by: Failed to fetch wheel: torch==2.2.0 
  Caused by: Failed to extract source distribution
  Caused by: request or response body error: operation timed out
  Caused by: operation timed out
```

After
```
error: Failed to download distributions
  Caused by: Failed to fetch wheel: torch==2.2.0 
  Caused by: Failed to extract source distribution
  Caused by: Failed to download distribution due to network timeout. Try increasing UV_HTTP_TIMEOUT.
```

## Test Plan

<!-- How was it tested? -->
Wasn't sure if we'd want a test. If we do, is there a existing mechanism
or preferred approach to force a timeout to occur in tests? Maybe set
the timeout to 1 and add torch as an install check (although it's
possible that could become flaky)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant