juspay / superposition

Superposition is a context-based configuration management system designed to facilitate safe and flexible rollout of config changes
https://juspay.io/open-source/superposition
Apache License 2.0
351 stars 14 forks source link

Filter config by dimensions logic uses `equality check` on values mentioned in `context's` json-logic rather than json-logic apply (will need special partial apply) #117

Closed ShubhranshuSanjeev closed 3 months ago

ShubhranshuSanjeev commented 3 months ago

(From PR description)

Problem

Filter currently works only for in operator with array and for all other types it checks direct equality
Experiment filtering was not doing actual filter, rather it was applying the entire context
Config prefix filtering was sent in context
Prefix filter param of expt filtering not exposed to hs-client

Solution

Use jsonlogic's partial_apply for config and experiment filtering
Add separate function for Experiment filtering just like the filter function for config - also exposed to hs-client.
Introduce separate param for prefix in config filtering.
Exposed prefix filter param of expt filtering to hs-client.