Bug 1451184 - Assign reviewers based on who touched the file last
Summary: Assign reviewers based on who touched the file last
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: project-infrastructure
Version: mainline
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-16 05:22 UTC by Nigel Babu
Modified: 2018-11-20 09:44 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-11-20 09:10:47 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Nigel Babu 2017-05-16 05:22:08 UTC
There's a Gerrit extension for this.

Comment 1 Jeff Darcy 2017-05-16 10:43:52 UTC
How tunable is the Gerrit extension?  I can think of at least two cases where this would be more annoying than useful.

(a) For frequently contended files (e.g. glusterd-volume-set.c).

(b) For sweeping but superficial changes (e.g. copyright).

Overall it seems like a good idea, but I'd be wary of the details.

Comment 2 Prashanth Pai 2017-05-16 11:00:53 UTC
Sometimes, there are changes from new contributors which go unnoticed because no reviewers were added. I've seen Jeff and Amar diligently going through these new changes without reviewers. There should be a better mechanism for maintainers to subscribe or notice new incoming changes and this will greatly help.

Some thoughts on this:

* Github 'suggests' reviewers for PRs based on git blame. The PR author can choose or ignore to add them as reviewers. If Gerrit can suggest reviewers in the UI, it'd be great.

* If Gerrit allows, you could check if the potential reviewer (based on git blame) has had reviewing activity in recent past (to filter out non active contributors), and then add them as reviewer.

Comment 3 Niels de Vos 2017-05-16 12:41:45 UTC
QEMU, the Linux kernel and other projects use a script called 'get_maintainer.pl' (https://github.com/qemu/qemu/blob/master/scripts/get_maintainer.pl). We should be able to add a simple Jenkins job as part of smoke that finds the best suitable persons to review a change.

The Gerrit cli is pretty usable for adding reviewers:

  $ ssh user.org \
        gerrit set-reviewers ${COMMIT} -a ${REVIEWER_EMAIL}

Because our MAINTAINERS file uses the same format as QEMU and the kernel, it should be trivial to use the get_maintainers.pl script. I do not know how the Gerrit extension works, but I prefer to have the configuration for the maintainers of files in the MAINTAINERS file in the repository itself.

Comment 4 Shyamsundar 2017-05-16 13:39:11 UTC
This falls under keeping a tab on the review queue, and appropriately taking action to assign to self, or others as the need maybe.

I see this as a maintainer activity primarily, and others can pitch in based on interest, but maintainers cannot/should not miss this.

Considering this, I would prefer that default assignment falls to maintainers, who can then choose to add more folks to the review. IOW, what Niels states in comment#3.

Comment 5 Aravinda VK 2017-05-16 15:41:42 UTC
Maintainers can watch the files/directories which they maintain. If any patch touches watched file/directory then it sends mail.

- Go to project settings->Watched Projects https://review.gluster.org/#/settings/projects
- Enter project name and then set filters

Example:
Project: glusterfs
Only If: file:"^geo-replication/*"

Project: glusterfs
Only If: file:^glusterfs.spec.in

Comment 6 Niels de Vos 2017-05-16 16:22:33 UTC
(In reply to Aravinda VK from comment #5)
> Maintainers can watch the files/directories which they maintain. If any
> patch touches watched file/directory then it sends mail.

Indeed, and maintainers are expected to configure their Gerrit account like that. This is even one of the things we document relatively well:

http://gluster.readthedocs.io/en/latest/Contributors-Guide/Guidelines-For-Maintainers/#patches-in-gerrit

Comment 7 Vijay Bellur 2018-11-20 09:44:13 UTC
Migrated to github:

https://github.com/gluster/glusterfs/issues/605

Please follow the github issue for further updates on this bug.


Note You need to log in before you can comment on or make changes to this bug.