openfga / sdk-generator

OpenFGA Client SDK Generator
Apache License 2.0
16 stars 38 forks source link

The default retry policy is too permissive #417

Open rhamzeh opened 2 weeks ago

rhamzeh commented 2 weeks ago

Checklist

Description

We bumped up the default retry (https://github.com/openfga/sdk-generator/blame/1cc4b1b2bc26739e031ae80c7c69da42d0bfb141/config/common/config.base.json#L87) from 5 to 15 last year

The default retry behaviour of 15 retries with exponential backoff is far too aggressive. This means the caller could be sat waiting many minutes for all the retries to complete.

Expectation

It's unexpected for the user for the SDK to be stuck hanging for a while as it retries - by default we should be retrying a few times and failing early.

A more sane default could be 3 retries before giving up

Reproduction

N/A

SDK Checklist

OpenFGA SDK version

Latest

OpenFGA version

N/A

SDK Configuration

N/A

Logs

No response

References

Sub-tickets:

ovindu-a commented 4 days ago

Hi @rhamzeh, I have made a pull request for the above issue. Please let me know if there is anything that I must change. Thank you in advance