You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
json_evaluator [1] is the core evaluator currently used by flagd. Internally, it relies on Flags pushed from ISync implementations.
The current implementation however lacks a good design with regards to Flag storage. For example, PR #370 focused on concurrent map access bug fix required mutexes in two locations. This shows that json_evaluator internals needs refactoring.
Consider the following proposal,
Here, the json_evaluator connects to FlagStore , which replaces the currently used Flags structure with defined contracts (exported methods). This makes FlagStore internals hidden from its consumer (json_evaluator), allowing clear interactions and modifications .
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->
## This PR
<!-- add the description of the PR here -->
- Isolates flag state management to store package
### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->
Fixes#371
### Notes
<!-- any additional notes for this PR -->
### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->
### How to test
<!-- if applicable, add testing instructions under this section -->
I've ran [flagd's integration
tests](#312) against this
build to ensure behaviour is as before.
---------
Signed-off-by: Skye Gill <[email protected]>
json_evaluator
[1] is the core evaluator currently used by flagd. Internally, it relies onFlags
pushed from ISync implementations.The current implementation however lacks a good design with regards to Flag storage. For example, PR #370 focused on concurrent map access bug fix required mutexes in two locations. This shows that
json_evaluator
internals needs refactoring.Consider the following proposal,
Here, the
json_evaluator
connects toFlagStore
, which replaces the currently usedFlags
structure with defined contracts (exported methods). This makes FlagStore internals hidden from its consumer (json_evaluator), allowing clear interactions and modifications .[1] - https://github.com/open-feature/flagd/blob/main/pkg/eval/json_evaluator.go
The text was updated successfully, but these errors were encountered: