We have observed two issues when files are downloaded in the prepare phase:
Responses without Content-Length lead to no download bar being displayed at all
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.
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.
We have observed two issues when files are downloaded in the prepare phase:
Content-Length
lead to no download bar being displayed at allThis 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.
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.