Release flags are the last thing you should do
WARNING
See Knightmare A DevOps Cautionary Tale on the risk of having dead code in a complex codebase
- If not kept in check:
- The codebase becomes more complex as
- there’s many branches
- you may not have context on why certain flags exists, or how it interacts with other flags
- Wasting time on dead code
- Refactors have to account for dead code1
- Testing becomes harder and longer due to more feature flags
- You have to run more tests, and you may not cover everything. See How to test feature flags? for more info.
- A reason to build code that never gets released
- This sums to poor planning though
- A reason to not remove code
- The codebase becomes more complex as
- It’s also a smell since it means that feature development are long running or aren’t completed, that’s why (release) flags are not removed
- Long running features ofc means that you aren’t making small frequent releases, nor are you getting good feedback from your users
- Prioritize small releases or Keystone Interfaces over release flags
Footnotes
-
facing this at time of writing with
piglet
↩