anaconda / anaconda-project

Tool for encapsulating, running, and reproducing data science projects
https://anaconda-project.readthedocs.io/en/latest/
Other
221 stars 88 forks source link

Display download bar in all cases and make the timeout configurable via an env var #401

Open maximlt opened 7 months ago

maximlt commented 7 months ago

We have observed two issues when files are downloaded in the prepare phase:

  1. Responses without Content-Length lead to no download bar being displayed at all
  2. Downloads longer than 10 minutes time out

This PR addresses 1) by displaying a progress bar in any case, so the user is aware of some sort of progress. They can also see if it hangs and decide to abort if so.

image

2 isn't fully addressed, instead, the default timeout of 10 minutes is made configurable via the ANACONDA_PROJECT_DOWNLOADS_TIMEOUT environment variable. I guess the best approach would be to implement a timeout that is raised only when no new chunk is received after X seconds, instead of setting a global request timeout.

The current default timeout of 10 minutes could also be increased, 10 minutes is quite short when downloading big files.

maximlt commented 7 months ago

@AlbertDeFusco I've been told to ping you! :)