Skip to content

Commit c0719d8

Browse files
authored
[Policy] Replace "code owners" with "maintainers" (#107384)
This replaces the previous Code Owners section of our developer policy with a new section for Maintainers. It also updates most of the places we mention "code owner" in the documentation (it does not update the files named `Code Owners.rst` or similar because those should be updated when the subprojects add their `Maintainers.rst` file). The wording was taken from what was proposed in the RFC (including all suggested amendments from folks on the thread). Please see the RFC for more details: https://discourse.llvm.org/t/rfc-proposing-changes-to-the-community-code-ownership-policy/80714/
1 parent 18ef467 commit c0719d8

File tree

5 files changed

+97
-46
lines changed

5 files changed

+97
-46
lines changed

llvm/RELEASE_TESTERS.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This file is a list of the people responsible for ensuring that targets and
22
environments get tested and validated during the release process.
33

4-
They will also, in conjunction with the release manager and the code owners,
4+
They will also, in conjunction with the release manager and the maintainers,
55
accept patches into stable release branches, tag critical bugs and release
66
stoppers as well as make sure that no regressions were observed on their
77
targets since the last release.

llvm/docs/CodeReview.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ Experts Should Review Code
232232
--------------------------
233233

234234
If you are an expert in an area of the compiler affected by a proposed patch,
235-
then you are highly encouraged to review the code. If you are a relevant code
236-
owner, and no other experts are reviewing a patch, you must either help arrange
237-
for an expert to review the patch or review it yourself.
235+
then you are highly encouraged to review the code. If you are a relevant
236+
maintainer, and no other experts are reviewing a patch, you must either help
237+
arrange for an expert to review the patch or review it yourself.
238238

239239
Code Reviews, Speed, and Reciprocity
240240
------------------------------------

llvm/docs/Contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ For more information about the workflow of using GitHub Pull Requests see our
9595

9696
To make sure the right people see your patch, please select suitable reviewers
9797
and add them to your patch when requesting a review. Suitable reviewers are the
98-
code owner (see CODE_OWNERS.txt) and other people doing work in the area your
98+
maintainers (see ``Maintainers.rst``) and other people doing work in the area your
9999
patch touches. Github will normally suggest some reviewers based on rules or
100100
people that have worked on the code before. If you are a new contributor, you
101101
will not be able to select reviewers in such a way, in which case you can still

llvm/docs/DeveloperPolicy.rst

Lines changed: 86 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -166,38 +166,88 @@ awareness of. For such changes, the following should be done:
166166
Discourse, and add the label to one of the watch categories under
167167
``Notifications->Tags``.
168168

169-
.. _code owners:
169+
.. _maintainers:
170170

171-
Code Owners
171+
Maintainers
172172
-----------
173173

174-
The LLVM Project relies on two features of its process to maintain rapid
175-
development in addition to the high quality of its source base: the combination
176-
of code review plus post-commit review for trusted maintainers. Having both is
177-
a great way for the project to take advantage of the fact that most people do
178-
the right thing most of the time, and only commit patches without pre-commit
179-
review when they are confident they are right.
180-
181-
The trick to this is that the project has to guarantee that all patches that are
182-
committed are reviewed after they go in: you don't want everyone to assume
183-
someone else will review it, allowing the patch to go unreviewed. To solve this
184-
problem, we have a notion of an 'owner' for a piece of the code. The sole
185-
responsibility of a code owner is to ensure that a commit to their area of the
186-
code is appropriately reviewed, either by themself or by someone else. The list
187-
of current code owners can be found in the file `CODE_OWNERS.TXT
188-
<https://github.com/llvm/llvm-project/blob/main/llvm/CODE_OWNERS.TXT>`_ in the
189-
root of the LLVM source tree.
190-
191-
Note that code ownership is completely different than reviewers: anyone can
192-
review a piece of code, and we welcome code review from anyone who is
193-
interested. Code owners are the "last line of defense" to guarantee that all
194-
patches that are committed are actually reviewed.
195-
196-
Being a code owner is a somewhat unglamorous position, but it is incredibly
197-
important for the ongoing success of the project. Because people get busy,
198-
interests change, and unexpected things happen, code ownership is purely opt-in,
199-
and anyone can choose to resign their "title" at any time. For now, we do not
200-
have an official policy on how one gets elected to be a code owner.
174+
The LLVM Project aims to evolve features quickly while continually being in a
175+
release-ready state. In order to accomplish this, the project needs volunteers
176+
willing to do the less glamorous work to ensure we produce robust, high-quality
177+
products.
178+
179+
Maintainers are those volunteers; they are regular contributors who volunteer
180+
to take on additional community responsibilities beyond code contributions.
181+
Community members can find active and inactive maintainers for a project in the
182+
``Maintainers.rst`` file at the root directory of the individual project.
183+
184+
Maintainers are volunteering to take on the following shared responsibilities
185+
within an area of a project:
186+
187+
* ensure that commits receive high-quality review, either by the maintainer
188+
or by someone else,
189+
* help to confirm and comment on issues,
190+
* mediate code review disagreements through collaboration with other
191+
maintainers (and other reviewers) to come to a consensus on how best to
192+
proceed with disputed changes,
193+
* actively engage with relevant RFCs,
194+
* aid release managers with backporting and other release-related
195+
activities,
196+
* be a point of contact for contributors who need help (answering questions
197+
on Discord/Discourse/IRC or holding office hours).
198+
199+
Each top-level project in the monorepo will specify one or more
200+
lead maintainers who are responsible for ensuring community needs are
201+
met for that project. This role is like any other maintainer role,
202+
except the responsibilities span the project rather than a limited area
203+
within the project. If you cannot reach a maintainer or don't know which
204+
maintainer to reach out to, a lead maintainer is always a good choice
205+
to reach out to. If a project has no active lead maintainers, it may be a
206+
reasonable candidate for removal from the monorepo. A discussion should be
207+
started on Discourse to find a new, active lead maintainer or whether the
208+
project should be discontinued.
209+
210+
All contributors with commit access to the LLVM Project are eligible to be a
211+
maintainer. However, we are looking for people who can commit to:
212+
213+
* engaging in their responsibilities the majority of the days in a month,
214+
* ensuring that they, and the community members they interact with, abide by
215+
the LLVM Community Code of Conduct, and
216+
* performing these duties for at least three months.
217+
218+
We recognize that priorities shift, job changes happen, burnout is real,
219+
extended vacations are a blessing, and people's lives are generally complex.
220+
Therefore, we want as little friction as possible for someone to become a
221+
maintainer or to step down as a maintainer.
222+
223+
*To become a new maintainer*, you can volunteer yourself by posting a PR which
224+
adds yourself to the area(s) you are volunteering for. Alternatively, an
225+
existing maintainer can nominate you by posting a PR, but the nominee must
226+
explicitly accept the PR so that it's clear they agree to volunteer within the
227+
proposed area(s). The PR will be accepted so long as at least one maintainer in
228+
the same project vouches for their ability to perform the responsibilities and
229+
there are no explicit objections raised by the community.
230+
231+
*To step down as a maintainer*, you can move your name to the "inactive
232+
maintainers" section of the ``Maintainers.rst`` file for the project, or remove
233+
your name entirely; no PR review is necessary. Additionally, any maintainer who
234+
has not been actively performing their responsibilities over an extended period
235+
of time can be moved to the "inactive maintainers" section by another active
236+
maintainer within that project with agreement from one other active maintainer
237+
within that project. If there is only one active maintainer for a project,
238+
please post on Discourse to solicit wider community feedback about the removal
239+
and future direction for the project. However, please discuss the situation
240+
with the inactive maintainer before such removal to avoid accidental
241+
miscommunications. If the inactive maintainer is unreachable, no discussion
242+
with them is required. Stepping down or being removed as a maintainer is normal
243+
and does not prevent someone from resuming their activities as a maintainer in
244+
the future.
245+
246+
*To resume activities as a maintainer*, you can post a PR moving your name from
247+
the "inactive maintainers" section of the ``Maintainers.rst`` file to the
248+
active maintainers list. Because the volunteer was already previously accepted,
249+
they will be re-accepted so long as at least one maintainer in the same project
250+
approves the PR and there are no explicit objections raised by the community.
201251

202252
.. _include a testcase:
203253

@@ -849,9 +899,10 @@ The differences between both classes are:
849899

850900
The basic rules for a back-end to be upstreamed in **experimental** mode are:
851901

852-
* Every target must have a :ref:`code owner<code owners>`. The `CODE_OWNERS.TXT`
853-
file has to be updated as part of the first merge. The code owner makes sure
854-
that changes to the target get reviewed and steers the overall effort.
902+
* Every target must have at least one :ref:`maintainer<maintainers>`. The
903+
`Maintainers.rst` file has to be updated as part of the first merge. These
904+
maintainers make sure that changes to the target get reviewed and steers the
905+
overall effort.
855906

856907
* There must be an active community behind the target. This community
857908
will help maintain the target by providing buildbots, fixing
@@ -926,7 +977,7 @@ Those wishing to add a new target to LLVM must follow the procedure below:
926977
actual patches (but they can be prepared before, to support the RFC). Create
927978
a sequence of N patches, numbered '1/N' to 'N/N' (make sure N is an actual
928979
number, not the letter 'N'), that completes the basic structure of the target.
929-
4. The initial patch should add documentation, code owners and triple support in
980+
4. The initial patch should add documentation, maintainers, and triple support in
930981
clang and LLVM. The following patches add TableGen infrastructure to describe
931982
the target and lower instructions to assembly. The final patch must show that
932983
the target can lower correctly with extensive LIT tests (IR to MIR, MIR to
@@ -938,7 +989,7 @@ Those wishing to add a new target to LLVM must follow the procedure below:
938989
start working asynchronously on the target to complete support. They should
939990
still seek review from those who helped them in the initial phase, to make
940991
sure the progress is still consistent.
941-
7. Once all official requirements have been fulfilled (as above), the code owner
992+
7. Once all official requirements have been fulfilled (as above), the maintainers
942993
should request the target to be enabled by default by sending another RFC to
943994
the `LLVM Discourse forums`_.
944995

@@ -963,7 +1014,7 @@ components to a high bar similar to "official targets", they:
9631014
* Must conform to all of the policies laid out in this developer policy
9641015
document, including license, patent, coding standards, and code of conduct.
9651016
* Must have an active community that maintains the code, including established
966-
code owners.
1017+
maintainers.
9671018
* Should have reasonable documentation about how it works, including a high
9681019
quality README file.
9691020
* Should have CI to catch breakage within the project itself or due to

llvm/docs/HowToReleaseLLVM.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,17 +328,17 @@ Release Patch Rules
328328
Below are the rules regarding patching the release branch:
329329

330330
#. Patches applied to the release branch may only be applied by the release
331-
manager, the official release testers or the code owners with approval from
331+
manager, the official release testers or the maintainers with approval from
332332
the release manager.
333333

334-
#. Release managers are encouraged, but not required, to get approval from code
335-
owners before approving patches. If there is no code owner or the code owner
336-
is unreachable then release managers can ask approval from patch reviewers or
337-
other developers active in that area.
334+
#. Release managers are encouraged, but not required, to get approval from a
335+
maintainer before approving patches. If there are no reachable maintainers
336+
then release managers can ask approval from patch reviewers or other
337+
developers active in that area.
338338

339339
#. *Before RC1* Patches should be limited to bug fixes, important optimization
340340
improvements, or completion of features that were started before the branch
341-
was created. As with all phases, release managers and code owners can reject
341+
was created. As with all phases, release managers and maintainers can reject
342342
patches that are deemed too invasive.
343343

344344
#. *Before RC2* Patches should be limited to bug fixes or backend specific

0 commit comments

Comments
 (0)