-
Notifications
You must be signed in to change notification settings - Fork 40
fix: add setProviderAndWait examples #614
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
fix: add setProviderAndWait examples #614
Conversation
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with questions / minor nits.
Co-authored-by: Todd Baert <todd.baert@dynatrace.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
await OpenFeature.setProviderAndWait(new MyProvider()); | ||
``` | ||
|
||
#### Synchronous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be Asynchronous here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really struggled with the name here. Techically, the method is synchronous but the provider may not be ready immediately. Calling it asynchronous would imply that it would return a promise or accept a callback. However, I do agree that this is confusing. Can you think of a better term we could use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the naming is super complex on this one.
We can use something like blocking / non blocking maybe ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think this is accurate. The method returns immediately. The fact is starts some asynchronous stuff doesn't make the method itself asynchronous. I'm going to merge this for now since I think this doc is important and I'd like it for Kubecon. If you think of better language we can do that in a new PR.
…andwait-examples Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Changed the title so it prompts a release to update npm notes. |
🤖 I have created a release *beep* *boop* --- ## [0.4.4](web-sdk-v0.4.3...web-sdk-v0.4.4) (2023-11-03) ### 🧹 Chore * **main:** release core 0.0.17 ([#651](#651)) ([3c9fdd9](3c9fdd9)) * update spec version link ([eef0fc0](eef0fc0)) * add setProviderAndWait examples ([#614](#614)) ([6b3a4e3](6b3a4e3)) ### 📚 Documentation * extend yarn docs ([#647](#647)) ([e72fc19](e72fc19)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Todd Baert <todd.baert@dynatrace.com> Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
🤖 I have created a release *beep* *boop* --- ## [1.7.1](server-sdk-v1.7.0...server-sdk-v1.7.1) (2023-11-03) ### 🧹 Chore * **main:** release core 0.0.17 ([#651](#651)) ([3c9fdd9](3c9fdd9)) * update spec version link ([74d4b23](74d4b23)) * add setProviderAndWait examples ([#614](#614)) ([6b3a4e3](6b3a4e3)) ### 📚 Documentation * extend yarn docs ([#647](#647)) ([e72fc19](e72fc19)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Todd Baert <todd.baert@dynatrace.com> Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
This PR
setProviderAndWait
example on the server readmesetProviderAndWait
example on the client readmeRelated Issues
Fixes #613
Notes
The React SDK wasn't updated in this PR.
Signed-off-by: Michael Beemer beeme1mr@users.noreply.github.com