-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: blocking provider mutator #251
feat: blocking provider mutator #251
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #251 +/- ##
==========================================
- Coverage 81.61% 81.42% -0.19%
==========================================
Files 10 10
Lines 1142 1163 +21
==========================================
+ Hits 932 947 +15
- Misses 192 196 +4
- Partials 18 20 +2 ☔ View full report in Codecov by Sentry. |
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.
This seems good, code is clean. I think my only issue is that the set+wait function should return errors if the provider init fails, that's a key difference between the blocking and non-blocking setProvider functions.
Returning an error allows users to completely sidestep setting up error handers (though they can still do so optionally and we'd expect them to fire).
I think you should implement this and add a couple tests:
- one that returns an error for an init after some delay
- one that returns an error and also ensures error handlers are run.
Relavant PR language improvement (editorial, not significant): open-feature/spec#242
54ef5b0
to
f71a91c
Compare
Done, addressed this concern in the latest commit. I added error return as well as test to validate error return as well as eventing |
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
f71a91c
to
bfd25a3
Compare
This PR
SetProviderAndWait
&SetNamedProviderAndWait
with blocking provider mutatorsRelated Issues
Fixes #240
How to test
Tests were added to cover new APIs and old tests were updated to handle readiness emitted for non eventing providers
Footnotes
https://openfeature.dev/specification/sections/providers#requirement-242 ↩