blob: 7f44b389bd2f17c061b1901c8c4e7e96dc94b0cb [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
43For other one-off CLs, [Chrome Eng Review members](https://chromium.googlesource.com/chromium/src/+/HEAD/ENG_REVIEW_OWNERS)
44can set `Owners-Override`.
45
Jason D. Clintonc38b61d82021-04-20 20:02:1446### How does Rubber Stamper bot work?
47
48Rubber Stamper applies the Bot-Commit label to conforming CLs, allowing them to
49bypass code review. It supports various benign files, clean cherry-picks, and
50clean reverts that should be exempt from code review.
51
52Rubber Stamper never provides OWNERS approval, by design. It's intended to be
53used by those who have owners in the directory modified or who are sheriffs. If
54it provided both code review and OWNERS approval, that would be an abuse vector:
55that would allow anyone who can create a revert or cherry-pick to land it
56without any other person being involved (e.g. the silent revert of security
57patches).
58
Kentaro Hara0cdc6072021-10-15 00:35:1659When you need to get Owners-Override for sheriffing CLs, reach out to Active
60Sheriffs or Release Program Managers. If they are not available, send an email
61to [email protected].
62
Jason D. Clintonc38b61d82021-04-20 20:02:1463### Will trivial files require code-review?
64
Andrew Williamse223ab92021-07-16 23:40:2765Rubber Stamper auto-reviewer (described above) reviews CLs that meet strict
Jason D. Clintonc38b61d82021-04-20 20:02:1466criteria. (The list of file types is Google-internal.) For example: directories
67with no code.
68
69Essentially, if we can programmatically prove that the CL is benign, then we
70should allow a bot to rubber-stamp it so that Gerrit allows submission. One can
71imagine that the classes of CLs that fit in this category would grow over time.
72
73### Will clean cherry-picks on release branches need review?
74
75Yes, Rubber Stamper adds CR+1 (Browser) to clean cherry picks. Adding the bot as
76a reviewer to your CL will cause it to scan and approve it.
77[email protected] is the bot but just typing "Rubber
78St..." will autocomplete the full address for you. However, it doesn't provide
79OWNERS approval so, if you are cherry-picking a CL that you don't have OWNERS
80on, you can get that approval from the Release Program Manager who approved the
81cherry-pick.
82
83### Does documentation require code review?
84
85Documentation will require code review.
86
87There has been much discussion on this topic but senior leaders came to a
88majority conclusion that the quality increase in documentation from requiring
89code review outweighed any productivity headwinds.
90
91We will revisit this in the future to evaluate how it is working (or not, as the
92case may be).
93
94### How do we ensure top-level and parent directory OWNERS aren't overloaded?
95
96We updated the developer documentation stating that CL authors should
97prioritize OWNERS closer to the leaf nodes and not to use top-level owners
98because those folks are likely overloaded and the likelihood of a high response
99latency or the CL getting lost is high. OWNERS recommendations from Gerrit are
100in-line with this.
101
102### Does Gerrit block direct push?
103
104Yes. For break-glass scenarios, there are several folks who have the ability to
105direct push, including others' CLs.
106
107### OWNERS enforcement and no-TBR are different things. Why did they roll out simultaneously?
108
109While they are separate, both impact the integrity of Chrome source code and
110artifacts and have tangible impacts on developer workflows. For example: TBR was
111used to bypass OWNERS and the rollout of this policy prevented this bypass. In
112consultation with senior leaders, we decided that rolling both out
113simultaneously allowed for more streamlined communication and change management
114for the contributor community.