blob: 451b602b613a70db6781c2fb3e6e130930c17947 [file] [log] [blame] [view]
Jason D. Clintonc38b61d82021-04-20 20:02:141# Mandatory Code-Review and Native OWNERS
Yulan Lin55ae6a32020-07-31 17:58:292
Andrew Williamse223ab92021-07-16 23:40:273Beginning on March 24, 2021, committers@ of Chromium are no longer able to
Jason D. Clintonc38b61d82021-04-20 20:02:144circumvent code review and OWNERS approval on CLs. The full
5[Code Review](code_reviews.md) documentation has been updated to reflect this.
Yulan Lin55ae6a32020-07-31 17:58:296
Jason D. Clintonc38b61d82021-04-20 20:02:147Previously, these were circumventable by self-code-review and because the
8enforcement was done by presubmit, although rarely done by external
9contributors. Now, Gerrit will disallow both bypasses. Within Google, where
10these bypasses were more common, Googlers can find Google-specific information
11in the internal announcements and landing site.
Yulan Lin55ae6a32020-07-31 17:58:2912
13Periodic updates and FAQs will be sent to chromium-dev@chromium.org
Joe Masoncffd2d72021-03-08 22:22:3914and updated on this page.
15
16## FAQS
17
Jason D. Clintonc38b61d82021-04-20 20:02:1418### Do I need a reviewer to merge CL's to another branch, even though they were already reviewed on main?
Joe Masoncffd2d72021-03-08 22:22:3919
Jason D. Clintonc38b61d82021-04-20 20:02:1420Yes, but within 14 days of the original change you can add Rubber Stamper bot (rubber-stamper@appspot.gserviceaccount.com) as the reviewer.
21
22### I have a question, whom should I contact?
23
24Send questions about this document to chromium-dev@chromium.org. Googlers can
25use an internal-specific email alias that was announced, separately.
26
27### How will major refactorings be handled? I regularly need to submit 100s of CLs across the trees; getting OWNERS approval from everyone will be too hard.
28
29We have created a process for landing such changes:
30[Chrome Large Scale Changes](/docs/process/lsc/large_scale_changes.md).
31
32This process allows approved, large refactorings to bypass OWNERS for the
33duration, using a special label `Owners-Override`. However, these changes will
34still need a second human (anyone with committers `Code-Review +1` powers) to
35vote.
36
Kentaro Hara0cdc6072021-10-15 00:35:1637### What should I do when I need to get Owners-Override for one-off CLs?
38
39One-off CLs do not need to go through Large Scale Changes. If the CLs make
40only mechanical changes associated with changes in //base/ APIs, //build/ APIs,
41//content/ APIs, //url/ APIs or //third_party/blink/public/APIs, the API owners can set `Owners-Override`.
42
John Abd-El-Malek704bca02022-12-14 18:47:5943For other one-off CLs, [Chrome ATLs](../ATL_OWNERS) can set `Owners-Override`.
Kentaro Hara0cdc6072021-10-15 00:35:1644
Jason D. Clintonc38b61d82021-04-20 20:02:1445### How does Rubber Stamper bot work?
46
47Rubber Stamper applies the Bot-Commit label to conforming CLs, allowing them to
48bypass code review. It supports various benign files, clean cherry-picks, and
49clean reverts that should be exempt from code review.
50
51Rubber Stamper never provides OWNERS approval, by design. It's intended to be
52used by those who have owners in the directory modified or who are sheriffs. If
53it provided both code review and OWNERS approval, that would be an abuse vector:
54that would allow anyone who can create a revert or cherry-pick to land it
55without any other person being involved (e.g. the silent revert of security
56patches).
57
Kentaro Hara0cdc6072021-10-15 00:35:1658When you need to get Owners-Override for sheriffing CLs, reach out to Active
59Sheriffs or Release Program Managers. If they are not available, send an email
60to [email protected].
61
Jason D. Clintonc38b61d82021-04-20 20:02:1462### Will trivial files require code-review?
63
Andrew Williamse223ab92021-07-16 23:40:2764Rubber Stamper auto-reviewer (described above) reviews CLs that meet strict
Jason D. Clintonc38b61d82021-04-20 20:02:1465criteria. (The list of file types is Google-internal.) For example: directories
66with no code.
67
68Essentially, if we can programmatically prove that the CL is benign, then we
69should allow a bot to rubber-stamp it so that Gerrit allows submission. One can
70imagine that the classes of CLs that fit in this category would grow over time.
71
72### Will clean cherry-picks on release branches need review?
73
74Yes, Rubber Stamper adds CR+1 (Browser) to clean cherry picks. Adding the bot as
75a reviewer to your CL will cause it to scan and approve it.
76[email protected] is the bot but just typing "Rubber
77St..." will autocomplete the full address for you. However, it doesn't provide
78OWNERS approval so, if you are cherry-picking a CL that you don't have OWNERS
79on, you can get that approval from the Release Program Manager who approved the
80cherry-pick.
81
82### Does documentation require code review?
83
84Documentation will require code review.
85
86There has been much discussion on this topic but senior leaders came to a
87majority conclusion that the quality increase in documentation from requiring
88code review outweighed any productivity headwinds.
89
90We will revisit this in the future to evaluate how it is working (or not, as the
91case may be).
92
93### How do we ensure top-level and parent directory OWNERS aren't overloaded?
94
95We updated the developer documentation stating that CL authors should
96prioritize OWNERS closer to the leaf nodes and not to use top-level owners
97because those folks are likely overloaded and the likelihood of a high response
98latency or the CL getting lost is high. OWNERS recommendations from Gerrit are
99in-line with this.
100
101### Does Gerrit block direct push?
102
103Yes. For break-glass scenarios, there are several folks who have the ability to
104direct push, including others' CLs.
105
106### OWNERS enforcement and no-TBR are different things. Why did they roll out simultaneously?
107
108While they are separate, both impact the integrity of Chrome source code and
109artifacts and have tangible impacts on developer workflows. For example: TBR was
110used to bypass OWNERS and the rollout of this policy prevented this bypass. In
111consultation with senior leaders, we decided that rolling both out
112simultaneously allowed for more streamlined communication and change management
113for the contributor community.