4 ms·
I see people mentioning feature flags, is there a framework or pattern for feature flags? Imagining python where people use argparse as a library I imagine thi
by aprdm 8y ago
I see people mentioning feature flags, is there a framework or pattern for feature flags?
Imagining python where people use argparse as a library I imagine this can be a huge list of CLI arguments, or values to be parsed from a config file, or from the environment, that have to trickle down to a lot of parts of the system full of
if not feature_flag:
return
I am imagining some big django app, or even something like elasticsearch which is a big java app.
- pageald 8y agoEnvironment variables are the best way to handle feature flags. The 12 factor app provides some guidance for doing it the right way. [0] Feature flags do introduce complexity, but that can be partially mitigated by having good defaults and deleting flags once they're no longer needed. Even without that, as long as there are good defaults, you won't run into any problems until you have hundreds of flags. I once worked on a system with tens of thousands of configuration flags that could all be overridden in an inheritance-esque chaining scheme, like Server A inherits regional config Foo which inherits from business unit config Bar, which inherits from three other 5000 line properties files. And naturally, almost none of these properties had defaults, so starting from scratch with a new configuration was impossible, leading to snowballing technical debt from copy pasting old configs. shudders [0] https://12factor.net/config https://12factor.net/config