SERVER-94534 Added owning team to codeowners (#26886)

GitOrigin-RevId: 79590effe86c471cc15d91c6785599ec2085d7c0
This commit is contained in:
Alexander Neben 2024-09-09 16:06:05 -07:00 committed by MongoDB Bot
parent d7c1fe6cb6
commit 76fa3d6f89
3 changed files with 14 additions and 7 deletions

View File

@ -9,8 +9,9 @@ filters:
- mbroadst - mbroadst
- markbenvenuto - markbenvenuto
- dstorch - dstorch
emeritus_approvers: metadata:
- visemet # TODO: add back to approvers once project work is finished emeritus_approvers:
- visemet # TODO: add back to approvers once project work is finished
- ".bazelignore": - ".bazelignore":
approvers: approvers:
- 10gen/devprod-build - 10gen/devprod-build

View File

@ -103,8 +103,8 @@ def process_owners_file(output_lines: list[str], directory: str) -> None:
), f"Filter in {owners_file_path} does not have approvers." ), f"Filter in {owners_file_path} does not have approvers."
approvers = _filter["approvers"] approvers = _filter["approvers"]
del _filter["approvers"] del _filter["approvers"]
if "emeritus_approvers" in _filter: if "metadata" in _filter:
del _filter["emeritus_approvers"] del _filter["metadata"]
# the last key remaining should be the pattern for the filter # the last key remaining should be the pattern for the filter
assert len(_filter) == 1, f"Filter in {owners_file_path} has incorrect values." assert len(_filter) == 1, f"Filter in {owners_file_path} has incorrect values."

View File

@ -8,7 +8,11 @@ This is loosely based on [kubernetes](https://www.kubernetes.dev/docs/guide/owne
`aliases` point to yaml files files that list aliases that can be used in this OWNERS.yml file. `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. `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 can optionally have a `metadata` tag. Inside that tag a user can put whatever tags they want. We have reserved two meaningful tags `emeritus_approvers` and `owning_team`. This is not an exhaustive list and more documented and undocumented options can be added later. There is no linting done on the metadata tag.
`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.
`owning_team` is a team that owns the files, however this team does not have approval privileges. Instead this team should be looked to for asking questions. This metadata can also be used programmatically to, for example, generate a report of all the files owned by a particular team, even though that team has nominated specific engineers as approvers.
`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. `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.
@ -25,8 +29,10 @@ filters: # List of all filters
- devprod-correctness # alias for a group of users - devprod-correctness # alias for a group of users
- IamXander # github username - IamXander # github username
- user.name@mongodb.com # email address - user.name@mongodb.com # email address
emeritus_approvers: # This list is just for historical reference metadata:
- userB emeritus_approvers: # This list is just for historical reference
- userB
owning_team: "10gen/devprod-correctness" # The team which owns the matching files. These folks are not required approvers that will block a PR.
- "*.md": - "*.md":
approvers: approvers:
- markdown-approvers - markdown-approvers