Skip to content

Run the initial request with a nonpositive retry timeout - #2199

Open
zhechen-cs wants to merge 1 commit into
apache:trunkfrom
zhechen-cs:codex/retry-zero-timeout
Open

zhechen-cs wants to merge 1 commit into
apache:trunkfrom
zhechen-cs:codex/retry-zero-timeout

Conversation

@zhechen-cs

Copy link
Copy Markdown

Description

Always run the initial request in MinimalRetry and Retry, including when the timeout is zero or negative. Previously these values skipped the request and raised an unrelated TypeError from raise None.

If the request fails after the deadline, propagate its exception without sleeping. Regression tests cover both retry classes, successful results, retryable connection and rate-limit errors, and non-retryable errors.

Fixes #2198

Status

Ready for review.

Validation

  • Common, connection, utility and HTTP tests: 213 passed, 1 skipped, 16 subtests passed (Python 3.12; NO_INTERNET=1, loopback proxy bypass).
  • New regressions fail on the unmodified production code.
  • Black, isort, flake8, pylint and git diff --check pass for the changed files.
  • The full provider matrix and live cloud integration tests were not run.

Checklist

  • Code linting
  • Documentation (no public API change)
  • Tests
  • ICLA (small bug fix)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retry with a nonpositive timeout skips the initial request

1 participant