chore: Do not use the configured start wait time to bound initialization - #68
Merged
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
@cursor review |
kinyoklion
marked this pull request as ready for review
September 1, 2026 17:56
keelerm84
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intentionally chore. I am removing the changelog as it has not been released.
Reverts #60 and #66, restoring the pre-2.2.0 initialization behavior.
StartWaitTimeis aConfigurationproperty, so it belongs to the client constructor's blocking behavior; the provider no longer reuses it to boundInitializeAsync.InitializeAsyncagain waits for the client to become ready or to fail permanently, with no timeout of its own; callers bound the wait by choosing whether to awaitSetProviderAsync.Requirements
Implementation details
Related issues
Reverts #60 ("Stop waiting for initialization after the configured start wait time", released in 2.2.0) and #66 ("Resolve initialization immediately when a start wait time was used", pending release in 2.3.1).
Describe the solution you've provided
git revertof both commits, soProvider.csis byte-identical to its state at ed29935 (immediately before #60): the internalstartWaitconstructor parameter, theStartWait(config)helper,FailInitializationIfNotReady, and the_initLockaround theValidstatus transition are all gone. The README matrix row for Initialization is rewritten rather than restored verbatim, because the text #64 added described the #60 behavior.The rationale:
StartWaitTimelives onConfiguration, not on the provider constructor, and the LaunchDarkly client constructor has already consumed it before OpenFeature ever callsInitializeAsync. Deriving an OpenFeature initialization deadline from it made the same value mean two different things, and made a non-awaitedSetProviderAsyncput the provider intoERRORfor a merely slow start.Describe alternatives you've considered
Keeping #66 and only adjusting the messaging, or exposing an explicit provider-level initialization timeout parameter. Neither was pursued: the requested outcome is the original behavior, where the caller controls how long to wait by awaiting
SetProviderAsyncor not.Additional context
Behavior after this revert, per registration style:
SetProviderAsync(provider)not awaited: initialization runs in the background and waits for readiness; aPROVIDER_READYevent is emitted whenever the data source becomes valid.SetProviderAsync(provider)awaited: waits until the data source becomes valid or permanently fails. With a positiveStartWaitTimethe client constructor has already blocked for that long, so the remaining wait is unbounded — useStartWaitTimeto bound constructor blocking and the OpenFeaturePROVIDER_ERROR/PROVIDER_READYevents to observe later state.dotnet testpasses onnet8.0(68 tests);net471andnet6.0runtimes are unavailable in this environment and are covered by CI.Link to Devin session: https://app.devin.ai/sessions/34fc74bc093b4c6680d2fddef4a4679b
Open in Devin Desktop: https://app.devin.ai/desktop/session/34fc74bc093b4c6680d2fddef4a4679b?variant=devin
Requested by: @kinyoklion
Note
Overview
Reverts the 2.2.x behavior where
StartWaitTimealso capped OpenFeatureInitializeAsync.InitializeAsyncagain waits until the LaunchDarkly data source is ready or permanently fails, with no provider-level timeout;StartWaitTimeonly affects blocking in theLdClientconstructor.The provider drops the internal start-wait plumbing (
FailInitializationIfNotReady,StartWait(config), and the extra lock on theValidstatus path). README Initialization and Asynchronous initialization text is updated to match. Tests that asserted init timeout / late-ready after timeout are removed.Reviewed by Cursor Bugbot for commit bd5d310. Bugbot is set up for automated code reviews on this repo. Configure here.