feature flag
/ˈfiː.tʃə flæɡ/noun
A feature flag is a setting that enables or disables software functionality without another code deployment. It can apply to all users or a particular group.
We used a feature flag to enable the new search function for the test group first.
A feature flag, also called a feature toggle, is a switch in software. The code for a new feature can already be in the application while the feature remains hidden. The team uses the flag to decide when the feature becomes available and to whom.
How does a feature flag work?
The application checks the flag's value when running a feature. If it is on, the user sees the new behaviour. If it is off, the existing behaviour remains active. The value can be the same for everyone or depend on an account, user role, subscription or randomly selected test group.
This lets teams release a feature gradually. They might start with internal users, then offer it to a small group of customers before making it more widely available. If problems occur, the feature can be switched off without reversing the entire Glossary · In briefreleaseA release is an identifiable software version prepared to be made available to users. It brings together one or more checked changes.Read more. The bug in the new code still exists; the flag only limits who encounters it.
Temporary or permanent use
A temporary feature flag usually supports the rollout of one change. Once the feature is stable and enabled for everyone, developers can remove the flag and the old code path. Permanent flags suit features that differ by subscription, organization or user role.
Each additional flag creates more possible paths through the software. This makes testing and maintenance more complex, especially when flags interact. Teams therefore record who manages a flag, when it may change and when a temporary flag should be removed from the Glossary · In briefcodebaseA codebase is the collection of source code used to build and maintain a software product or component.Read more.