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
349 stars 17 forks source link

fix: Filter config by prefix #293

Closed ayushjain17 closed 4 days ago

ayushjain17 commented 5 days ago

Problem

Config.filter_by_prefix gives wrong config on filtering

Solution

  1. Fix the logic for filter_by_prefix
  2. try_filter_by_prefix function was not needed, both server and client should use filter_by_prefix, using try_filter_by_prefix in server gives wrong output
  3. Added tests for Config, QueryMap, Contextual, Overridden functions