fix(flagd): configurable retry backoff after each sync cycle error (#756) #806
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR
adds configurable retry backoff options to the flagd in-process provider, which allows to configure the retry policy of gRPC connections.
Aims to make the implementation consistent with Java. See this change to prevent tight loops when the retry policy doesn't take effect
Related Issues
Details
Configuration and API Enhancements:
RetryBackoffMsandRetryBackoffMaxMstoProviderConfiguration, with corresponding default values, environment variable support, and provider options (WithRetryBackoffMs,WithRetryBackoffMaxMs). These allow users to configure retry backoff durations for connection retries. [1] [2] [3] [4] [5] [6]Retry Logic and Policy:
InitialBackoffandMaxBackoffinstead of hardcoded durations, making retry behavior fully configurable.Testing and Validation:
TestBuildRetryPolicy) for the retry policy builder, verifying that the generated JSON policy reflects the configured backoff values and other retry parameters.