no retries on HTTP 5xx errors

Open Beginner friendly
#3,044 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
networking

Research direction

Find Urllib3Fetcher and inspect how it configures the PoolManager and urllib3 retries; check the existing fetcher tests for retry behavior. Add retries for HTTP 502, 503, and 504 responses, then verify those cases are covered by the tests.

Written by the indexing model from the issue text.

Description

Urllib3Fetcher ends up using a PoolManager that uses the default Retry(total=3) which has status_forcelist=set(): This means 502/503/504 responses without a Retry-After header are not retried.

I think this is overly cautious: I think we can retry those.

In practice this would make sigstore-python a little more reliable as sigstores TUF repo runs on Google Cloud GCS which does not include Retry-After on 504s but often works on a retry if a 504 happens

Dominant language
Python
Stars
1.7k
Forks
306
Avg merge
4d 40m
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from theupdateframework/python-tuf

All issues in theupdateframework/python-tuf

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.