-
Notifications
You must be signed in to change notification settings - Fork 218
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
match
is not returning
#60
Comments
echo '{"flag_key":"test","entity_id":"1","request_id":"1","context":{}}' |http http://localhost:8080/api/v1/evaluate
|
Thanks! Glad you find it useful. I think this might be a use case that I overlooked. Do you have any constraints defined for your segment or no? I'm assuming no since a segment with no constraints should potentially match everything. |
@markphelps hmm...well, I want to segment on all users, but then |
Nope I think it’s just an oversight on my end. Will try to fix this weekend. Would you mind posting a screenshot of your segment? |
it'd be awesome if you manage to fix it...i'm really excited to start using it in my product! I think it simplifies feature flagging and abstracts the way out of complex implementations 🍻 💯 😍 |
Thanks! Will work on it this weekend. Would love to talk to you as well about how you plan to use Flipt in your product. |
So I've reproduced the issue and have a workaround for you while I think more about if this is really a bug or a design choice. BackgroundHere's some info on why this isn't working as expected: Rules are attached to flags and segments, but in order for a rule to match a segment, currently a segment has to have constraints. This is so it can have something to match against your segments, and figure out which rule it should follow. The more I think about it, I think it does make sense to allow a segment to match on no constraints, like you expect. It will just require a bit of work for me to redo some of the evaluation logic, so it make take a few days, so I wanted to provide you a work around in the meantime. WorkaroundAdd a constraint to your segment, with a This should allow your rule to evaluate as you would expect. I'll follow up shortly with more info on the real fix |
@markphelps yeah I've done that, but feels weird to me to always pass something in the context just to force it to match a segment |
Yeah agreed
On Sat, May 11, 2019 at 10:15 AM Andrey ***@***.***> wrote:
@markphelps <https://github.com/markphelps> yeah I've done that, but
feels weird to me to always pass something in the context just to force it
to match a segment
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABTERPAEV6EHNFE5OIRHZDPU3IIJANCNFSM4HMGZG3A>
.
--
Mark Phelps
http://markphelps.me
|
Yeah thats right 🤔 So...you think you'll be able to put together a fix that doesn't require me to define a rule to match all or should I go ahead with this workaround? Define a random key that'll never be present. |
Yup will still work on fixing this so that you don't have to define a 'fake' constraint |
@andreyvital this should be fixed in the latest release, please let me know if you have any more issues. Thanks again 🍻 |
Hey @markphelps—great work.
I'm thinking about using flipt for a product I'm developing, however, I am not sure if I'm doing something wrong.
I've created one flag called "test" with a segment that matches on all contexts and a targeting rule on set to 50% and off also set to 50%. I can't seem to get a
match: true
ormatch: false
back from the server.The text was updated successfully, but these errors were encountered: