Skip to content

Commit

Permalink
Additional per-file OWNERS for shared directories.
Browse files Browse the repository at this point in the history
Iteration based on areas of tree where detailed ownership was found
to be missing during routine code reviews.

Also add more detailed examples to OWNERS.md.

Bug: 174932174
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I46ccef33b34594181ae8dc62973d68020f827d6b
  • Loading branch information
jsharkey committed Dec 10, 2020
1 parent c9dc68f commit e2cc3f8
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ [email protected]
[email protected]

# Support bulk translation updates
per-file */res*/values*/*.xml = [email protected]
per-file */res*/values*/*.xml = [email protected], [email protected]

per-file Android.bp = file:platform/build/soong:/OWNERS
per-file Android.mk = file:platform/build/soong:/OWNERS
Expand Down
34 changes: 34 additions & 0 deletions OWNERS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Background

As general background, `OWNERS` files expedite code reviews by helping code
authors quickly find relevant reviewers, and they also ensure that stakeholders
are involved in code changes in their areas.
Expand Down Expand Up @@ -27,8 +29,40 @@ main `services/core/` project:
* `media/`
* `wifi/`

# Design

Area maintainers are strongly encouraged to list people in a single
authoritative `OWNERS` file in **exactly one** location. Then, other paths
should reference that single authoritative `OWNERS` file using an include
directive. This approach ensures that updates are applied consistently across
the tree, reducing maintenance burden.

# Examples

The exact syntax of `OWNERS` files can be difficult to get correct, so here are
some common examples:

```
# Complete include of top-level owners from this repo
include /ZYGOTE_OWNERS
# Partial include of top-level owners from this repo
per-file ZygoteFile.java = file:/ZYGOTE_OWNERS
```
```
# Complete include of subdirectory owners from this repo
include /services/core/java/com/android/server/net/OWNERS
# Partial include of subdirectory owners from this repo
per-file NetworkFile.java = file:/services/core/java/com/android/server/net/OWNERS
```
```
# Complete include of top-level owners from another repo
include platform/libcore:/OWNERS
# Partial include of top-level owners from another repo
per-file LibcoreFile.java = file:platform/libcore:/OWNERS
```
```
# Complete include of subdirectory owners from another repo
include platform/frameworks/av:/camera/OWNERS
# Partial include of subdirectory owners from another repo
per-file CameraFile.java = file:platform/frameworks/av:/camera/OWNERS
```
3 changes: 3 additions & 0 deletions core/java/android/app/OWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
per-file *Alarm* = file:/apex/jobscheduler/OWNERS
per-file *AppOp* = file:/core/java/android/permission/OWNERS
per-file *Notification* = file:/packages/SystemUI/OWNERS
per-file *Zygote* = file:/ZYGOTE_OWNERS
3 changes: 3 additions & 0 deletions core/java/android/os/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ per-file PowerComponents.java = file:/BATTERY_STATS_OWNERS

per-file GraphicsEnvironment.java = [email protected], [email protected], [email protected], [email protected], [email protected]

per-file *Network* = file:/services/core/java/com/android/server/net/OWNERS
per-file *Power* = file:/services/core/java/com/android/server/power/OWNERS
per-file *Telephony* = file:/telephony/OWNERS
per-file *Zygote* = file:/ZYGOTE_OWNERS
1 change: 1 addition & 0 deletions core/java/android/telephony/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include /telephony/OWNERS
1 change: 1 addition & 0 deletions core/java/com/android/internal/app/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
per-file *AppOp* = file:/core/java/android/permission/OWNERS
1 change: 1 addition & 0 deletions core/java/com/android/internal/notification/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include /services/core/java/com/android/server/notification/OWNERS
1 change: 1 addition & 0 deletions core/java/com/android/internal/os/OWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
per-file *Power* = file:/services/core/java/com/android/server/power/OWNERS
per-file *Zygote* = file:/ZYGOTE_OWNERS

# BatteryStats
Expand Down
1 change: 1 addition & 0 deletions core/java/com/android/internal/telephony/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include /telephony/OWNERS
2 changes: 1 addition & 1 deletion services/core/java/com/android/server/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ per-file ZramWriteback.java = [email protected], [email protected], srnvs@go
per-file UserspaceRebootLogger.java = [email protected], [email protected]

per-file *Alarm* = file:/apex/jobscheduler/OWNERS
per-file *AppOps* = file:/core/java/android/permission/OWNERS
per-file *AppOp* = file:/core/java/android/permission/OWNERS
per-file *Bluetooth* = file:/core/java/android/bluetooth/OWNERS
per-file *Gnss* = file:/services/core/java/com/android/server/location/OWNERS
per-file *Location* = file:/services/core/java/com/android/server/location/OWNERS
Expand Down
2 changes: 1 addition & 1 deletion services/tests/servicestests/src/com/android/server/OWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
per-file *Alarm* = file:/apex/jobscheduler/OWNERS
per-file *AppOps* = file:/core/java/android/permission/OWNERS
per-file *AppOp* = file:/core/java/android/permission/OWNERS
per-file *Bluetooth* = file:/core/java/android/bluetooth/OWNERS
per-file *Gnss* = file:/services/core/java/com/android/server/location/OWNERS
per-file *Network* = file:/services/core/java/com/android/server/net/OWNERS
Expand Down

0 comments on commit e2cc3f8

Please sign in to comment.