[RFC] Proposing changes to the community code ownership policy

As our community continues to grow, I think it’s useful for us to periodically reevaluate community processes to ensure they meet our changing needs. To that end, I’d like to propose changes to our community’s notion of “code ownership” to realign it better with community needs and expectations.

We originally added code owners when we recognized that one or two people cannot be responsible for the entirety of such large projects. Code owners were introduced to help ensure that experts within a component area provide oversight for proposed changes in that area. We documented this as “The sole responsibility of a code owner is to ensure that a commit to their area of the code is appropriately reviewed, either by themself or by someone else.” However, this doesn’t capture what the community needs code owners to do today. We expect code owners to perform reviews, but we also need them to be responsible for helping to triage and ensure serious issues in their area are addressed, engage in RFCs in their area, help answer questions on Discord/Discourse, hold office hours to help onboard new contributors or unblock work, etc. And because we tend to bias code ownership to a small number of people per area (0-2 people, with 1 on average), it is challenging for our existing code owners to meet the community’s needs.

I would like to propose a bold, new approach. I would like to replace the notion of “code owner” with that of “maintainer”, document a broader list of realistic expectations for the role, allow more people to take on those roles, make it trivially easy for people to volunteer, and make it painless to remove people who can no longer fulfil the responsibilities. Concretely, I am proposing we replace the existing Code Owners documentation with something along these lines:

Maintainers

The LLVM Project aims to evolve features quickly while continually being in a release-ready state. In order to accomplish this, the project needs volunteers willing to do the less-glamorous work to ensure we produce robust, high-quality products.

Maintainers are those volunteers; they are regular contributors who volunteer to take on additional community responsibilities beyond code contributions. Community members can find active and inactive maintainers for a project in the Maintainers.rst file at the root directory of the individual project.

Maintainers are volunteering to take on the following shared responsibilities within an area of a project:

  • ensure that commits receive high-quality review, either by the maintainer or by someone else,
  • help to confirm and comment on issues,
  • mediate code review disagreements through collaboration with other maintainers (and other reviewers) to come to a consensus on how best to proceed with disputed changes,
  • actively engage with relevant RFCs,
  • aid release managers with backporting and other release-related activities,
  • be a point of contact for contributors who need help (answering questions on Discord/Discourse/IRC or holding office hours), and
  • coordinate with and provide oversight for other maintainers in the same area of the code.

Each top-level project in the monorepo will specify one or more
lead maintainers who are responsible for ensuring community needs are
met for that project. This role is like any other maintainer role,
except the responsibilities span the project rather than a limited area
within the project. If you cannot reach a maintainer or don’t know which
maintainer to reach out to, a lead maintainer is always a good choice
to reach out to.

All contributors to the LLVM Project are eligible to be a maintainer. However, we are looking for people who can commit to:

  • engaging in their responsibilities the majority of the days in a month,
  • ensuring that they, and the community members they interact with, abide by the LLVM Community Code of Conduct, and
  • performing these duties for at least three months.

We recognize that priorities shift, job changes happen, burnout is real, extended vacations are a blessing, and people’s lives are generally complex. Therefore, we want as little friction as possible for someone to become a maintainer or to step down as a maintainer.

To become a new maintainer, you can volunteer yourself by posting a PR which adds yourself to the area(s) you are volunteering for. Alternatively, an existing maintainer can nominate you by posting a PR, but the nominee must explicitly accept the PR so that it’s clear they agree to volunteer within the proposed area(s). The PR will be accepted so long as at least one maintainer in the same project vouches for their ability to perform the responsibilities and there are no explicit objections raised by the community.

To step down as a maintainer, you can move your name to the “inactive maintainers” section of the Maintainers.rst file for the project, or remove your name entirely; no PR review is necessary. Additionally, any maintainer who has not been actively performing their responsibilities over an extended period of time can be moved to the “inactive maintainers” section by another active maintainer within that project with agreement from one other active maintainer within that project. However, please discuss the situation with the inactive maintainer before such removal to avoid accidental miscommunications. Stepping down or being removed as a maintainer is normal and does not prevent someone from resuming their activities as a maintainer in the future.

To resume activities as a maintainer, you can post a PR moving your name from the “inactive maintainers” section of the Maintainers.rst file to the active maintainers list. Because the volunteer was already previously accepted, they will be re-accepted so long as at least one maintainer in the same project approves the PR and there are no explicit objections raised by the community.


While this sounds like I’m asking a lot more of our existing code owners, my hope is that it’s not an unreasonable request. Many of our active code owners are already performing this work within their areas, so it is a manageable amount of work to some degree. But the real hope is that we get significantly more volunteers to help spread the work around. At least within the Clang community, I know of several people who are doing the work outlined above, but are not getting the recognition they deserve because code ownership is a poor fit (they either don’t feel qualified to “own” something, or their interests are in an area that already has an active owner, etc). If this RFC is accepted, an immediate next step is to put out a call for community members to volunteer to be maintainers.

Allowing multiple people to take code ownership roles in the same area has historically come with concerns about how to handle disagreement between code owners. In Clang, we have experience with multiple code owners for the same areas and we have not run into any such issues in practice. The lldb community has also had a positive experience with overlapping code ownership. In the event of disagreement between maintainers, they’re still expected to work together to come to a consensus position and can always lean on the lead maintainer or other maintainers for the project to help as needed.

Ultimately, I think documenting realistic expectations for what it means to be a maintainer and making it as easy as possible for someone to volunteer for those responsibilities will help improve product quality, improve change velocity, reduce contributor burnout, and give us a better pipeline to develop the “next generation” of community leaders.

17 Likes

CCing for broader awareness within highly active top-level projects:

@nikic for LLVM
@ldionne for libc++
@sscalpone for flang
@mehdi_amini for MLIR
@JDevlieghere for lldb
@MaskRay for lld
@vitalybuka for compiler-rt

(Eventually, I would like your help with determining consensus on the RFC, as I believe you’re trusted representatives for your parts of the overall monorepo.)

1 Like

Hi Aaron!

I like this proposal! I only have a little nit that I think is worth discussing. The label of “former” maintainer seems a bit drastic when you point out that moving from active to inactive should be normal. I propose it’s better to call it “inactive maintainer” or something similar - that way it doesn’t seem as definitive as “former”.

Except that I think this is excellent and would help me as a release manager to better understand whom to ping and ask for reviews from.

Thanks for starting the conversation!

4 Likes

Fantastic idea and totally agreed on “former” maybe being pejorative, thank you! I’ll update the RFC now.

1 Like

I’m in full support of this, as someone who has the knowledge about certain parts of Clang, but not enough for a code owner.
Several nits:

  1. I think it would be useful to list release-related responsibilities, e.g. engaging with release managers to determine whether something should be backported or is a critical issue.
  2. When you describe how disagreements between maintainers are resolved, you mention term “lead maintainer”, which is not defined. Per my understanding, it corresponds to our existing notion of a code owner, which you aim to replace. I think this term deserves further clarification.

Thank you for coming forward with this!

2 Likes

+100

This is fantastic.

Two really big points that I like about this proposal are:

  1. This takes a big step toward addressing one of the longstanding challenges we’ve had in the community for providing an advancement path from first-time committer to having a recognized role in the community.
  2. It recognizes the wider roles and responsibilities that we need for the project to function. Contributing code isn’t enough. Reviewing code isn’t even enough. There’s a huge amount of work involved in triaging issues, user support, and helping foster growth within the community.

Clearly defining these roles and acknowledging the need and request from maintainers is a huge positive step for the community.

3 Likes

I think this makes sense and this is pretty close how we handle things in libc++ already. We basically have Louis as the code owner and Mark and myself as active maintainers. However, I’m not sure whether being a maintainer is meant to be descriptive or prescriptive. IOW should people be declared maintainers who simply do things a maintainer does, or should people be declared maintainers so they then take on the responsibility to do maintainer things?

1 Like

This seems quite reasonable to me.

Component/code areas are not precisely defined and new additions are infrequent based on the history of Clang’s CodeOwners.rst. Perhaps we could attract more maintainers and reduce load on individual maintainers by introducing more areas and/or documenting the process by which a new area is introduced for maintenance purposes. I suspect there is considerable room to shrink the “All parts of Clang not covered by someone else” area! How about adding some introductory text to Maintainers.rst to state that 1) new area definitions and corresponding maintainers are welcome, and 2) new areas can be introduced by submitting a PR that adds the new area to the file?

2 Likes

I’m also supportive of this proposal. This matches the de-facto responsibilities of the current LLDB code-owners (maintainers). As Aaron mentioned, having multiple folks responsible for certain areas of the debugger has worked well for us.

1 Like

On the MLIR side, I’ve been pretty happy with the self-serve mechanism of the github code owners file (llvm-project/.github/CODEOWNERS at main · llvm/llvm-project · GitHub) that automatically adds folks to code reviews. I realize that this may be seen as mixing the ‘ownership’ aspect with the technical detail of how folks can watch for file/directory changes (and the file header does clearly explain that!), but the outcome so far seems to be that the vast majority of folks who put their name in the file match who I would consider the de-facto code owner / maintainer anyway.

1 Like

+1 to the proposal. I certainly wouldn’t consider myself a code owner, but I basically do exactly what’s described for various of the LLVM binutils, in conjunction with @MaskRay.

Some clarification questions:

be a point of contact for contributors who need help (answering questions on Discord/Discourse/IRC or holding office hours)

I don’t use Discord/IRC, nor do I hold office hours (and wouldn’t plan on doing so). I am active on DIscourse. Does the inactivity on Discord/IRC disqualify me or is this intended to be an “any combination of the above” kind of list?

Should maintainers for an area be required to be in the CODEOWNERS file, to ensure that they are automatically added as reviewers? (Note that I don’t think the inverse should be true, i.e. if you aren’t a maintainer, you can still be in the CODEOWNERS file).

2 Likes

From the standpoint of PR authors, it would be very useful if CODEOWNERS file was containing only maintainers. It’d give PR authors a list of relevant people they can contact, and match their expectation about reviewers added as a code owners. Sure, currently active contributors know their way around the community, and are likely to be fine either way, but I don’t think the same holds for newer contributors.

1 Like

I think it would be useful to list release-related responsibilities, e.g. engaging with release managers to determine whether something should be backported or is a critical issue.

I’m not opposed to it, but I figured “ensure that commits receive high-quality review, either by the maintainer or by someone” and “be a point of contact for contributors who need help (answering questions on Discord/Discourse/IRC or holding office hours)” covered that. It’s certainly part of the expectations though, so maybe listing it more clearly is a good idea. How about another bullet point of: * aid release managers with backporting and other release-related activities, ?

Excellent point! I’d propose adding this:

Each top-level project in the monorepo will specify a lead maintainer who acts as a backstop for ensuring community needs are met. If you cannot reach a maintainer or don't know which maintainer to reach out to, the lead maintainer is always a good choice to reach out to.

The basic idea is: this person is who we traditionally list as covering “everything not covered by someone else” in our code owners file.

WDYT?

I think it’s a bit of both. Folks who are doing the work can be nominated as maintainer and folks who are doing the work can also volunteer to be a maintainer. The important thing is from the other side of the picture: whenever someone asks “who do I talk to about X”, the maintainers.rst file lists all the folks who have volunteered to be a point-of-contact for an area of the project. From that angle, I think it’s descriptive more than prescriptive.

Some people may wish to do the work but can’t be a listed point of contact (for example, due to employment conditions, time constraints, etc) and they’re obviously still very appreciated!

1 Like

I figured the contents and structure of the Maintainers.rst file should be left to the individual subproject, because they know their needs best. e.g., Clang and LLVM have significant surface area and categorization is really important, but lld doesn’t seem to have nearly as much surface area and so maybe they would prefer a flat list of folks to talk to.

FWIW, in Clang, I plan to encourage adding new area definitions. For example, the folks working on bounds safety should be able to put up a PR nonimating someone to handle bounds safety related questions even though there’s not a structural part of the project layout specific to bounds safety.

2 Likes

Great question! I intended it as “any combination of the above” and not “be available everywhere 24/7”.

I would love to get to this point, but I think it depends on the subproject, what the person maintains, and what GitHub can support. e.g., if there’s a way to automatically add someone as a reviewer because they’re maintaining a whole file or directory, then awesome – that really helps new contributors because they’re not allowed to add their own reviewers to a PR and so those PRs are easy to lose track of. But GitHub is relatively underpowered as a code review tool and so we’re limited by what they support in terms of adding folks as reviewers; e.g., if someone is responsible for a particular set of attributes, it may not be possible to automatically add them. So I figure this is an aspiration rather than a requirement.

Yes, that would do.

Sounds good to me.

1 Like

Thank you, I’ve updated the proposal accordingly.

I like the proposal, thanks for working on it!

Because this question has come up recently, I’ll explicitly check here: Can someone without commit access be a maintainer?

I think this process is equivalent to the “become a new maintainer” process.

I think this is something we should strongly encourage (including in the documentation), but not require. Automatic review assignment through CODEOWNERS is probably the friendliest to new contributors, but if maintainers use some other mechanism (such as our subscriber groups) to keep track of all reviews relevant to them, that should be fine too.

1 Like

Commit access is required for multiple activities that maintainer might perform: adding reviewers, merging PRs on behalf of the new contributors, closing and reopening issues, and editing issue descriptions and comments (very relevant for Bugzilla-migrated issues that often has broken formatting). So I think the answer is “yes”.

3 Likes