Flag statuses and lifecycle stages
Read time: 4 minutes
Last edited: Nov 21, 2024
Overview
This topic explains what the different flag statuses are, and how they relate to a flag's lifecycle. It also describes how to view this information in the LaunchDarkly user interface (UI).
The Flags list shows, for each environment, how many flag evaluations have taken place for each flag.
You can use a project-level filter to filter the list by flag lifecycle stage.
You can use an environment-level filter to filter the list by flag status in that environment.
Flag lifecycle stages
A flag may go through several stages over the course of its lifecycle. The lifecycle stage is based on what is happening across all environments. Not all flags will go through all lifecycle stages.
The following table explains the flag lifecycle stages:
Lifecycle stage | Definition |
---|---|
Live | A flag that was created in the last 30 days, or is permanent, or has a New or Active status. LaunchDarkly automatically indicates that flags are in this stage. |
Ready for code removal | A flag that is temporary, has a "Launched" status in all critical environments, is 30 days old or older, has code references, and is not a prerequisite for any other flags in any critical environments. LaunchDarkly automatically indicates that flags are in this stage. |
Ready to archive | A flag that is temporary, has an "Inactive" status in all critical environments, is 30 days old or older, has no code references, and is not a prerequisite for any other flags in any critical environments. LaunchDarkly automatically indicates that flags are in this stage. |
Deprecated | A flag that is still being served to customers, but is only being served in older or deprecated versions of your application, and has been manually deprecated. You must specifically deprecate a flag in order for it be in this stage. To learn more, read Deprecating flags. |
Archived | A flag that is no longer being served to customers, and is not a prerequisite of other flags, and has been manually archived. LaunchDarkly recommends flags that are ready to archive, however, you must specifically archive a flag in order for it to be in this stage. To learn more, read Archiving flags. |
Deleted | A flag that is completely removed from LaunchDarkly. You must specifically delete a flag, and you can only delete a flag after you have archived it. To learn more, read Deleting flags. |
In the Display menu on the Flags list, select Archive checks to display whether a flag is "Ready for code removal" or "Ready to archive." Then, click the indicator to remove the flag from your code, or to archive it. To learn more, read Edit list columns, Code references, and Archiving flags.
Flag status definitions
The flag status lets you know when a flag is new, active, launched, or inactive. It's important to understand flag statuses so you know which flags are safe to remove from your code.
Every feature flag has a status that reflects the state of a flag in each environment. The status is specific to an environment. Use the project-level filters on the Flags list to find flags in a specific status.
The following table explains the flag status definitions:
Status | Definition |
---|---|
New | You created the flag fewer than seven days ago and it has never been evaluated. |
Active | The flag is being evaluated, and either there are either multiple variations configured, you have made changes to its configuration in the past seven days, or the flag is toggled off. |
Launched | The flag has been evaluated in the past seven days, the flag is serving only one variation, you have made no changes to the flag's configuration in the past seven days, and the flag is toggled on. Launched, temporary flags that are 30 days old or older and are not prerequisites of other flags are considered ready for code removal. You can find these flags by filtering your Flags list by flag lifecycle. LaunchDarkly only checks critical environments when considering whether a flag is ready for code removal. |
Inactive | The flag has not been evaluated for at least seven days. Inactive, temporary flags that are 30 days old or older, are not prerequisites of other flags, and do not have any code references are considered ready to archive. You can find these flags by filtering your Flags list by flag lifecycle. LaunchDarkly only checks critical environments when considering whether a flag is ready to archive. To learn more, read Archiving flags. |
If you have access to engineering insights, be aware that engineering insights uses more granular definitions of flag status. You can view the flag status on the flag health page.
To learn more, read Flag health.