sdk-generator icon indicating copy to clipboard operation
sdk-generator copied to clipboard

The default retry policy is too permissive

Open rhamzeh opened this issue 5 months ago • 1 comments

Checklist

  • [X] I have looked into the README and have not found a suitable solution or answer.
  • [X] I have looked into the documentation and have not found a suitable solution or answer.
  • [X] I have searched the issues and have not found a suitable solution or answer.
  • [X] I have searched the Slack Community and have not found a suitable solution or answer.
  • [X] I agree to the terms within the OpenFGA Code of Conduct.

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

  • [X] JS SDK
  • [X] Go SDK
  • [X] .NET SDK
  • [X] Python SDK
  • [X] Java SDK

OpenFGA SDK version

Latest

OpenFGA version

N/A

SDK Configuration

N/A

Logs

No response

References

Sub-tickets:

  • [ ] JS SDK
  • [ ] Go SDK
  • [ ] .NET SDK
  • [ ] Python SDK
  • [ ] Java SDK

rhamzeh avatar Sep 19 '24 21:09 rhamzeh