Is your feature request related to a problem?
Our current CODEOWNERS file currently marks every maintainer as an owner of the entire codebase. The issue is that code owners are automatically added as reviewers to PRs that touch owned code, which in practice means that every maintainer is assigned as a reviewer on every PR. This makes the review notifications very noisy and makes it harder to identify PRs where a maintainer is actually needed.
What solution would you like?CODEOWNERS turns out to be capable of much more than a global mask, though. It supports gitignore-like syntax to assign owners to individual files. By making better use of this file, we can get PRs to the people that need to see them, faster. For example, in Observability, for adding the integrations project's main developers, we could consider adding the line:
**/integrations @Swiddis @RyanL1997
Which would add only the two mentioned devs as a reviewer, since CODEOWNERS only applies the last matching line in a file.
It also can just reference the opensearch-project/sql team directly instead of listing every dev, which has the benefit of better dynamic management and also would help make the review process less noisy. However, this doesn't seem compatible with the admin tooling that validates the codeowners, for reasons I think I was told once but have since forgot.
* @opensearch-project/sql
What alternatives have you considered?
There are a few other approaches to the issue.
We could just disable automatically adding code owners in the repository review settings, making the process manual. I think this would still be better than adding everyone.
Once the notifications have chilled out we could look at reintroducing a sort of round-robin system for reassigning reviewers.
We could use a more elaborate system like assign-reviewer-by-label to implement this functionality through PR labels instead of CODEOWNERS.
Copy of https://github.com/opensearch-project/dashboards-observability/issues/1252 to a new repo, hoping for better success here.
Is your feature request related to a problem? Our current
CODEOWNERS
file currently marks every maintainer as an owner of the entire codebase. The issue is that code owners are automatically added as reviewers to PRs that touch owned code, which in practice means that every maintainer is assigned as a reviewer on every PR. This makes the review notifications very noisy and makes it harder to identify PRs where a maintainer is actually needed.What solution would you like?
CODEOWNERS
turns out to be capable of much more than a global mask, though. It supports gitignore-like syntax to assign owners to individual files. By making better use of this file, we can get PRs to the people that need to see them, faster. For example, in Observability, for adding the integrations project's main developers, we could consider adding the line:Which would add only the two mentioned devs as a reviewer, since
CODEOWNERS
only applies the last matching line in a file.It also can just reference the opensearch-project/sql team directly instead of listing every dev, which has the benefit of better dynamic management and also would help make the review process less noisy. However, this doesn't seem compatible with the admin tooling that validates the codeowners, for reasons I think I was told once but have since forgot.
What alternatives have you considered? There are a few other approaches to the issue.
Do you have any additional context? This type of strategy is put to good use in some large projects like CPython and Node.js. This fix has also been discussed/partially implemented in https://github.com/opensearch-project/OpenSearch/issues/10613.