Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(change) Allow empty evaluation context for some flags. #2533

Open
thomaspoignant opened this issue Oct 16, 2024 · 1 comment
Open

(change) Allow empty evaluation context for some flags. #2533

thomaspoignant opened this issue Oct 16, 2024 · 1 comment
Labels
change This is a change in the code that should not affect the users p2 Medium priority

Comments

@thomaspoignant
Copy link
Owner

thomaspoignant commented Oct 16, 2024

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 different bucketingKey.
  • 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.

@thomaspoignant thomaspoignant added p2 Medium priority change This is a change in the code that should not affect the users ODHack9 labels Oct 16, 2024
Repository owner deleted a comment from martinvibes Oct 24, 2024
Repository owner deleted a comment from bruhhgnik Oct 24, 2024
@martinvibes
Copy link
Contributor

hello @thomaspoignant can i work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change This is a change in the code that should not affect the users p2 Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants