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

Conflict between Time & Actors percentages #103

Closed
olivierlacan opened this issue Feb 17, 2016 · 8 comments
Closed

Conflict between Time & Actors percentages #103

olivierlacan opened this issue Feb 17, 2016 · 8 comments

Comments

@olivierlacan
Copy link

The interface appears to suggest that it's possible to enable, for example, a feature for 50% of actors and 25% of the time.

image

In my experience when the actors percentage gate is enabled, it means that whoever does have the feature enabled will have it enabled 100% of the time. In that case, the interface should not allow the other gate to be enabled simultaneously, should it?

@jnunemaker
Copy link
Collaborator

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?

@olivierlacan
Copy link
Author

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?

@jnunemaker
Copy link
Collaborator

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.

@jnunemaker
Copy link
Collaborator

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.).

@olivierlacan
Copy link
Author

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.

@jnunemaker
Copy link
Collaborator

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.

@olivierlacan
Copy link
Author

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. 😆

@jnunemaker
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants