Skip to content

Conversation

@alexandraoberaigner
Copy link
Contributor

@alexandraoberaigner alexandraoberaigner commented Dec 1, 2025

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:

  • Added RetryBackoffMs and RetryBackoffMaxMs to ProviderConfiguration, 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]
  • Updated the in-process sync and service layers to accept and use the new retry backoff configuration values, passing them through all relevant constructors and methods. [1] [2] [3] [4]

Retry Logic and Policy:

  • Modified the gRPC retry policy builder to use the configured backoff values for InitialBackoff and MaxBackoff instead of hardcoded durations, making retry behavior fully configurable.
  • Updated the sync retry logic to log and sleep for the configured maximum backoff duration after a failed sync cycle, improving observability and control.

Testing and Validation:

  • Added a new unit test (TestBuildRetryPolicy) for the retry policy builder, verifying that the generated JSON policy reflects the configured backoff values and other retry parameters.
  • Updated integration and unit tests to include the new retry backoff options, ensuring end-to-end coverage. [1] [2] [3] [4] [5]

@alexandraoberaigner
Copy link
Contributor Author

DRAFT: rebase on main after #799 is merged -> the PR includes its changes

alexandraoberaigner and others added 10 commits December 1, 2025 16:34
Signed-off-by: Alexandra Oberaigner <[email protected]>
Signed-off-by: Alexandra Oberaigner <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Alexandra Oberaigner <[email protected]>
Signed-off-by: OpenFeature Bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alexandra Oberaigner <[email protected]>
Signed-off-by: OpenFeature Bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Alexandra Oberaigner <[email protected]>
Signed-off-by: Alexandra Oberaigner <[email protected]>
…t behaviour to Java flagd provider

Signed-off-by: Alexandra Oberaigner <[email protected]>
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.

4 participants