DEV Community

Discussion on: Why you should not use (long-lived) feature branches

Collapse
 
lirantal profile image
Liran Tal

Feature flags (or toggles) are essential for continuous deployment and quick delivery because they allow you to manage things like canary releases and the ability to "test in production" ( ๐Ÿคฏ). Obviously you should actual test and choose a well designed feature flags solution but at the end of the day and for the sake of simplicity you can think of them like a code branch:

if (ff.shiny_new_thing === 'on') {
  doThisNewThing();
} else {
  doThisOldThing();
}

You could also argue how those would be tested and while that's not always easy it's definitely doable. Another way to think of feature flags is that they are merely configuration items.