12684: Remove custom retry logic from PySDK
authorBrett Smith <brett.smith@curii.com>
Wed, 3 May 2023 18:19:06 +0000 (14:19 -0400)
committerBrett Smith <brett.smith@curii.com>
Thu, 4 May 2023 21:43:07 +0000 (17:43 -0400)
commit35895ee91c820680bb7df9696ab2e92525ead2ac
treee121e2e62035af08ab14a6fc158f15bee4643f36
parent32c63d03d45d231768eb1497dfc5e9f4a0d23c16
12684: Remove custom retry logic from PySDK

This logic traces its roots back to
`5722c604c6f5dc1553674d179ec016ec12e2b090`. The goal of that commit was to
work around a bug in httplib, which we no longer use as a client
library. `31eb1bdc31e1d030844a6fdc7f4ba4286ec79d4f` made an analogous
change for httplib2.

`8a0eb69984a93852ec888cd3e02b778b0be758ed` made three major changes:

1. Proactively close sockets if they seem likely to be stale
2. Wrap the retry logic in a loop
3. Generalize catching `httplib.BadStatusLine` to `httplib.HTTPException`
   (which covers all kinds of malformed HTTP responses)

However, #1 functionally obsoletes the exception handlers added in the
earlier commits. Preemptively closing the sockets prevents httplib/2
from trying to reuse stale ones. So these exception handlers, along with
their retry loops, no longer serve their original purpose.

Remove this logic in favor of using the retry logic built into
googleapiclient. That logic is easier to configure and more refined.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
sdk/python/arvados/api.py
sdk/python/tests/test_api.py