Skip to content

feat: Add a start wait timeout for initialization - #59

Draft
kinyoklion wants to merge 3 commits into
mainfrom
devin/1787767005-python-start-wait
Draft

feat: Add a start wait timeout for initialization#59
kinyoklion wants to merge 3 commits into
mainfrom
devin/1787767005-python-start-wait

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Aug 26, 2026

Copy link
Copy Markdown
Member

Adds a start_wait parameter to LaunchDarklyProvider, defaulting to the LaunchDarkly SDK's five seconds.

  • The value is passed to LDClient(config, start_wait) and bounds the whole of initialization: with a positive value initialize completes with the outcome the constructor already waited for, rather than waiting again, so a 5 second start wait cannot become a 10 second wait for set_provider_and_wait.
  • Initialization fails when the client did not become ready in time; the provider keeps reporting status afterward, so a later connection still makes it ready.
  • Zero does not block the constructor at all, and initialize then waits without a deadline.
Implementation details
# With a start wait the client constructor has already waited, so the outcome is whatever it is now.
if self.__start_wait <= 0:
    ready_event.wait()

Testing: make test, make lint. Tests cover the default matching the SDK default and initialization failing without waiting a second time.

Related spec change: https://github.com/launchdarkly/sdk-specs/pull/257

Link to Devin session: https://app.devin.ai/sessions/0c452d209ec54b068ba120b4c92b8f6c
Open in Devin Desktop: https://app.devin.ai/desktop/session/0c452d209ec54b068ba120b4c92b8f6c?variant=devin
Requested by: @kinyoklion

Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot added the devin-pr Pull request created by Devin AI label Aug 26, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

@cursor review

Comment thread ld_openfeature/provider.py Outdated
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@kinyoklion
kinyoklion marked this pull request as ready for review August 28, 2026 21:52
@kinyoklion
kinyoklion requested a review from a team as a code owner August 28, 2026 21:52
@kinyoklion
kinyoklion marked this pull request as draft August 28, 2026 21:52
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devin-pr Pull request created by Devin AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant