Skip to content

Add retry behaviour #772

Closed
Closed

Description

@estahn

Is your feature request related to a problem? Please describe.

Connections and API responses are flakey at times. A built-in retry mechanism could improve the success of responses.

Describe the solution you'd like

Use https://github.com/jd/tenacity (or similar) to add retry-behaviour.

Activity

  1. added this to the 0.15.0 milestone on Jul 7, 2023
  2. dbanty commented on Jul 7, 2023

    @dbanty
    Collaborator

    I'm going to consider #775 as fixing this since you will be able to use the built-in httpx retries as well as reuse client connections when doing other retries (a la tenacity). I think retries tend to be super specific to each use-case, so adding a default opinionated mechanism in every client probably won't be super useful.

  3. imadmoussa1 commented on Jul 19, 2023

    @imadmoussa1

    The httpx retries only manage connection failure . will we be considering adding something more custom httpx retry requests to the generator ?

  4. dbanty commented on Jul 23, 2023

    @dbanty
    Collaborator

    @imadmoussa1 I think desired retry behavior is going to depend a lot on the application and the API—I'd assume that most folks creating SDKs for an API would like to build in their recommended retry behavior 🤔. If there's enough demand for it, we could add some sort of retry config for certain responses (specifically, those which include a Retry-After header, just to avoid folks having to include tenacity as a dependency for common cases.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions