IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

feat(python): add max retry configuration for python requests session #103

Closed rmkeezer closed 3 years ago

rmkeezer commented 3 years ago

Adds retry logic configuration for the python requests http_client. MAX_RETRIES determine how many times the client will retry the request and RETRY_INTERVAL will determine how long between each retry.

For the Python requests session, the RETRY_INTERVAL is passed to the backoff_factor instead of being "seconds between retries" since there is no retry interval. The backoff_factor value is passed to a function documented here. Ex. a backoff_factor of 0.1 will result in retry intervals of [0.0s, 0.2s, 0.4s, 0.8s, 1.6s, etc]

codecov[bot] commented 3 years ago

Codecov Report

Merging #103 (d772f12) into main (1683040) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
+ Coverage   98.72%   98.76%   +0.03%     
==========================================
  Files          18       18              
  Lines         704      726      +22     
==========================================
+ Hits          695      717      +22     
  Misses          9        9              
Impacted Files Coverage Δ
ibm_cloud_sdk_core/base_service.py 97.32% <100.00%> (+0.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1683040...d772f12. Read the comment docs.

ibm-devx-automation commented 3 years ago

:tada: This PR is included in version 3.9.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: