Open
Description
Motivation
As of today all flag evaluation are needing at least a targetingKey
.
The reason behind that is because the targetingKey
is used to do bucketing during the flag evaluation (specially for percentage based rules)
But not all flags requires bucketing, so in some cases it should be ok, not to have a bucketing key (targetingKey
or any other bucketingKey
).
Example
my-new-feature:
variations:
enabled: true
disabled: false
defaultRule:
variation: disabled
A flag like this one does not require a bucketing key, so we should accept an empty evaluation context for such flag.
Requirements
- We should allow empty evaluation context for flag that does not require it.
- In case of the flag requires a bucketing key and has no
targetingKey
we should not error if the flag is configured to use a differentbucketingKey
. - In case of the flag use a percentage based rollout and that we don't have any key to do the variant affection we should error with
TARGETING_KEY_MISSING
. - Today all OF providers are checking the presence of the
targetingKey
, we should remove this mandatory thing and let the evaluation goes to the relay-proxy before returning any errors.
This change is quite impactful and touch a lot of core components of GO Feature Flag, if you want to work on it please reach out before jumping on the implementation.