Flagsmith / Flagsmith/flagsmith
Add a "kill switch" for a flag/environment
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 124
Description
## Overview
A kill switch will prevent all overrides for a particular flag/environment combination, and ensure that the flag value/state for that particular environment always returns the default values and ignores any segment/identity overrides or multivariate values.
Enabling the kill switch will put the flag/environment into this mode. It will not 'delete' any override configuration, but it will bypass them as part of the rules engine. The user is then free to disable the kill switch, which will bring any overrides back into operation.
## Implementation
Add a "Kill Switch" boolean column to the current FeatureStateValue table.
Enabling this boolean *temporarily* removes all segment and identity overrides for a particular flag and consequently sets the flag state at the environment level for 100% of users. This would *not* delete the Segment Overrides, the Identity Overrides or the Multivariate values. Instead it would provide a "soft delete" of those items.
We will need to update the flag rules engine to check on this kill switch first. If it is set for a particular Flag and Environment, the rules engine should shortcut all overrides and multi variate calculations, and just return the default state (both boolean and string value) for that flag and environment
We should remove the existing "Disable All" button on the current Flag Overrides panel and replace it with a new "Kill Switch" toggle.
Contributor guide
Assessment
This issue has not been assessed yet.