enhancementgood first issue
Description
Improvement from the https://github.com/StackStorm/st2-packages/issues/429
Most of the networking-related logic needs retrying mechanism. This is a rule of dumb in any package manager/client since in reality failures occur pretty frequently.
StackStorm shouldn't be an exception in following more reliable strategy.
TODO
- Add retry, timeout, delay-on-retry logic to st2client httpclient
st2 packretry logic for git cloning and any networking-related requests.
Resources
- https://github.com/StackStorm/st2/blob/master/contrib/packs/actions/pack_mgmt/download.py
- https://github.com/StackStorm/st2/blob/master/st2common/st2common/services/packs.py
- http://docs.python-requests.org/en/master/user/advanced/#timeouts
- http://docs.python-requests.org/en/master/api/#requests.adapters.HTTPAdapter
DEFAULT_RETRIES = 0