Add flag lifetime
Opened this issue · 2 comments
All flags should be created with an expected lifetime. One suggestion is 7 days for ops, 30 days for release, or custom duration.
What will happen when a flag has reached its lifetime (expired)? There are 2 alternatives, either
- Flag will always return 1f (true), making the feature available for all users
- Flag will always return 0f (false), disabling the features for all users
If we decided to go with alternative 1, sunsetting a feature should be done with something like disableFeatureX
that will expect 1f
value to turn off the feature
The idea would be to notify the team via the UI (and the owner directly, if we implement #47), but not act on their behalf.
In general, a person should be making a call of what should happen with the flag. Plans get delayed, change, etc. Overall,
expected lifetimes are an aid and encouragement of best practices, but not a forcing function.
If teams really do want a forcing function, they can always wrap their rules in an if(gt(now(), datetime(<date>)), true, <rule>)
, haha.