-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
Allow making actors disabled when feature is globally turned on #82
Comments
See caveat 2 here: https://github.com/jnunemaker/flipper/blob/1c1b18763190dcfda6df41133ceb6aa63c53c35e/docs/Caveats.md Flipper is for explicitly letting people through gates, not keeping them out. That said, can you further describe your use case? Maybe there is a currently supported way of doing what you need to do or maybe it makes sense to add. |
We are guarding one of our product features with a feature flipper. After enabling it for a few actors, we enabled it globally, but one of our customers did not want to expose it for their accounts users. Our site admins did not find a way to disable it only for them on the UI, other than turning the feature off and listing every actor manually as enabled, except the problematic one. |
Ah, yeah so not a common case probably. One other way to solve it could be a group. You could make a group and enable it like this: Flipper.register(:some_group) do |actor|
!disabled_customer_ids.include?(actor.id)
end
Flipper[:some_feature].disable
Flipper[:some_feature].enable(:some_group)
Flipper[:some_feature].enabled?(disabled_customer) # false
Flipper[:some_feature].enabled?(other_customer) # true |
I just came looking for something like this too: In the course of rolling out a feature, there are a few specific cases where it doesn't seem to work yet 😖 So I found myself looking for a flow like this:
I found a workaround, using two different features:
then do the application logic like this: def feature_x_enabled?
if flag_enabled?("Blacklist Feature X")
false
else
flag_enabled?("Use Feature X")
end
end It's a bit tough to have the gate logic split between two, but it provides the behavior I was looking for! |
@rmosolgo thanks for the feedback! Love hearing usecases, especially with examples like that. I've been thinking lately that perhaps the v2 adapters could make this more easily possible as we could just add a new set that gets serialized next to enabled for disabled. Then, with a bit of negation code we would be good to go. I still wonder if the complexity1 is worth it, but if people keep finding that they need it, at least flipper can hide that complexity as best as possible. [1]. When I refer to complexity, mostly I mean everything has to change. API endpoints will need to return enabled and disabled actors and groups separately. UI will need to support showing enabled and disabled. Instrumentation will probably need to expose that something is enabled but disabled for specific actor instead of just enabled or not. |
I would guess not since there's about one request per year, judging by this thread 😆 I'm happy to "work around" it, and like you said, this is a very fair design goal/constraint:
And making two features worked fine for me (I was only worried about the support agents who might have had to flip it themselves). But in the end, we had to flip the master "OFF" switch anyways 😩 ! |
@rmosolgo appreciate the feedback. I will keep an eye on this thread and if we do start to see an increase we can come back to it. |
FWIW I would have liked this feature to exist. |
I may be speaking into a void here, but I also have a use case for this. I am going to implement the workaround of having two gates, one for a blacklist, but it makes using Flipper considerably more awkward. My use case: we're rolling out a new processing method for video assets. We're going to enabled it by percentage of actors to test the waters. The main fear is the new method will be too slow or fail entirely sometimes. We therefore need to be able to respond to failures or to approaching customer deadlines by forcing problematic files to the old path. It seems our choices are build in custom app logic (unacceptable -- ops team has no control), or use a second gate as a blacklist. Having disabled actor IDs would be a natural solution. EDIT -- another option would be to roll back to 0% when an issue is detected for a file that needs to go through. This is doesn't pass our bar as it too drastically slows down our dev cycles and data collection for the many files the new method does work on. By having a disable-by-actor, we can push forward with the rollout plan, handle edge cases manually, and, in parallel, work on improving the feature so that those edge cases are no longer problems. |
Never. I'm always here listening. 😄 I love getting specific use cases like this. There are two concerns:
Let's say you enable a % of time. Then you I guess we could make Like check out this decision tree:
Another option would be to make set datatypes different than the other gates. So instead of enable_actor/disable_actor, you would do This would be a breaking change. Probably minor and a quick search/replace for people. But it wouldn't be minor from how you think about Flipper, since thus far it is all about is anything enabled. |
I see the challenge. I think it boils down to:
I would need to understand the gate classes better to have a more informed opinion here. Maybe I'll dive in when i have a bit more time. For now I'm taking what you said to imply that we'd heavily prefer to stick to the same interface with I believe naming is important, so I'm thinking hard of what else could take the place of that third option without adding confusion to the existing |
In the current UI there is no way to disable for site administrators to disable a certain feature for a given user/account.
The text was updated successfully, but these errors were encountered: