Ask HN: How do you deal with feature flag cleanup?
I work for a startup and as we grow we are increasingly depending on feature flags for releases.
One of the side-effects that come with more feature flag(FF) use is the FF cleanup burden. I was curious if anyone has developed any tooling that makes this cleanup easier and automated?
I know there's the obvious candidate of creating a clean up ticket as part story(or whatever equivalent) conclusion, but i'd like to see if cleanup is solvable via automation as opposed to process.
An idea I have is for every merge to main, check to see if any feature flags have been added. For every feature flag added, create a "cleanup PR" per added flag that removes the feature flag and check, removes the old functionality, and persists the new functionality.
I recognize that this solution design could be pretty specific to how my team uses feature-flags.
Any feedback on a tool that works like I described or are do you think there's an alternative approach I should consider? Not at a planning level, but monitoring. Each feature flag in our environment comes with a "delete-by" date. If it's still in the code by then, the relevant team's slack gets an annoying message every day. To be clear, sometimes the right action is to extend the date. But it's a loud reminder to do some action. That approach makes sense. I guess when it comes to feature flag removal, actually removing the flag isn't that painful and is relatively easy. What's hard is actually remembering to cleanup the code. Curious, when does your team decide to extend the date? The feature is not finished and causes some issues for example.