-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 feature flags to be for time limited #1903
Comments
This sounds like a super helpful feature, go for it @weyert! Let us know if you need any guidance here. CC @neilkakkar |
Thank you @paolodamico :) @neilkakkar I was thinking to add a column to the I am wondering if it makes sense to also introduce a |
I think having a start and end time in the model is reasonable. Then you'd modify the query building here to make it work. The part that requires a bit of thinking is: We also have a "active" field in the model, which determines which FFs are active. This now needs to respect these new fields as well. As otherwise, these two fields clash: if the end_date is in the past, how can the FF be active? I'm not quite sure yet what's the best way around this. One option is to have an "active" property, which takes into account the logic for start/end dates, as well as the value of the active field, and then every code path using Another option might be to set active to false once the end_date passes, but at first glance this seems problematic and messy: how & when is this triggered, such that there's no long term delays & things stay consistent? |
I will try to work on this during my vacation |
Given we have local evaluation as well now, I don't think this feature should touch query building / what i.e. a celery task that runs every hour (maybe less) & checks if a flag is inactive but start_time has arrived & then turns it on; and conversely if flag is active & end_time has arrived & then turns it off. |
Hey @weyert, this has now become possible with scheduling flag changes: https://posthog.com/docs/feature-flags/scheduled-flag-changes |
Is your feature request related to a problem?
I would like to be able to automatically disable a feature flag after a specific time. For example, Halloween and Sinterklaas are coming up. I think it would be nice to be able add feature flags which are only active for like 25-31 October and after 31 October it automatically disable.
Describe the solution you'd like
I think we could add Start and End/Expiry Date to a feature flag which is taken into account when calling
/decide
-endpointDescribe alternatives you've considered
Manually enable and disable the feature flag
Thank you for your feature request – we love each and every one!
The text was updated successfully, but these errors were encountered: