SERVER-88583 OWNERS format proposal (#20460)
GitOrigin-RevId: dc8d4d59a474ca4d989f8acb64c1214b762f45e0
This commit is contained in:
parent
d53f04a136
commit
8548333ea0
81
OWNERS.yml
Normal file
81
OWNERS.yml
Normal file
@ -0,0 +1,81 @@
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //bazel/devprod_build_aliases.yml
|
||||
- //buildscripts/resmokelib/devprod_correctness_aliases.yml
|
||||
filters:
|
||||
- "OWNERS.yml":
|
||||
approvers:
|
||||
- IamXander
|
||||
# TODO: add more owners here
|
||||
- ".bazelignore":
|
||||
approvers:
|
||||
- devprod-build
|
||||
- ".bazelrc":
|
||||
approvers:
|
||||
- devprod-build
|
||||
- ".bazelversion":
|
||||
approvers:
|
||||
- devprod-build
|
||||
- ".clang-format":
|
||||
approvers:
|
||||
- devprod-build
|
||||
- ".eslint-ignore":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- ".eslintrc.yml":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- ".mypy.ini":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- devprod-build
|
||||
- ".prettierignore":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- ".prettierrc":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- ".pydocstyle":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- devprod-build
|
||||
- ".pylintrc":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- devprod-build
|
||||
- ".style.yapf":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- devprod-build
|
||||
- "BUILD.bazel":
|
||||
approvers:
|
||||
- devprod-build
|
||||
- "copybara.sky":
|
||||
approvers:
|
||||
- IamXander
|
||||
- "copybara.staging.sky":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- "jsconfig.json":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- "package.json":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- "pnpm-lock.yaml":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- "poetry.lock":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- devprod-build
|
||||
- "pyproject.toml":
|
||||
approvers:
|
||||
- devprod-correctness
|
||||
- devprod-build
|
||||
- "SConstruct":
|
||||
approvers:
|
||||
- devprod-build
|
||||
- "WORKSPACE.bazel":
|
||||
approvers:
|
||||
- devprod-build
|
||||
7
bazel/OWNERS.yml
Normal file
7
bazel/OWNERS.yml
Normal file
@ -0,0 +1,7 @@
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //bazel/devprod_build_aliases.yml
|
||||
filters:
|
||||
- "*":
|
||||
approvers:
|
||||
- devprod-build
|
||||
11
bazel/devprod_build_aliases.yml
Normal file
11
bazel/devprod_build_aliases.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
devprod-build:
|
||||
- alex.neben@mongodb.com
|
||||
- zack.winter@mongodb.com
|
||||
- daniel.moody@mongodb.com
|
||||
- trevor.guidry@mongodb.com
|
||||
- anthony.pratti@mongodb.com
|
||||
- thomas.langston@mongodb.com
|
||||
- udita.bose@mongodb.com
|
||||
- steve.gross@mongodb.com
|
||||
7
buildfarm/OWNERS.yml
Normal file
7
buildfarm/OWNERS.yml
Normal file
@ -0,0 +1,7 @@
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //bazel/devprod_build_aliases.yml
|
||||
filters:
|
||||
- "*":
|
||||
approvers:
|
||||
- devprod-build
|
||||
10
buildscripts/OWNERS.yml
Normal file
10
buildscripts/OWNERS.yml
Normal file
@ -0,0 +1,10 @@
|
||||
# TODO: This is a really loose alias for a lot of files.
|
||||
# TODO: We can tighten this up as we decide more the split between the teams.
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //buildscripts/resmokelib/devprod_correctness_aliases.yml
|
||||
- //bazel/devprod_build_aliases.yml
|
||||
filters:
|
||||
- "*":
|
||||
- devprod-correctness
|
||||
- devprod-build
|
||||
6
buildscripts/resmokelib/OWNERS.yml
Normal file
6
buildscripts/resmokelib/OWNERS.yml
Normal file
@ -0,0 +1,6 @@
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //buildscripts/resmokelib/devprod_correctness_aliases.yml
|
||||
filters:
|
||||
- "*":
|
||||
- devprod-correctness
|
||||
8
buildscripts/resmokelib/devprod_correctness_aliases.yml
Normal file
8
buildscripts/resmokelib/devprod_correctness_aliases.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
devprod-correctness:
|
||||
- mikhail.shchatko@mongodb.com
|
||||
- juan.gu@mongodb.com
|
||||
- alex.neben@mongodb.com
|
||||
- trevor.guidry@mongodb.com
|
||||
- steve.gross@mongodb.com
|
||||
108
docs/owners_format.md
Normal file
108
docs/owners_format.md
Normal file
@ -0,0 +1,108 @@
|
||||
# Code Owners
|
||||
|
||||
## OWNERS.yml File Format
|
||||
|
||||
This is loosely based on [kubernetes](https://www.kubernetes.dev/docs/guide/owners/) and [chromium](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/code_reviews.md) OWNERS files.
|
||||
|
||||
`version` is the current version of the `OWNERS.yml` file format. This should always be 1.0.0.
|
||||
|
||||
`aliases` point to yaml files files that list aliases that can be used in this OWNERS.yml file.
|
||||
|
||||
`filters` are a list of globs that match [gitignore syntax](https://git-scm.com/docs/gitignore#_pattern_format). The filter must match at least once file and be unique to the file. Each filter must have a list of `approvers`. An approval from any single approver will allow the code to be merged. Each filter may have a list of `emeritus_approvers`. `emeritus_approvers` are folks that used to be approvers that no longer have approver privileges. This allows us to keep track of folks who built up a knowledge base of this code that might need to be consulted in a critical situation. Both `approvers` and `emeritus_approvers` should be either github usernames, emails, or aliases.
|
||||
|
||||
`options` are not required and are various options about how to use this OWNERS.yml file. Currently there is only a single option `no_parent_owners` which is defaulted to false. If this option is set to true it will stop upwards OWNERS resolution.
|
||||
|
||||
### Example file
|
||||
|
||||
```yaml
|
||||
version: 1.0.0 # Should always be 1.0.0
|
||||
aliases:
|
||||
# Contains the markdown-approvers alias
|
||||
- //buildscripts/resmokelib/devprod_correctness_aliases.yml
|
||||
filters: # List of all filters
|
||||
- "*": # Select all files (will apply recursively)
|
||||
approvers: # Anyone on this list can approve PRs
|
||||
- devprod-correctness # alias for a group of users
|
||||
- IamXander # github username
|
||||
- user.name@mongodb.com # email address
|
||||
emeritus_approvers: # This list is just for historical reference
|
||||
- userB
|
||||
- "*.md":
|
||||
approvers:
|
||||
- markdown-approvers
|
||||
options: # All options for this file
|
||||
no_parent_owners: false # See above for no_parent_owners. Defaulted to false so this line is not needed.
|
||||
```
|
||||
|
||||
### Aliases Yaml File Format
|
||||
|
||||
`version` is the current version of the aliases file format. This should always be 1.0.0.
|
||||
|
||||
`aliases` are a list of group names. Each group name must have one or more reviewers. Reviewers should be github usernames.
|
||||
|
||||
## Example File
|
||||
|
||||
```yaml
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
devprod-build:
|
||||
- IamXander # github username
|
||||
- user.name@mongodb.com # email address
|
||||
```
|
||||
|
||||
## Filter resolution
|
||||
|
||||
a/b/c/OWNERS.yml
|
||||
|
||||
```yaml
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //aliases.yml
|
||||
filters:
|
||||
- "*.py":
|
||||
approvers:
|
||||
- teamC
|
||||
- "*.md":
|
||||
approvers:
|
||||
- teamMD
|
||||
```
|
||||
|
||||
a/b/OWNERS.yml
|
||||
|
||||
```yaml
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //aliases.yml
|
||||
filters:
|
||||
- "*.json":
|
||||
approvers:
|
||||
- teamB
|
||||
- "*.py":
|
||||
approvers:
|
||||
- teamPY
|
||||
options:
|
||||
no_parent_owners: true
|
||||
```
|
||||
|
||||
a/OWNERS.yml
|
||||
|
||||
```yaml
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //aliases.yml
|
||||
filters:
|
||||
- "*":
|
||||
approvers:
|
||||
- teamA
|
||||
- "*.yaml":
|
||||
approvers:
|
||||
- teamYAML
|
||||
```
|
||||
|
||||
### Example 1
|
||||
|
||||
If someone changes `a/b/c/file.py` the owner resolution will select teamC since the first file searched is `a/b/c/OWNERS.yml` First we compare if `file.py` matches `*.md`. It does not so we now check if `file.py` matches `*`. It does match so teamC is selected for review.
|
||||
|
||||
### Example 2
|
||||
|
||||
If someone changes `a/b/c/file.yaml` the owner resolution will not find a team. The first file searched is `a/b/c/OWNERS.yml`. No filters match file.yaml. Next we search in `a/b/OWNERS.yml`. No filters match there either. We stop searching up because `no_parent_owners` is set to true.
|
||||
7
site_scons/OWNERS.yml
Normal file
7
site_scons/OWNERS.yml
Normal file
@ -0,0 +1,7 @@
|
||||
version: 1.0.0
|
||||
aliases:
|
||||
- //bazel/devprod_build_aliases.yml
|
||||
filters:
|
||||
- "*":
|
||||
approvers:
|
||||
- devprod-build
|
||||
Loading…
Reference in New Issue
Block a user