Skip to content

Commit c8e408b

Browse files
committed
Add project governance documentation
Explains how Maintainers are selected and their responsibilities. Explains the Pull Request review workflow. Adds config for Mergify to enforce this workflow. Signed-off-by: Dave Tucker <[email protected]>
1 parent 73a34e1 commit c8e408b

6 files changed

+355
-37
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!--
2+
Thank you for your contribution to Aya! 🎉
3+
4+
For Work In Progress Pull Requests, please use the Draft PR feature.
5+
6+
Before submitting a Pull Request, please ensure you've done the following:
7+
- 📖 Read the Forem Contributing Guide: https://github.com/aya-rs/aya/blob/main/CONTRIBUTING.md
8+
- 📖 Read the Forem Code of Conduct: https://github.com/aya-rs/aya/blob/main/CODE_OF_CONDUCT.md
9+
- 👷‍♀️ Create small PRs. In most cases this will be possible.
10+
- ✅ Provide tests for your changes.
11+
- 📝 Use descriptive commit messages.
12+
- 📗 Update any related documentation.
13+
14+
-->
15+
16+
# Description
17+
<!--- Describe your changes in detail -->
18+
19+
# Related Issues
20+
<!--
21+
For example:
22+
23+
- Closes: #1234
24+
- Relates To: #1234
25+
-->
26+
27+
# Added/updated tests?
28+
29+
_We strongly encourage you to add a test for your changes._
30+
31+
- [ ] Yes
32+
- [ ] No, and this is why: _please replace this line with details on why tests
33+
have not been included_
34+
- [ ] I need help with writing tests
35+
36+
# Checklist
37+
38+
- [ ] Rust code has been formatted with `cargo +nightly fmt`
39+
- [ ] All clippy lints have been fixed - you can find failing lints with `cargo +nightly clippy`
40+
- [ ] Unit tests are passing locally with `cargo test`
41+
- [ ] Integration tests are passing locally
42+
43+
# (Optional) What GIF best describes this PR or how it makes you feel?
44+
<!--- Go to https://giphy.com/ and find a gif that fits your PR. Copy-paste the gif here -->

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @aya-rs/aya-maintainers

CONTRIBUTING.md

+102-37
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,103 @@
1-
# Contributing to Aya
1+
# Contributing Guide
22

3-
Thanks for your help improving the project!
3+
* [New Contributor Guide](#contributing-guide)
4+
* [Ways to Contribute](#ways-to-contribute)
5+
* [Find an Issue](#find-an-issue)
6+
* [Ask for Help](#ask-for-help)
7+
* [Pull Request Lifecycle](#pull-request-lifecycle)
8+
* [Pull Request Checklist](#pull-request-checklist)
9+
* [Documentation Style](#documentation-style)
410

5-
## Reporting issues
11+
Welcome! We are glad that you want to contribute to our project! 💖
612

7-
If you believe you've discovered a bug in aya, please check if the bug is
8-
already known or [create an issue](https://github.com/aya-rs/aya/issues) on
9-
github. Please also report an issue if you find documentation that you think is
10-
confusing or could be improved.
13+
As you get started, you are in the best position to give us feedback on areas of
14+
our project that we need help with including:
1115

12-
When creating a new issue, make sure to include as many details as possible to
13-
help us understand the problem. When reporting a bug, always specify which
14-
version of aya you're using and which version of the linux kernel.
16+
* Problems found during setting up a new developer environment
17+
* Gaps in our Quickstart Guide or documentation
18+
* Bugs in our automation scripts
1519

16-
## Documentation
20+
If anything doesn't make sense, or doesn't work when you run it, please open a
21+
bug report and let us know!
1722

18-
If you find an API that is not documented, unclear or missing examples, please
19-
file an issue. If you make changes to the documentation, please read
20-
[How To Write Documentation] and make sure your changes conform to the
21-
format outlined in [Documenting Components].
23+
## Ways to Contribute
2224

23-
[How To Write Documentation]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html
24-
[Documenting Components]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#documenting-components
25+
We welcome many different types of contributions including:
2526

26-
If you want to make changes to the Aya Book, see the readme in the
27-
[book repository].
27+
* New features
28+
* Builds, CI/CD
29+
* Bug fixes
30+
* Documentation
31+
* Issue Triage
32+
* Answering questions on [Discord]
33+
* Web design
34+
* Communications / Social Media / Blog Posts
35+
* Release management
2836

29-
[book repository]: https://github.com/aya-rs/book
37+
Not everything happens through a GitHub pull request. Please come to our
38+
[Discord] and let's discuss how we can work together.
3039

31-
## Fixing bugs and implementing new features
40+
## Find an Issue
3241

33-
Make sure that your work is tracked by an issue or a (draft) pull request, this
34-
helps us avoid duplicating work. If your work includes publicly visible changes,
35-
make sure those are properly documented as explained in the section above.
42+
Issues labelled as ["good first issue"] are suitable for new
43+
contributors. They provide extra information to help you make your first
44+
contribution.
3645

37-
### Running tests
46+
Issues labelled as ["help wanted"] are usually more difficult. We
47+
recommend them for people who aren't core maintainers, but have either made some
48+
contributions already or feel comfortable with starting from more demanding
49+
tasks.
3850

39-
Run the unit tests with `cargo test`. See [Aya Integration Tests] regarding
40-
running the integration tests.
51+
Sometimes there won’t be any issues with these labels. That’s ok! There is
52+
likely still something for you to work on. If you want to contribute but you
53+
don’t know where to start or can't find a suitable issue, you can reach out to
54+
us on [Discord] and we will be happy to help.
4155

42-
[Aya Integration Tests]: https://github.com/aya-rs/aya/blob/main/test/README.md
56+
Once you see an issue that you'd like to work on, please post a comment saying
57+
that you want to work on it. Something like "I want to work on this" is fine.
58+
59+
## Ask for Help
60+
61+
The best way to reach us with a question when contributing is to ask on:
62+
63+
* The original GitHub issue
64+
* Our [Discord]
65+
66+
## Pull Request Lifecycle
67+
68+
Pull requests are managed by Mergify.
69+
70+
Our process is currently as follows:
71+
72+
1. When you open a PR a maintainer will automatically be assigned for review
73+
1. Make sure that your PR is passing CI - if you need help with failing checks please feel free to ask!
74+
1. Once it is passing all CI checks, a maintainer will review your PR and you may be asked to make changes.
75+
1. When you have received at two approving reviews from a maintainer, your PR will be merged automiatcally.
76+
77+
In some cases, other changes may conflict with your PR. If this happens, you will get notified by a comment in the issue that your PR requires a rebase, and the `needs-rebase` label will be applied. Once a rebase has been performed, this label will be automatically removed.
4378

44-
### Commits
79+
## Logical Grouping of Commits
4580

4681
It is a recommended best practice to keep your changes as logically grouped as
4782
possible within individual commits. If while you're developing you prefer doing
4883
a number of commits that are "checkpoints" and don't represent a single logical
4984
change, please squash those together before asking for a review.
85+
When addressing review comments, please perform an interactive rebase and edit commits directly rather than adding new commits with messages like "Fix review comments".
5086

51-
#### Commit message guidelines
87+
## Commit message guidelines
5288

5389
A good commit message should describe what changed and why.
5490

5591
1. The first line should:
56-
- Contain a short description of the change (preferably 50 characters or less,
92+
* Contain a short description of the change (preferably 50 characters or less,
5793
and no more than 72 characters)
58-
- Be entirely in lowercase with the exception of proper nouns, acronyms, and
94+
* Be entirely in lowercase with the exception of proper nouns, acronyms, and
5995
the words that refer to code, like function/variable names
60-
- Be prefixed with the name of the sub crate being changed
96+
* Be prefixed with the name of the sub crate being changed
6197

6298
Examples:
63-
- `aya: handle reordered functions`
64-
- `aya-bpf: SkSkbContext: add ::l3_csum_replace`
99+
* `aya: handle reordered functions`
100+
* `aya-bpf: SkSkbContext: add ::l3_csum_replace`
65101

66102
1. Keep the second line blank.
67103
1. Wrap all other lines at 72 columns (except for long URLs).
@@ -72,8 +108,8 @@ A good commit message should describe what changed and why.
72108

73109
Examples:
74110

75-
- `Fixes: #1337`
76-
- `Refs: #1234`
111+
* `Fixes: #1337`
112+
* `Refs: #1234`
77113

78114
Sample complete commit message:
79115

@@ -92,3 +128,32 @@ nicely even when it is indented.
92128
Fixes: #1337
93129
Refs: #453, #154
94130
```
131+
132+
## Pull Request Checklist
133+
134+
When you submit your pull request, or you push new commits to it, our automated
135+
systems will run some checks on your new code. We require that your pull request
136+
passes these checks, but we also have more criteria than just that before we can
137+
accept and merge it. Theses requirements are described in the
138+
[Pull Request Template].
139+
140+
It is recommended that you run the integration tests locally before submitting
141+
your Pull Request. Please see [Aya Integration Tests] for more information.
142+
143+
## Documentation Style
144+
145+
If you find an API that is not documented, unclear or missing examples, please
146+
file an issue. If you make changes to the documentation, please read
147+
[How To Write Documentation] and make sure your changes conform to the
148+
format outlined in [Documenting Components].
149+
150+
If you want to make changes to the Aya Book, see the README in the
151+
[book repository].
152+
153+
["good first issue"]: https://github.com/aya-rs/aya/labels/good%20first%20issue
154+
["help wanted"]: https://github.com/aya-rs/aya/labels/help%20wanted
155+
[Aya Integration Tests]: https://github.com/aya-rs/aya/blob/main/test/README.md
156+
[How To Write Documentation]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html
157+
[Documenting Components]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#documenting-components
158+
[book repository]: https://github.com/aya-rs/book
159+
[Discord]: https://discord.gg/xHW2cb2N6G

GOVERNANCE.md

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Aya Project Governance
2+
3+
The Aya project is dedicated to creating the best user experience when using
4+
eBPF from Rust, whether that's in user-land or kernel-land. This governance
5+
explains how the project is run.
6+
7+
- [Values](#values)
8+
- [Maintainers](#maintainers)
9+
- [Becoming a Maintainer](#becoming-a-maintainer)
10+
- [Meetings](#meetings)
11+
- [Code of Conduct Enforcement](#code-of-conduct)
12+
- [Security Response Team](#security-response-team)
13+
- [Voting](#voting)
14+
- [Modifications](#modifying-this-charter)
15+
16+
## Values
17+
18+
The Aya project and its leadership embrace the following values:
19+
20+
- Openness: Communication and decision-making happens in the open and is
21+
discoverable for future reference. As much as possible, all discussions and
22+
work take place in public forums and open repositories.
23+
24+
- Fairness: All stakeholders have the opportunity to provide feedback and submit
25+
contributions, which will be considered on their merits.
26+
27+
- Community over Product or Company: Sustaining and growing our community takes
28+
priority over shipping code or sponsors' organizational goals. Each
29+
contributor participates in the project as an individual.
30+
31+
- Inclusivity: We innovate through different perspectives and skill sets, which
32+
can only be accomplished in a welcoming and respectful environment.
33+
34+
- Participation: Responsibilities within the project are earned through
35+
participation, and there is a clear path up the contributor ladder into
36+
leadership positions.
37+
38+
## Maintainers
39+
40+
Aya Maintainers have write access to the all projects in the
41+
[GitHub organization]. They can merge their patches or patches from others.
42+
The list of current maintainers can be found at [MAINTAINERS.md].
43+
Maintainers collectively manage the project's resources and contributors.
44+
45+
This privilege is granted with some expectation of responsibility: maintainers
46+
are people who care about the Aya project and want to help it grow and
47+
improve. A maintainer is not just someone who can make changes, but someone who
48+
has demonstrated their ability to collaborate with the team, get the most
49+
knowledgeable people to review code and docs, contribute high-quality code, and
50+
follow through to fix issues (in code or tests).
51+
52+
A maintainer is a contributor to the project's success and a citizen helping
53+
the project succeed.
54+
55+
The collective team of all Maintainers is known as the Maintainer Council, which
56+
is the governing body for the project.
57+
58+
### Becoming a Maintainer
59+
60+
To become a Maintainer, you need to demonstrate a commitment to the project, an
61+
ability to write quality code and/or documentation, and an ability to
62+
collaborate with the team. The following list is an example of the
63+
the kind of contributions that would be expected to be promoted to Maintainer
64+
status however there is no strict requirement for all points to be met:
65+
66+
- Commitment to the project, as evidenced by:
67+
- Participate in discussions, contributions, code and documentation reviews,
68+
for 6 months or more.
69+
- Perform reviews for 10 non-trivial pull requests.
70+
- Contribute 10 non-trivial pull requests and have them merged.
71+
- Ability to write quality code and/or documentation.
72+
- Ability to collaborate with the team.
73+
- Understanding of how the team works (policies, processes for testing
74+
and code review, etc).
75+
- Understanding of the project's code base and coding and documentation style.
76+
77+
A new Maintainer must be proposed by an existing maintainer by opening a
78+
Pull Request on GitHub to update the MAINTAINERS.md file. A simple majority vote
79+
of existing Maintainers approves the application. Maintainer nominations will be
80+
evaluated without prejudice to employers or demographics.
81+
82+
Maintainers who are selected will be granted the necessary GitHub rights.
83+
84+
### Removing a Maintainer
85+
86+
Maintainers may resign at any time if they feel that they will not be able to
87+
continue fulfilling their project duties. Resignations should be communicated
88+
via GitHub Pull Request to update the [MAINTAINERS.md] file. Approving
89+
resignations does not require a vote.
90+
91+
Maintainers may also be removed after being inactive, failing to fulfill their
92+
Maintainer responsibilities, violating the Code of Conduct, or for other reasons.
93+
Inactivity is defined as a period of very low or no activity in the project
94+
for a year or more, with no definite schedule to return to full Maintainer
95+
activity.
96+
97+
The process for removing a maintainer is for an existing maintainer to open
98+
a Pull Request on GitHub to update the [MAINTAINERS.md] file. The commit
99+
message should explain the reason for removal. The Pull Request will be
100+
voted on by the remaining maintainers. A 2/3 majority vote is required to
101+
remove a maintainer.
102+
103+
Depending on the reason for removal, a Maintainer may be converted to Emeritus
104+
status. Emeritus Maintainers will still be consulted on some project matters
105+
and can be rapidly returned to Maintainer status if their availability changes.
106+
However, Emeritus Maintainers will not have write access to the project's
107+
repositories.
108+
109+
The process for making an Emeritus Maintainer is the same as for removing a
110+
Maintainer, except that the [MAINTAINERS.md] file should be updated to reflect
111+
the Emeritus status rather than removing the Maintainer entirely.
112+
113+
The process for returning an Emeritus Maintainer is via Pull Request
114+
to update the [MAINTAINERS.md] file. A simple majority vote of existing
115+
Maintainers approves the return.
116+
117+
## Meetings
118+
119+
There are no standing meetings for Maintainers.
120+
121+
Maintainers may have closed meetings to discuss security reports
122+
or Code of Conduct violations. Such meetings should be scheduled by any
123+
Maintainer on receipt of a security issue or CoC report. All current Maintainers
124+
must be invited to such closed meetings, except for any Maintainer who is
125+
accused of a CoC violation.
126+
127+
## Code of Conduct
128+
129+
[Code of Conduct] violations by community members will be
130+
discussed and resolved on the private maintainer Discord channel.
131+
132+
## Security Response Team
133+
134+
The Maintainers will appoint a Security Response Team to handle security
135+
reports. This committee may simply consist of the Maintainer Council themselves.
136+
If this responsibility is delegated, the Maintainers will appoint a team of at
137+
least two contributors to handle it. The Maintainers will review who is assigned
138+
to this at least once a year.
139+
140+
The Security Response Team is responsible for handling all reports of security
141+
holes and breaches according to the [security policy].
142+
143+
## Voting
144+
145+
While most business in Aya is conducted by [lazy consensus], periodically the
146+
Maintainers may need to vote on specific actions or changes.
147+
A vote can be taken on the private developer Discord channel for security or
148+
conduct matters. Any Maintainer may demand a vote be taken.
149+
150+
Most votes require a simple majority of all Maintainers to succeed, except where
151+
otherwise noted. Two-thirds majority votes mean at least two-thirds of all
152+
existing maintainers.
153+
154+
## Modifying this Charter
155+
156+
Changes to this Governance and its supporting documents may be approved by
157+
a 2/3 vote of the Maintainers.
158+
159+
[GitHub organization]: https://github.com/aya-rs
160+
[Code of Conduct]: ./CODE_OF_CONDUCT.md
161+
[MAINTAINERS.md]: ./MAINTAINERS.md
162+
[security policy]: ./SECURITY.md
163+
[lazy consensus]: https://community.apache.org/committers/lazyConsensus.html

0 commit comments

Comments
 (0)