nangtani / blender-addon-tester

The blender addon tester is a test harness to enable pytest hook to allow addons to be tested inside a defined version of blender.
MIT License
64 stars 13 forks source link

Blender download retry #12

Open douglaskastle opened 4 years ago

douglaskastle commented 4 years ago

Sometimes a download from blender servers fail, due to some server issue. A retry after 5-10 minutes should be implemented to give the server time to recover and not fail the test.

3 time retry should be enough.

douglaskastle commented 4 years ago

Example of failed download:

https://travis-ci.org/github/douglaskastle/blender-fake-addon/jobs/666089980?utm_medium=notification&utm_source=email

myselfhimself commented 4 years ago

Hello retries are good though this error is probably different Blender's python executable may want to use pip 9.0.1 by default which has an outdated TLS version and cannot negotiate its connection anymore. I have fixed that tonight already in the macosx-support branch by extending Blender python's prior pip manual download to macosx as well, while it was for windows only. See the fix in context here: https://github.com/douglaskastle/blender-addon-tester/blob/0438791b9a110f9e9657c5bf019ecb2cfc04309b/blender_addon_tester/get_blender.py#L231

myselfhimself commented 4 years ago

With that fix in place, Blender python would get pip >=20 instead of the outdated pip 9.0.1 I hope this is relevant for you for the tls errors. Now the retry mechanism would be neat. Usually, an annotation on top of a function to be repeated can made for that.

douglaskastle commented 4 years ago

Hello retries are good though this error is probably different Blender's python executable may want to use pip 9.0.1 by default which has an outdated TLS version and cannot negotiate its connection anymore. I have fixed that tonight already in the macosx-support branch by extending Blender python's prior pip manual download to macosx as well, while it was for windows only. See the fix in context here: https://github.com/douglaskastle/blender-addon-tester/blob/0438791b9a110f9e9657c5bf019ecb2cfc04309b/blender_addon_tester/get_blender.py#L231

Yes this was what I was expecting, I was thinking of ripping the plaster and just making it the default case for Linux too.

Great to see you unblocked.

The pop issue isn't always the download problem just a glitch on the server.

myselfhimself commented 4 years ago

Slightly unrelated, TravisCI fails at downloading python 37...

douglaskastle commented 4 years ago

Slightly unrelated, TravisCI fails at downloading python 37...

What happened there is that a legit server glitch, or are you trying to fetch something that is not there.

Yes you are correct in slightly unrelated, as in I have no idea if this type of failure occurs, how to recover from it, I think we are toast!

But in the case of the blender archive (zip, tar.gz, dmg etc etc) we know what we asked for and we known if we receive a legal archive, so that is something that can be tested for and looped on