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

[go-feature-flag] doesn't implement 'status' #489

Closed
toddbaert opened this issue Jul 26, 2023 · 0 comments · Fixed by #493
Closed

[go-feature-flag] doesn't implement 'status' #489

toddbaert opened this issue Jul 26, 2023 · 0 comments · Fixed by #493
Assignees
Labels
bug Something isn't working

Comments

@toddbaert
Copy link
Member

The Go-Feature-Flag provider doesn't implement status: https://github.com/open-feature/js-sdk-contrib/blob/main/libs/providers/go-feature-flag/src/lib/go-feature-flag-provider.ts

In order for it to stay functional after this is released, it needs to be updated to set its status field (it should start with it NOT_READY and update it to READY once its bgScheduler interval is started.

@toddbaert toddbaert added the bug Something isn't working label Jul 26, 2023
@thomaspoignant thomaspoignant self-assigned this Jul 27, 2023
toddbaert added a commit to open-feature/js-sdk that referenced this issue Jul 31, 2023
See here. We should only run initialize if `ProviderStatus` is
`NOT_READY` to prevent duplicate calls to `initialize`, as we
[Java](https://github.com/open-feature/java-sdk/blob/main/src/main/java/dev/openfeature/sdk/ProviderRepository.java#L107-L108)
and
[Go](https://github.com/open-feature/go-sdk/blob/main/pkg/openfeature/api.go#L173).

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](https://github.com/open-feature/js-sdk-contrib/blob/main/libs/providers/flagd-web/src/lib/flagd-web-provider.ts),
[GoFF](https://github.com/open-feature/js-sdk-contrib/blob/main/libs/providers/go-feature-flag/src/lib/go-feature-flag-provider.ts)
provider and the
[config-cat](https://github.com/open-feature/js-sdk-contrib/blob/main/libs/providers/config-cat/src/lib/config-cat-provider.ts)
could be impacted. I created issues for these:
- open-feature/js-sdk-contrib#488
- open-feature/js-sdk-contrib#489 
- open-feature/js-sdk-contrib#490

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.

---------

Signed-off-by: Todd Baert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants