-
Notifications
You must be signed in to change notification settings - Fork 36
fix: only initialize NOT_READY providers #507
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
Conversation
c258b64
to
0eb553f
Compare
Hey, just wondering, do we already have a provider that implement the correct behavior? |
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.
The change looks good and the logged warning makes sense.
0eb553f
to
c6cbe04
Compare
@thomaspoignant the launchdarkly provider does: https://github.com/open-feature/js-sdk-contrib/blob/main/libs/providers/launchdarkly-client/src/lib/launchdarkly-client-provider.ts#L96-L99. So does the in-progress implementation of flagd-js-server: open-feature/js-sdk-contrib#484 |
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
c648f41
to
7b6ab22
Compare
This is fixed in all the providers I know needed to be updated. I will merge this in the next few days and release the artifact as our first non-experimental version if that's fine with you all. |
Signed-off-by: Todd Baert <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [0.0.10](shared-v0.0.9...shared-v0.0.10) (2023-07-31) ### Bug Fixes * only initialize NOT_READY providers ([#507](#507)) ([5e320ae](5e320ae)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.3.11](web-sdk-v0.3.10-experimental...web-sdk-v0.3.11) (2023-07-31) ### Bug Fixes * only initialize NOT_READY providers ([#507](#507)) ([5e320ae](5e320ae)) --- 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: Todd Baert <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Todd Baert <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.4.2](js-sdk-v1.4.1...js-sdk-v1.4.2) (2023-08-07) ### Bug Fixes * only initialize NOT_READY providers ([#507](#507)) ([5e320ae](5e320ae)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
See here. We should only run initialize if
ProviderStatus
isNOT_READY
to prevent duplicate calls toinitialize
, as we Java and Go.Most of this is test and formatting changes (I had to update the tests not to use the same object literal). The import change is the single line here.
Note: it's likely this will break some providers that didn't implement
status
. I think the flagd web provider, GoFF provider and the config-cat could be impacted. I created issues for these:Fixes: #505
I've also removed all the
setTimeouts
in our test suite. Everything is working "properly" now with plain events, since all flagd providers are fully updated.