Skip to content

Commit 5961b66

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 9e69501 commit 5961b66

File tree

6 files changed

+318
-34
lines changed

6 files changed

+318
-34
lines changed

.github/mergify.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
pull_request_rules:
2+
- name: automatic merge for Dependabot pull requests
3+
conditions:
4+
- author=dependabot[bot]
5+
- check-success=build-workflow-complete
6+
- label!=hold
7+
actions:
8+
merge:
9+
method: merge
10+
11+
- name: automatic merge conditions for main
12+
conditions:
13+
- "#approved-reviews-by>=2"
14+
- "#review-requested=0"
15+
- "#changes-requested-reviews-by=0"
16+
- base=main
17+
- label!=hold
18+
- label!=work-in-progress
19+
- check-success=DCO
20+
- check-success=build-workflow-complete
21+
actions:
22+
merge:
23+
method: merge
24+
25+
- name: Warn on conflicts
26+
conditions:
27+
- conflict
28+
actions:
29+
comment:
30+
message: "@{{author}}, this pull request is now in conflict and requires a rebase."
31+
label:
32+
add:
33+
- needs-rebase
34+
35+
- name: remove conflict label if not needed
36+
conditions:
37+
- -conflict
38+
actions:
39+
label:
40+
remove:
41+
- needs-rebase

CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @aya-rs/aya-maintainers
2+
aya/src/public-api.txt @alessandrod

CONTRIBUTING.md

+115-34
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,129 @@
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+
* [Signoff Your Commits](#signoff-your-commits)
9+
* [Pull Request Checklist](#pull-request-checklist)
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-
https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html and make sure
21-
your changes conform to the format outlined here
22-
https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#documenting-components.
23+
## Ways to Contribute
2324

24-
If you want to make changes to the Aya Book, see the readme in the book repo
25-
https://github.com/aya-rs/book.
25+
We welcome many different types of contributions including:
2626

27-
## Fixing bugs and implementing new features
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-
Make sure that your work is tracked by an issue or a (draft) pull request, this
30-
helps us avoid duplicating work. If your work includes publicly visible changes,
31-
make sure those are properly documented as explained in the section above.
37+
Not everything happens through a GitHub pull request. Please come to our
38+
[Discord](https://discord.gg/xHW2cb2N6G) and let's discuss how we can work
39+
together.
3240

33-
### Running tests
34-
Run the unit tests with `cargo test`. See [Aya Integration Tests](https://github.com/aya-rs/aya/blob/main/test/README.md) regarding running the integration tests.
41+
## Find an Issue
3542

36-
### Commits
43+
We have good first issues for new contributors and help wanted issues suitable
44+
for any contributor. [good first issue](https://github.com/aya-rs/aya/labels/good%20first%20issue) has extra information to
45+
help you make your first contribution. [help wanted](https://github.com/aya-rs/aya/labels/help%20wanted) are issues
46+
suitable for someone who isn't a core maintainer and is good to move onto after
47+
your first pull request.
48+
49+
Sometimes there won’t be any issues with these labels. That’s ok! There is
50+
likely still something for you to work on. If you want to contribute but you
51+
don’t know where to start or can't find a suitable issue, you can reach out to us on Discord and we will be happy to help.
52+
53+
Once you see an issue that you'd like to work on, please post a comment saying
54+
that you want to work on it. Something like "I want to work on this" is fine.
55+
56+
## Ask for Help
57+
58+
The best way to reach us with a question when contributing is to ask on:
59+
60+
* The original github issue
61+
* Our Discord
62+
63+
## Pull Request Lifecycle
64+
65+
Pull requests are managed by Mergify.
66+
67+
Our process is currently as follows:
68+
69+
1. When you open a PR a maintainer will automatically be assigned for review
70+
1. Make sure that your PR is passing CI - if you need help with failing checks please feel free to ask!
71+
1. Once it is passing all CI checks, a maintainer will review your PR and you may be asked to make changes.
72+
1. When you have received at two approving reviews from a maintainer, your PR will be merged automiatcally.
73+
74+
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.
75+
76+
## Signoff Your Commits
77+
78+
### DCO
79+
80+
Licensing is important to open source projects. It provides some assurances that
81+
the software will continue to be available based under the terms that the
82+
author(s) desired. We require that contributors sign off on commits submitted to
83+
our project's repositories. The [Developer Certificate of Origin
84+
(DCO)](https://probot.github.io/apps/dco/) is a way to certify that you wrote and
85+
have the right to contribute the code you are submitting to the project.
86+
87+
You sign-off by adding the following to your commit messages. Your sign-off must
88+
match the git user and email associated with the commit.
89+
90+
This is my commit message
91+
92+
Signed-off-by: Your Name <[email protected]>
93+
94+
Git has a `-s` command line option to do this automatically:
95+
96+
git commit -s -m 'This is my commit message'
97+
98+
If you forgot to do this and have not yet pushed your changes to the remote
99+
repository, you can amend your commit with the sign-off by running
100+
101+
git commit --amend -s
102+
103+
## Logical Grouping of Commits
37104

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

43-
#### Commit message guidelines
111+
## Commit message guidelines
44112

45113
A good commit message should describe what changed and why.
46114

47115
1. The first line should:
48-
49-
* contain a short description of the change (preferably 50 characters or less,
116+
117+
* contain a short description of the change (preferably 50 characters or less,
50118
and no more than 72 characters)
51-
* be entirely in lowercase with the exception of proper nouns, acronyms, and
119+
* be entirely in lowercase with the exception of proper nouns, acronyms, and
52120
the words that refer to code, like function/variable names
53-
* be prefixed with the name of the sub crate being changed
121+
* be prefixed with the name of the sub crate being changed
54122

55123
Examples:
56124

57-
* aya: handle reordered functions
58-
* aya-bpf: SkSkbContext: add ::l3_csum_replace
125+
* aya: validate program section names
126+
* aya-bpf: add dispatcher program test slot
59127

60128
2. Keep the second line blank.
61129
3. Wrap all other lines at 72 columns (except for long URLs).
@@ -66,8 +134,8 @@ A good commit message should describe what changed and why.
66134

67135
Examples:
68136

69-
- `Fixes: #1337`
70-
- `Refs: #1234`
137+
* `Fixes: #1337`
138+
* `Refs: #1234`
71139

72140
Sample complete commit message:
73141

@@ -86,3 +154,16 @@ nicely even when it is indented.
86154
Fixes: #1337
87155
Refs: #453, #154
88156
```
157+
158+
## Pull Request Checklist
159+
160+
When you submit your pull request, or you push new commits to it, our automated
161+
systems will run some checks on your new code. We require that your pull request
162+
passes these checks, but we also have more criteria than just that before we can
163+
accept and merge it. We recommend that you check the following things locally
164+
before you submit your code:
165+
166+
* That Rust code has been formatted with `cargo +nightly fmt` and that all clippy lints have been fixed - you can find failing lints with `cargo +nightly clippy`
167+
* That Go code has been formatted and linted
168+
* That unit tests are passing locally with `cargo test`
169+
* That integration tests are passing locally `cargo xtask integration-test`

GOVERNANCE.md

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

MAINTAINERS.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Maintainers
2+
3+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for general contribution guidelines.
4+
See [GOVERNANCE.md](./GOVERNANCE.md) for governance guidelines and maintainer responsibilities.
5+
See [CODEOWNERS](./CODEOWNERS) for a detailed list of owners for the various source directories.
6+
7+
| Name | Employer | Areas of Expertise |
8+
| ---- | -------- | ------------------ |
9+
| [Alessandro Decina](https://github.com/alessandrod) | Contractor | Everything! |
10+
| [Michal Rostecki](https://github.com/vadorovsky) | Light Protocol | Aya Log, LSM |
11+
| [Dave Tucker](https://github.com/dave-tucker) | Red Hat | sys_bpf(), BTF, Networking and Tracing Programs, bppfs |
12+
| [Davide Bertola](https://github.com/davibe) | ? | bpf-linker, LLVM |
13+
| [Mary](https://github.com/marysaka) | ? | Compatibility with older kernels |
14+
| [](https://github.com/ajwerner) | ? | ? |
15+
| [Tamir Duberstein](https://github.com/tamird) | ? | ? |
16+
| [Andrew Stoycos](https://github.com/astoycos) | Red Hat | ? |

SECURITY.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
No released versions of aya or it's subprojects will receive regular security updates until a mainline release has been performed.
6+
A reported and fixed vulnerability will be included in the next minor release, which depending on the severity of the vulnerability may be immediate.
7+
8+
## Reporting a Vulnerability
9+
10+
To report a vulnerability, please use the [Private Vulnerability Reporting Feature](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)
11+
on GitHub. We will endevour to respond within 48hrs of reporting.
12+
If a vulnerability is reported but considered low priority it may be converted into an issue and handled on the public issue tracker.
13+
Should a vulnerability be considered severe we will endeavour to patch it within 48hrs of acceptance, and may ask for you to collaborate with us on a temporary private fork of the repository.

0 commit comments

Comments
 (0)