Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 1 | # Chromium Flag Expiry |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 2 | |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 3 | ellyjones@ / avi@ |
| 4 | |
| 5 | This document outlines the process by which flags in Chromium expire and are |
| 6 | removed from the codebase. This document only describes entries in |
| 7 | `chrome://flags`, *not* command-line switches (commonly also called command-line |
| 8 | flags). This process does not cover command-line switches and there continue to |
| 9 | be no guarantees about those. |
| 10 | |
| 11 | See also [Chromium Flag Ownership](flag_ownership.md). |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 12 | |
| 13 | [TOC] |
| 14 | |
| 15 | ## Do Not Depend On Flags |
| 16 | |
Elly Fong-Jones | 94fc863 | 2019-08-14 18:23:03 | [diff] [blame] | 17 | If you are a user or administrator of Chrome and are using (or think you need to |
| 18 | use) a flag to configure Chromium for your use case, please [file a bug] or |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 19 | email [flags-dev@], because that flag will likely be removed at some point. If |
| 20 | you are a Chromium developer, please carry on using flags as normal :) |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 21 | |
| 22 | Flags have never been a supported configuration surface in Chromium, and we have |
| 23 | never guaranteed that any specific flag will behave consistently or even |
| 24 | continue to exist. This document describes a process for removing flags that |
| 25 | have been around for long enough that users *might* have come to rely on their |
| 26 | ongoing existence in a way that hopefully minimizes pain, but Chromium |
| 27 | developers are free to change the behavior of or remove flags at any time. In |
| 28 | particular, just because a flag will expire through this process does not mean a |
| 29 | developer will not remove it earlier than this process specifies. |
| 30 | |
| 31 | ## The Process |
| 32 | |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 33 | The logic in |
| 34 | [`//tools/flags/generate_unexpire_flags.py`](../tools/flags/generate_unexpire_flags.py) |
| 35 | implements most of this. At any given time, if the current value of `MAJOR` in |
| 36 | [`//chrome/VERSION`](../chrome/VERSION) is *`$MSTONE`*, the two previous |
| 37 | milestones (*`$MSTONE-1`* and *`$MSTONE-2`*) are considered recent. |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 38 | |
Elly Fong-Jones | 7ff0bab | 2020-04-20 20:57:51 | [diff] [blame] | 39 | Then: |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 40 | 1) Flags whose expiration is *`$MSTONE`* or higher are not expired |
| 41 | 2) Flags whose expiration is *`$MSTONE-3`* or lower are unconditionally expired |
| 42 | 3) Flags whose expiration is *`$MSTONE-1`* or *`$MSTONE-2`* are expired by |
| 43 | default, but can be temporarily unexpired via flags named |
| 44 | "`temporary-unexpire-flags-M`*`$MSTONE`*". |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 45 | |
| 46 | There are other elements of this process not described here, such as emails to |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 47 | [flags-dev@] tracking the status of the process. |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 48 | |
Devlin Cronin | e73aec2 | 2020-09-03 15:22:54 | [diff] [blame] | 49 | Google employees: See more at |
| 50 | [go/flags-expiry-process](http://goto.google.com/flags-expiry-process) and |
| 51 | [go/chrome-flags:expiry-process](http://goto.google.com/chrome-flags:expiry-process). |
| 52 | |
| 53 | ## Removing A Flag |
| 54 | If a flag is no longer used (for instance, it was used to control a feature |
| 55 | that has since launched), the flag should be removed. Delete the entry in |
Avi Drissman | dbaa3cd | 2021-05-13 16:07:33 | [diff] [blame] | 56 | [`//chrome/browser/about_flags.cc`](../chrome/browser/about_flags.cc) or |
| 57 | [`//ios/chrome/browser/flags/about_flags.mm`](../ios/chrome/browser/flags/about_flags.mm) |
| 58 | for iOS (and any corresponding entries for the flag description), and remove any |
| 59 | references in |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 60 | [`//chrome/browser/flag-metadata.json`](../chrome/browser/flag-metadata.json). |
Devlin Cronin | e73aec2 | 2020-09-03 15:22:54 | [diff] [blame] | 61 | |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 62 | ## Removed Flags |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 63 | |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 64 | [https://crbug.com/953690](https://crbug.com/953690) is the never-to-be-closed |
| 65 | bug to track flags that are removed. |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 66 | |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 67 | ## I Have Questions |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 68 | |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 69 | Please get in touch with |
| 70 | [`[email protected]`](https://groups.google.com/a/chromium.org/forum/#!forum/flags-dev). |
| 71 | If you feel like you need to have a Google-internal discussion for some reason, |
| 72 | there's also |
| 73 | [`chrome-flags@`](https://groups.google.com/a/google.com/forum/#!forum/chrome-flags). |
Elly Fong-Jones | 99d8cdad | 2019-08-27 15:48:45 | [diff] [blame] | 74 | |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 75 | ## Relevant Source Files |
| 76 | |
| 77 | * [`//chrome/browser/about_flags.cc`](../chrome/browser/about_flags.cc) |
| 78 | * [`//chrome/browser/flag-metadata.json`](../chrome/browser/flag-metadata.json) |
| 79 | * [`//chrome/browser/flag-never-expire-list.json`](../chrome/browser/flag-never-expire-list.json) |
| 80 | * [`//chrome/browser/expired_flags_list.h`](../chrome/browser/expired_flags_list.h) |
Avi Drissman | dbaa3cd | 2021-05-13 16:07:33 | [diff] [blame] | 81 | * [`//ios/chrome/browser/flags/about_flags.mm`](../ios/chrome/browser/flags/about_flags.mm) |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 82 | * [`//tools/flags/generate_expired_list.py`](../tools/flags/generate_expired_list.py) |
| 83 | * [`//tools/flags/generate_unexpire_flags.py`](../tools/flags/generate_unexpire_flags.py) |
Elly Fong-Jones | 99d8cdad | 2019-08-27 15:48:45 | [diff] [blame] | 84 | |
Elly Fong-Jones | d5c233a | 2019-07-29 19:48:27 | [diff] [blame] | 85 | [file a bug]: https://new.crbug.com |
Avi Drissman | f54d7ca | 2021-05-12 14:57:48 | [diff] [blame] | 86 | [flags-dev@]: https://groups.google.com/a/chromium.org/forum/#!forum/flags-dev |