Comments (11)
+1
This is a common use case. Imagine you enable a feature for all of your users and then you figure out it's giving problems to only one user. I don't want to turn everyone off.
from rollout.
This is probably a lot more complicated that it looks like.
Mentioned use case is clear:
$rollout.activate_group(:chat, :all)
$rollout.deactivate_user(:chat, user)
$rollout.active?(:chat, user) # should be true but isn't
But what if you consider
$rollout.activate_group(:chat, :group_including_user)
$rollout.deactivate_user(:chat, user)
$rollout.activate_group(:chat, :another_group_including_user)
$rollout.active?(:chat, user) # what should outcome be?
As you know groups can be overlapping so what should you do in this case? Should you still keep feature disabled for user based on deactivate_user
?
Sames applies to
$rollout.activate_group(:chat, :group_including_user)
$rollout.deactivate_user(:chat, user)
$rollout.activate_group(:chat, :all)
$rollout.active?(:chat, user) # what should outcome be?
Or slightly different use case: let's say you enable feature for specific user to test it, then you disable it and you go make some final tweaks, then you know it's ready and you enable it for everybody
$rollout.activate_user(:chat, user)
$rollout.deactivate_user(:chat, user)
$rollout.activate_group(:chat, :all)
$rollout.active?(:chat, user) # what should outcome be?
I'm kind of afraid this would introduce even more unexpected behaviour if it's not well thought out.
How do you think this should work?
from rollout.
How do you think this should work?
I think it should consider the last action made on a user. So in your examples:
$rollout.activate_group(:chat, :group_including_user) # user should be active
$rollout.deactivate_user(:chat, user) # overrides the current state so user should be deactivated, all other members active
$rollout.activate_group(:chat, :another_group_including_user) # overrides the current state so user should be active
$rollout.active?(:chat, user) # return true
$rollout.activate_group(:chat, :group_including_user) #user should be active
$rollout.deactivate_user(:chat, user) #overrides the current state so user should be deactivated
$rollout.activate_group(:chat, :all) # overrides the current state so user should be active
$rollout.active?(:chat, user) # what should outcome be?
WDYT ?
from rollout.
I had the same issue. I suppose that this is is the behaviour right now but I do believe that a black-list approach would be great.
from rollout.
This doesn't seem like too much of a bug. If you've decided to activate a feature for everyone you probably shouldn't be deactivating it on a per user basis.
from rollout.
I'd also love to see this fixed. It just doesn't make sense to model things this way. I think you should be able to disable a single user even if they are in a group.
from rollout.
+1
from rollout.
@reneklacan thoughts?
from rollout.
+1
Any plans to address this? @reneklacan @johnbaku
from rollout.
@AhmedBelal I hit up @reneklacan and he will check it out! Sorry about that!
from rollout.
@alfonsocora
Imagine you enable a feature for all of your users and then you figure out it's giving problems to only one user. I don't want to turn everyone off.
If feature is enabled for all, you can deprecate group rule and only use per-user flags probably?
from rollout.
Related Issues (20)
- Missing release tags HOT 1
- Modulus operator does not create uniformly distributed random numbers HOT 1
- Missing dependency on json HOT 2
- Percentage Rollout on rails view HOT 2
- Google Calendar and iCalendar Integration HOT 3
- Cannot remove a rollout flag from the persistent store HOT 1
- Cronometer of Events HOT 1
- Feature request: to_hash method on Rollout class?
- Activate and Deactive methods work. But activate_user and deactivate_user do not. HOT 1
- check current rollout percentage? HOT 2
- Keyboard TAB marker totally absorbed by certain CSS
- Public Interface for deleting feature entries from Redis HOT 2
- Should memoization be used? HOT 5
- Deprecation warning after upgrading to redis gem version 4.2.0 HOT 5
- Safe to upgrade to 2.5? HOT 1
- Add tag and release for 2.5.0? HOT 2
- Suggest to use a class instead of a global variable for a Rails application HOT 1
- Rollout may break when a group with a | character in the name is activated for a feature with additional data
- Rollout#activate returns false HOT 3
- Redis-rb 5.0+ compatibility HOT 9
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 rollout.