Skip to content

Code Review: Improve Feature Flag Management

Problem to Solve

  • Currently, we do not have a unified approach for feature flag management across Gitlab teams.
  • Please see the full epic here for more details and data 👉🏾 here

Propose Solution

  • Collaborate with 20 teams across GitLab, which account for 74% of the company's feature flags, to implement a three-step solution for each team. Your team has been selected to participate in the effort.
  • Develop a standardized feature flag management process that encompasses three key steps: DRI assignment, feature flag auditing and cleanup, and process improvements.

Please see details on each of the three steps below 👇🏾

- Done / 🚧 - In Progress / - Not Started

Step Action Status

1 - DRI Assignment

Assign a Directly Responsible Individual (DRI)

  • Collaborate with the teams to identify a DRI to lead feature flag audit, cleanup, and process improvement efforts.

- Done

DRI: @francoisrose [Backend]

DRI: @andr3 [Frontend]

2 - Audit + Cleanup

Conduct a thorough audit and cleanup

  • Review feature flags associated with the team.
  • Decommission feature flags that are no longer being utilized or provide justification for their retention, including a timeline for future (decommissioning) actions.

Review flags

Decommission

3- Process Improvements

Define and implement process improvements

  • Establish a consistent feature flag management process.
  • Update handbooks to transparently share the feature flag creation and sunsetting process.

Feature Flag Analysis - Current State Of Code Review

Summary:

  • The Code Review team owns 22 feature flags. This accounts for ~3% of all GitLab feature flags
  • 77% of Code Review feature flags are disabled by default.
  • There are 13 feature flags associated with milestones 16.9 or earlier
  • There are 9 feature flags associated with milestones 16.9+ or later
Screenshot

Feature Flag Analysis - Code Review - Google Sheets 2024-11-05 at 3.23.37 PM.jpg

How to find the latest status

Done - since the start of FY25-Q4

MRs: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/?sort=merged_at_desc&state=merged&label_name%5B%5D=feature%20flag&label_name%5B%5D=group%3A%3Acode%20review

display: table
collapsed: true
fields: state, milestone, mergedAt, title
query:
  group = "gitlab-org" and label = "group::code review" and label = "feature flag" and label != "triage report"
  and type = MergeRequest and state = merged and merged > 2024-11-01

Issues:

display: table
collapsed: true
fields: state, milestone, closedAt, title
query: group = "gitlab-org" and label = "group::code review" and label = "feature flag" and label != "triage report" and state = closed and closed > 2024-11-01

TODO / In progress

MRs: https://gitlab.com/gitlab-org/gitlab/-/merge_requests?scope=all&state=opened&label_name[]=feature%20flag&label_name[]=group%3A%3Acode%20review

display: table
fields: state, milestone, mergedAt, title
query:
  group = "gitlab-org" and label = "group::code review" and label = "feature flag" and label != "triage report"
  and type = MergeRequest and state = opened

Issues:

display: table
fields: milestone, title, labels("workflow::*"), assignee
sort: milestone asc
query: group = "gitlab-org" and label = "group::code review" and label = "feature flag" and state = opened
Edited by François Rosé