feat: Support mapping a client to a given provider.#388
Conversation
a1f948e to
a1bbf38
Compare
Codecov Report
@@ Coverage Diff @@
## main #388 +/- ##
============================================
+ Coverage 91.53% 93.20% +1.66%
- Complexity 213 220 +7
============================================
Files 23 23
Lines 496 500 +4
Branches 32 32
============================================
+ Hits 454 466 +12
+ Misses 24 17 -7
+ Partials 18 17 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
e9a298f to
9932825
Compare
If you think it's worth it, it could be something we mention in the glossary. |
|
Doc improvement: open-feature/spec#186 |
7e5ec3d to
f2abe39
Compare
Signed-off-by: Justin Abrahms <[email protected]>
Signed-off-by: Justin Abrahms <[email protected]>
Signed-off-by: Justin Abrahms <[email protected]>
Signed-off-by: Justin Abrahms <[email protected]>
Signed-off-by: Justin Abrahms <[email protected]>
Signed-off-by: Justin Abrahms <[email protected]>
Signed-off-by: Justin Abrahms <[email protected]>
… lock. Signed-off-by: Justin Abrahms <[email protected]>
Co-authored-by: Lars Opitz <[email protected]> Signed-off-by: Justin Abrahms <[email protected]>
There's no such thing as "API without a provider set" anymore. We now default to NoOpProvider in the API (not client). Signed-off-by: Justin Abrahms <[email protected]>
777cb0b to
f5c60b5
Compare
Signed-off-by: Justin Abrahms <[email protected]>
| private EvaluationContext evaluationContext; | ||
| private List<Hook> apiHooks; | ||
| private final List<Hook> apiHooks; | ||
| private FeatureProvider defaultProvider = new NoOpProvider(); |
There was a problem hiding this comment.
👍 for the noop default provider. This ensures null safety where possible.
|
Kudos, SonarCloud Quality Gate passed!
|
|
@justinabrahms @toddbaert any concerns about merging this? |
Nope (but lets' not release until all this is done, IMO). |








This PR
This adds support for mapping a client name onto a given provider, while still providing backwards compatibility to existing clients.
Related Issues
Refs open-feature/ofep#56
Fixes: #442
Follow-up Tasks
I still need to clean up documentation around this to note the difference between a "default provider" and a client-specific provider.
How to test
Not sure about testing, but I'd especially love eyes on the thread safety. I don't think ConcurrentHashMap is doing a lot of work here, given we have to use locks to support
getProviderForClientOrDefault. If you have a better way, I'm all ears.