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