-
Notifications
You must be signed in to change notification settings - Fork 67
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: move json logic operator registration to resolver #1291
feat: move json logic operator registration to resolver #1291
Conversation
✅ Deploy Preview for polite-licorice-3db33c canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1291 +/- ##
==========================================
+ Coverage 73.69% 77.41% +3.72%
==========================================
Files 32 20 -12
Lines 3140 1612 -1528
==========================================
- Hits 2314 1248 -1066
+ Misses 717 282 -435
+ Partials 109 82 -27 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kavindu Dodanduwa <[email protected]>
5d010e2
to
1c51074
Compare
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.
Ya this makes sense.
🤖 I have created a release *beep* *boop* --- <details><summary>flagd: 0.10.1</summary> ## [0.10.1](flagd/v0.10.0...flagd/v0.10.1) (2024-04-19) ### 🐛 Bug Fixes * **deps:** update module github.com/open-feature/flagd/core to v0.9.0 ([#1281](#1281)) ([3cfb052](3cfb052)) ### ✨ New Features * move json logic operator registration to resolver ([#1291](#1291)) ([b473457](b473457)) </details> <details><summary>flagd-proxy: 0.6.1</summary> ## [0.6.1](flagd-proxy/v0.6.0...flagd-proxy/v0.6.1) (2024-04-19) ### 🐛 Bug Fixes * **deps:** update module github.com/open-feature/flagd/core to v0.9.0 ([#1281](#1281)) ([3cfb052](3cfb052)) </details> <details><summary>core: 0.9.1</summary> ## [0.9.1](core/v0.9.0...core/v0.9.1) (2024-04-19) ### 🐛 Bug Fixes * missing/nil custom variables in fractional operator ([#1295](#1295)) ([418c5cd](418c5cd)) ### ✨ New Features * move json logic operator registration to resolver ([#1291](#1291)) ([b473457](b473457)) </details> --- 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: OpenFeature Bot <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR
Attempts to isolate Resolver creation and related logic into a single component.
Previously, custom Json logic operator registration was done at flagd using
WithEvaluator
option . But this adds confusion when Resolver needs to be reused in another component. Further the option was merely adding the custom operator to json logic through its global methods and did not perform anything on the evaluator . Given that Resolver is responsible for flag resolving (core logic of the flag evaluations), I have deprecatedWithEvaluator
option and added custom json logic registration as part of the resolver constructor.I have not removed
JSONEvaluatorOption
option so we have flexibility to support any future option (ex:-option to have a customizedIResolver
implemetnation )