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

[FLI-923] Support a negative match on a segment #2886

Open
1 task done
GeorgeMac opened this issue Mar 21, 2024 · 0 comments
Open
1 task done

[FLI-923] Support a negative match on a segment #2886

GeorgeMac opened this issue Mar 21, 2024 · 0 comments
Labels
enhancement Created by Linear-GitHub Sync lg Little bit big linear

Comments

@GeorgeMac
Copy link
Contributor

GeorgeMac commented Mar 21, 2024

Problem

The ability to express in a rule or rollout that a context does not match a specified segment.

An example usecase is that you can replicate what we have with variant type flags, where a context both matches some segment and falls into a distribution. This can be expressed in rollouts by first adding a negative match on a segment which returns early, before falling through to a threshold constraint.

  • if not match segment return false
  • if in within threshold 60% return true
  • otherwise, return default

This here ensures that true is only returned both when the context does fall in the segment and is within the precentage threshold.

Ideal Solution

One possible way to express this would be with a matches boolean property on rules or rollout segments, which defaults to true. This could be change to false to express the negative match.

 flags:
 - key: somevariantflag
   name: Some Variant Flag
   type: VARIANT_FLAG_TYPE
   variants:
   - key: a
   - key: b
   rules:
   - segment: foo
+    matches: false
     distributions:
     - variant: a
       rollout: 100
 - key: somebooleanflag
   name: Some Boolean Flag
   type: BOOLEAN_FLAG_TYPE
   rollouts:
   - segment:
       key: foo
+      matches: false

Search

  • I searched for other open and closed issues before opening this

Additional Context

No response

FLI-923

@GeorgeMac GeorgeMac added the enhancement Created by Linear-GitHub Sync label Mar 21, 2024
@markphelps markphelps changed the title Support a negative match on a segment [FLI-923] Support a negative match on a segment Mar 25, 2024
@GeorgeMac GeorgeMac added the lg Little bit big label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Created by Linear-GitHub Sync lg Little bit big linear
Projects
Status: No status
Development

No branches or pull requests

2 participants