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

fix: add setProviderAndWait examples #614

Merged

Conversation

beeme1mr
Copy link
Member

This PR

  • adds setProviderAndWait example on the server readme
  • adds setProviderAndWait example on the client readme
  • fixed invalid link on the server readme

Related Issues

Fixes #613

Notes

The React SDK wasn't updated in this PR.

Signed-off-by: Michael Beemer [email protected]

Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
@beeme1mr beeme1mr requested a review from a team as a code owner October 24, 2023 18:17
@beeme1mr beeme1mr linked an issue Oct 24, 2023 that may be closed by this pull request
Copy link
Member

@toddbaert toddbaert left a 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.

beeme1mr and others added 2 commits October 25, 2023 12:52
Co-authored-by: Todd Baert <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
await OpenFeature.setProviderAndWait(new MyProvider());
```

#### Synchronous
Copy link
Member

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 ?

Copy link
Member Author

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?

Copy link
Member

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 ?

Copy link
Member

@toddbaert toddbaert Nov 3, 2023

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.

packages/server/README.md Outdated Show resolved Hide resolved
@toddbaert toddbaert changed the title docs: add setProviderAndWait examples fix: add setProviderAndWait examples Nov 3, 2023
@toddbaert
Copy link
Member

Changed the title so it prompts a release to update npm notes.

@toddbaert toddbaert enabled auto-merge November 3, 2023 17:53
@toddbaert toddbaert disabled auto-merge November 3, 2023 17:55
@toddbaert toddbaert merged commit 6b3a4e3 into main Nov 3, 2023
8 checks passed
@toddbaert toddbaert deleted the 613-doc-update-readme-to-include-setproviderandwait-examples branch November 3, 2023 17:55
toddbaert added a commit that referenced this pull request Nov 3, 2023
🤖 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 <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
toddbaert added a commit that referenced this pull request Nov 3, 2023
🤖 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 <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[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.

[DOC] update readme to include setProviderAndWait examples
3 participants