Discovering Feature Flag Interdependencies in Microsoft Office (ESEC/FSE 2022)
Channel: Michael Schröder
Date: 15/10/2022

https://mcschroeder.github.io/#fse2022

Feature flags are a popular method to control functionality in released code. They enable rapid development and deployment, but can also quickly accumulate technical debt. Complex interactions between feature flags can go unnoticed, especially if interdependent flags are located far apart in the code, and these unknown dependencies could become a source of serious bugs. Testing all possible combinations of feature flags is infeasible in large systems like Microsoft Office, which has about 12000 active flags. The goal of our research is to aid product teams in improving system reliability by providing an approach to automatically discover feature flag interdependencies. We use probabilistic reasoning to infer causal relationships from feature flag query logs. Our approach is language-agnostic, scales easily to large heterogeneous codebases, and is robust against noise such as code drift or imperfect log data. We evaluated our approach on real-world query logs from Microsoft Office and are able to achieve over 90% precision while recalling non-trivial indirect feature flag relationships across different source files. We also investigated re-occurring patterns of relationships and describe applications for targeted testing, determining deployment velocity, error mitigation, and diagnostics.

Michael Schröder, TU Wien, Vienna, Austria
Katja Kevic, Microsoft, Cambridge, UK
Dan Gopstein, Microsoft, New York, USA
Brendan Murphy, Microsoft, Cambridge, UK
Jennifer Beckmann, Microsoft, Redmond, USA