Comments (8)
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.
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.
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.
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.
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.
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.
Any suggestions on the text? Even a terrible first stab that might have helped you would be helpful for me to iterate on.
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.
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)
- KeyError: key not found: true in strict mode HOT 2
- Sync error with flipper cloud HOT 9
- Error when running migrations with Flipper and Strong Migrations HOT 1
- Inconsistency - custom description, banner_text uses `Sanitize` but actor names is fully escaped HOT 2
- How to handle strict adapter with test? HOT 1
- (1.2) uninitialized constant Flipper::CLI::IRB (NameError) HOT 5
- (1.2) `Flipper::TestHelp` initializer raises an error if enabled HOT 3
- RSpec/Rails Issues with 1.2.1 HOT 1
- Feature flag not being enabled in RSpec specs on 1.2.1 HOT 7
- Flipper 1.2.2 breaks my CI HOT 7
- Loading all actor identifiers into memory isn't scalable HOT 8
- Flipper::Adapters::Strict::NotFound raised when checking non-existant feature flag during rspec test HOT 9
- How to design a request-scoped per-actor flag state table? HOT 5
- Flipper Redis Adapter ignoring configuration block sometimes HOT 5
- Rails credentials read prevents Flipper from working on Rails < 5.2 HOT 2
- Flipper-active_record breaks in 0.26.2+ with Rails 4.2 HOT 2
- missing a template for this request format and variant. request.formats: ["text/css"] request.variant: [] HOT 2
- ActiveRecord adapter: unexpected error when running in a transaction HOT 13
- Stop Flipper from outputting things in the console HOT 2
- Bit by actor delegation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flipper.