Closed ran-isenberg closed 2 years ago
Great idea. Perhaps the parameters utility can be integrated with this somehow? The feature flags utility documentation states that "You can use Parameters utility for static flags while this utility can do both static and dynamic feature flags." So perhaps it's a matter of extending the Parameters utility so it can also be dynamic, like feature flags?
@alexsh-ca Thanks for the support! I think the feature flags could use some re-branding if we add this feature. To me, it's much more than a feature flags utility. It's a full fledged configuration utility- you have smart feature flags and you have the RAW configuration getter. Another feature would be "smart" configuration, not just True/False. One complete package, something similar to what other solution offers in their SDK (LaunchDarkly come into mind) .
So they way I see it, is we add a new function and a new subsection for the complex engine in the json file and perhaps an updated schema (maybe add a new field for when_match field type etc.).
@heitorlessa see https://github.com/awslabs/aws-lambda-powertools-python/pull/804 for a working POC
Note that LaunchDarkly python library is completely un typed
@michaelbrewer what do you mean? to my understanding, LaunchDarkly's API returns 'ANY' for an evaluated feature value. I was able to achieve this behavior in this PR.
Just saying that powertools includes helpful type hinting. Where as LaunchDarkly just has none
Hey @ran-isenberg thanks again for the initial implementation! This is available on 1.24 ;)
Today, the utility feature flags support boolean flags. The utility support only boolean values at the moment, hence the wording "flag". The utility can support more complex rule match values. I'd like to be able to provide a session context and get back according to the rule engine a more complex object such as Dict, list etc.