Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataSourceProvider.WaitFor/WaitForAsync waits for validity and not initialization #183

Open
IsabellaCapriottiUIPath opened this issue Nov 15, 2023 · 1 comment
Labels
package: sdk/server Related to the LaunchDarkly.ServerSdk package

Comments

@IsabellaCapriottiUIPath

Hello! First, I'll give some context on the use case here. I am implementing a method that waits for the LaunchDarkly client to be fully initialized before the first feature flag evaluation to ensure that the first evaluation doesn't fall back to the default value.

I attempted to use the DataSourceProvider.WaitFor() method to achieve this; however, after testing, I saw that this method waits for the Valid state and not the Initialized state. So, when we call the client for the first time, it is still not initialized. I'm not sure of what the internals are on how these two states are different, but I believe it's not the expected behavior for this WaitFor() method to return when the client is not in a fully ready state. The desired behavior, as I see it, would be for WaitFor() to wait for the full initialization state and not the validity state, or at the least have an option to do so.

Thank you so much in advance!

@tanderson-ld
Copy link
Contributor

tanderson-ld commented Nov 15, 2023

HI @IsabellaCapriottiUIPath , could you provide a snippet of your code? Also, which version of the SDK are you using? This may be better handled by opening a support ticket. If you do choose to open a ticket, I highly recommend including code snippets of how you're initializing the client.

@cwaldren-ld cwaldren-ld added the package: sdk/server Related to the LaunchDarkly.ServerSdk package label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: sdk/server Related to the LaunchDarkly.ServerSdk package
Projects
None yet
Development

No branches or pull requests

3 participants