| >Feature flags are a nice idea, but nobody outside of Facebook seems to be embracing them I worked at Etsy from early 2012 to late 2015 and I used feature flags every day I was there. >How do you prevent your codebase from becoming if-statement spaghetti? You remove the feature flag checking code when you turn off or turn on the feature. It's an extra deploy, but it needs to be part of the prod/eng process. This is the most salient issue of feature flagging in my experience and something you need to get ahead of from the get-go. >How do you prevent new features from being leaked to the user? You branch at the server/request level, not the client level, so there is no set of features that gets displayed, it's just what the server returns. >What do you use to control feature flags? You can use a service like LaunchDarkly or Optimizely or you can write your own service, or you can have a file in memory. Usually it starts simple with boolean toggles and evolves into a ramp up system that let's you selectively target users. The important part is that you need to be able to change features without redeploying code. |
I don't understand. I was asking about the development source code, not the code delivered to the user. The dev source code isn't stripped of if-statements, right? That's where the feature flag toggling lives. But then it seems like it's easy to devolve into spaghetti.
You branch at the server/request level, not the client level, so there is no set of features that gets displayed, it's just what the server returns.
Ok, but how? I'm not playing dumb. Assume an express server. You want to put a feature flag into your codebase. What is step #1 (and #2 and ... #N) to achieve this?
I looked up LaunchDarkly. $299/mo for basic team support. Uhh... That's almost the cost of WeWork office space.
Are feature flags really so nascent that there isn't a FOSS solution for it?