Detect and document unused feature flags
The following discussion from !37719 (merged) should be addressed:
-
@dosuken123 started a discussion: (+1 comment) @ayufan I think one missing documentation is how to remove a feature flag. With this YAML change, we need additionally to remove the YAML entry as well, but when/how it should be done looks not clear.
Maybe we should create one section "Delete an existing feature flag" and describe the cleanup process. We should probably move https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up to the new section as well (or cross-link).
Something like:
When you decided to remove a feature flag as it's deemed stable, there are three entities need to be removed: 1. `Feature.enabled?(:your_flag, ...` usage in application code 1. Remove the corresponding YAML entry. 1. Delete additional flag values via chatops https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up 1. and 2. must be done in the same merge request. 3. can be done only after 1. and 2. have been deployed to production.
Or are you thinking to persist YAML entry permanently and add
deleted
flag for looking up the history?
Edited by Kamil Trzciński