Add ability to create/delete feature flag from merge request
Problem to solve
When developers ship a feature with a feature flag, they have to do two things manually, today.
- Merge a merge request which contains a new change behind a feature flag
- Create a feature flag which has the same name with the flag name in code. For example, in GitLab workflow, we execute a chatops command e.g.
/chatops run feature set <feature-name> <value>for creating a corresponding feature flag.
Similarly, when developers remove a feature flag from code, they have to do two things.
- Merge a merge request to remove a feature flag from code.
- Delete a feature flag which has the same name with the flag name in code. For example, in GitLab development flow, execute
/chatops run feature delete some_featurefor removing flag data as it's no longer used.
Users can mention
Create ^<FF-name> or
Remove ^<FF-IID> in MR description to create/remove the feature flag when the merge request has been merged (Similar to Closing issue automatically). This way, users can manipulate feature flags altogether with the occurrences in the code base.
The created feature flag should be disabled for all environments by default. Later on, developers/operators can jump into the FF page and manipulate the flag for A/B testing or such.