feat: Add multi-provider support
This PR
- Added Multiprovider class
- Added Strategies
- Added a new dependency for JSON
Related Issues
Resolves #1486
Follow-up Tasks
Multiprovider should be removed from the contrib codebase
Codecov Report
:x: Patch coverage is 96.38554% with 3 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 93.45%. Comparing base (e67f598) to head (84bc45a).
:warning: Report is 85 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...v/openfeature/sdk/multiprovider/MultiProvider.java | 94.64% | 2 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1500 +/- ##
============================================
+ Coverage 92.97% 93.45% +0.47%
- Complexity 488 519 +31
============================================
Files 46 50 +4
Lines 1182 1253 +71
Branches 103 112 +9
============================================
+ Hits 1099 1171 +72
+ Misses 53 51 -2
- Partials 30 31 +1
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 93.45% <96.38%> (+0.47%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Looks good so far! I'm not sure if we want to add a json dependecy (which might also produce the License Compliance error) "just" so that we can build up the metadata name string.
Should I construct the json using Strings?
Maybe it would be worth it. @toddbaert what do you think?
@chrfwow @toddbaert any updates on this?
Thank you, great effort. I am looking forward to having the multiprovider migrated. For me, the added dependency is currently a show stopper, because I think we can handle that with proper and simple data classes, even with better metadata support overall (not losing information from the sub providers). I added simple but untested code snippets to my review. Please let me know what you think about this approach.
Looks good to me. I'll add these changes and some UTs to make sure it's working correctly.
Hey @aepfli @chrfwow this is ready for review
Quality Gate passed
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
/gemini review
okay @suvaidkhan - as we now have gemini support, i executed the gemini review, and i think the initialization issue seems to be critical. We do have two options here - first we add the feedback for gemini now, and wait for your implementation before merging, or second option, we are merging this, and create an issue to address the gemini feedback regarding initialization. wdyt?
okay @suvaidkhan - as we now have gemini support, i executed the gemini review, and i think the initialization issue seems to be critical. We do have two options here - first we add the feedback for gemini now, and wait for your implementation before merging, or second option, we are merging this, and create an issue to address the gemini feedback regarding initialization. wdyt?
I'm fine with both But I think it makes more sense to fix the issue before merging
@suvaidkhan are you still working on this?
@suvaidkhan are you still working on this?
Hey yes sorry this slipped my mind, I'll take care of the null pointer asap
@suvaidkhan your proposal looks already quite handy. Looking forward to use it soon instead of the Java Contrib MultiProvider.