blackducksoftware / hub-rest-api-python

HUB REST API Python bindings
Apache License 2.0
89 stars 104 forks source link

Add retries within Authentication #264

Closed confy closed 6 months ago

confy commented 7 months ago

Occasionally our internal network can be unreliable so we end up relying on retries in some requests.

There are no retries within the Authentication classes(specifically BearerAuth) so our pipelines can occasionally fail when encountering a short lived 503 or 504.

Would it be alright to add retries for authentication here? I would add with the same set of request codes as laid out here: https://github.com/blackducksoftware/hub-rest-api-python/blob/master/blackduck/Client.py#L34

confy commented 6 months ago

Nevermind! retries should be used as it is included in the session