Retry logic for 'st2client' and 'st2 pack'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with st2client/st2client/utils/httpclient.py, then inspect contrib/packs/actions/pack_mgmt/download.py and st2common/st2common/services/packs.py. Trace the networking requests and git-cloning paths, using the linked Requests documentation for retry and timeout behavior. Done means st2client and st2 pack retry relevant failures with configurable timeout and delay-on-retry logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100