Git Product home page Git Product logo

Comments (8)

jnunemaker avatar jnunemaker commented on July 30, 2024

Flipper is all about enabling. If you enable for 50% of actors and 25% of the time, 50%-ish of actors will be enabled and it should also randomly be enabled 25% of the time. It checks the gates in order (https://github.com/jnunemaker/flipper/blob/4c6a9978940e0f7b097e51df153c4cac49f141c8/lib/flipper/feature.rb#L323-L327). If any return true, it stops. If they return false, flipper will keep going until one is true.

I say all that to say that each gate is about true/false individually. The gates are not used in combination (aka enabled for 50% of actors 25% of the time which I think is what you are saying?). Think of each gate as OR'd. If any are true, things are enabled. If all are false, it is disabled.

Am I understanding what you are asking? Does that explain it?

from flipper.

olivierlacan avatar olivierlacan commented on July 30, 2024

Ok, it's not clear at all from the interface that it's an OR situation because they co-exist on the exact same line. That's what's so confusing about this. I honestly think that flipping one gate on should disable the other if there's an order dependency, otherwise you may have people using Flipper thinking they do indeed have 50% of actors seeing a feature 25% of the time.

Does that make sense?

from flipper.

jnunemaker avatar jnunemaker commented on July 30, 2024

There is no order dependency. All gates are OR'd. The order in which they return true doesn't matter. Either one or more of them returns true or none of them do. Using one gate at a time is actually hindering. At GitHub, we often enable features for specific users or repositories. Then eventually we enable for a percentage of actors or some other option. Any of those that return true let the user in to the feature and that is very useful.

I definitely don't want to change the OR functionality in flipper, but I certainly can understand how some people would be confused by this. Perhaps I should add another caveat to the list (https://github.com/jnunemaker/flipper/blob/master/docs/Caveats.md)? I also mention order here: https://github.com/jnunemaker/flipper/blob/4c6a9978940e0f7b097e51df153c4cac49f141c8/docs/Gates.md#gates. Perhaps I should delve into a bit more detail in the first paragraph there discussing "OR"? I'm super open to suggestions and appreciate the feedback, as I don't want others to hit this.

I'm also open to changes to the UI. I put them beside each other because visually it just kept things more compact and looked nice. They are the same height and don't need to be full width. Groups and actors are beside each other also, but I assume you didn't think that it was only enabled for actors within an enabled group, right? Maybe a paragraph in both percentage based boxes would help? I'm trying to think of what to say.

from flipper.

jnunemaker avatar jnunemaker commented on July 30, 2024

FWIW, I've also considered adding a way to combine gates, so you could do things like what you were thinking, though the percentages don't really seem valuable together as other gates would be (ie: enable for 25% of east coast actors, etc.).

from flipper.

olivierlacan avatar olivierlacan commented on July 30, 2024

Ok, I see I misunderstood what you said at first. This makes sense now. I think copy in the interface would likely help dispel confusion. I think I read the caveats and gates docs but I'll blame forgetfulness for not fully remembering or understanding the OR part.

Combined gates (although a likely headache to understand too) would be interesting although we're definitely not doing anything nearly that granular. I'm sure some people would find it useful but I think it might be wise to wait until someone actually asks for it.

Thanks for the explaining this so thoroughly by the way.

from flipper.

jnunemaker avatar jnunemaker commented on July 30, 2024

although a likely headache to understand too

Totally why I haven't added them yet. Haha.

I think copy in the interface would likely help dispel confusion.

Any suggestions on the text? Even a terrible first stab that might have helped you would be helpful for me to iterate on.

from flipper.

olivierlacan avatar olivierlacan commented on July 30, 2024

Any suggestions on the text? Even a terrible first stab that might have helped you would be helpful for me to iterate on.

First crack at it:
image

This is not affected by the Percentage of Time. If you enable 50% of Actors and 25% of Time then the feature will always be enabled for 50% of users and occasionally enabled 25% of the time for everyone.

Again assuming I didn't get this all wrong. 😆

from flipper.

jnunemaker avatar jnunemaker commented on July 30, 2024

I can work with that. I'll try to whip something up. Feel free to tackle before me if you feel so inclined.

from flipper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.