Gerrit sends too many emails for reviews.

384 views
Skip to first unread message

Ashwini T R

unread,
Feb 1, 2017, 4:25:54 AM2/1/17
to Repo and Gerrit Discussion
Gerrit sends too many emails for reviews. With 10+ reviewers in repository .

Example:

1. Create repository sandbox/schydeni: 
https://<Gerrit_host>/#/admin/projects/test

2. Add multiple reviewers (4 emails, 1st one is the review author in this case):
    [filter "*"]
    reviewer = fi...@example.com
    reviewer = sec...@example.com
    reviewer = th...@example.com
    reviewer = Fou...@example.com

https://gerrit host/gitweb?p=test.git;a=blob_plain;f=reviewers.config;hb=refs/meta/config

3. Create review request with "git review"

4. Multiple review emails are received by reviewers:
    
Three different emails in total:
 - mail 1: second in to field
 - mail 2: third in to field, second in CC field
 - mail 3: fourth in To field, third and second in CC field

    first as a review sender does not receive any mails - OK
    second receives 3 emails: 1 & 2 & 3
    third receives 2 emails: 2 & 3
    Foruth receives 1 email: 3

Please suggest how to resolve the issue.

Thanks
Ashwini

Benjamin Copeland

unread,
Feb 1, 2017, 7:10:09 AM2/1/17
to Ashwini T R, Repo and Gerrit Discussion
Hi Ashwini,

This is a known issue, I've been having the same problem, see
https://bugs.chromium.org/p/gerrit/issues/detail?id=5190#c3.

Probably not going to see a fix until 2.14, which is a shame as its
causing havoc here.

Ben
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

David Ostrovsky

unread,
Feb 1, 2017, 8:16:25 AM2/1/17
to Repo and Gerrit Discussion, ashu.r...@gmail.com, David Pursehouse (Sony Mobile)

Am Mittwoch, 1. Februar 2017 13:10:09 UTC+1 schrieb Benjamin Copeland:
Hi Ashwini,

This is a known issue, I've been having the same problem, see
https://bugs.chromium.org/p/gerrit/issues/detail?id=5190#c3.

Probably not going to see a fix until 2.14, which is a shame as its
causing havoc here. 

//CC David

Sounds like we should try to bak port: [1] to stable-2.13?


Benjamin Copeland

unread,
Feb 2, 2017, 11:17:36 AM2/2/17
to David Ostrovsky, Repo and Gerrit Discussion, Ashwini T R, David Pursehouse (Sony Mobile)
On 1 February 2017 at 13:16, David Ostrovsky <david.o...@gmail.com> wrote:
>
> Am Mittwoch, 1. Februar 2017 13:10:09 UTC+1 schrieb Benjamin Copeland:
>>
>> Hi Ashwini,
>>
>> This is a known issue, I've been having the same problem, see
>> https://bugs.chromium.org/p/gerrit/issues/detail?id=5190#c3.
>>
>> Probably not going to see a fix until 2.14, which is a shame as its
>> causing havoc here.
>
>
> //CC David
>
> Sounds like we should try to bak port: [1] to stable-2.13?

That would be really great if you could do this.

Ben

>
> * [1] https://gerrit-review.googlesource.com/90450

Logan Hanks

unread,
Feb 2, 2017, 1:27:23 PM2/2/17
to Benjamin Copeland, David Ostrovsky, Repo and Gerrit Discussion, Ashwini T R, David Pursehouse (Sony Mobile)
You would need to backport PolyGerrit, too, or use the REST API directly to add multiple reviewers at once. Batching these emails depends on all the reviewers being added at once by a single API call.

On Thu, Feb 2, 2017 at 8:17 AM, Benjamin Copeland <ben.co...@linaro.org> wrote:
On 1 February 2017 at 13:16, David Ostrovsky <david.o...@gmail.com> wrote:
>
> Am Mittwoch, 1. Februar 2017 13:10:09 UTC+1 schrieb Benjamin Copeland:
>>
>> Hi Ashwini,
>>
>> This is a known issue, I've been having the same problem, see
>> https://bugs.chromium.org/p/gerrit/issues/detail?id=5190#c3.
>>
>> Probably not going to see a fix until 2.14, which is a shame as its
>> causing havoc here.
>
>
> //CC David
>
> Sounds like we should try to bak port: [1] to stable-2.13?

That would be really great if you could do this.

Ben

> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> For more options, visit https://groups.google.com/d/optout.

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.

David Ostrovsky

unread,
Feb 2, 2017, 2:16:40 PM2/2/17
to Repo and Gerrit Discussion, david.pu...@gmail.com

On Thursday, February 2, 2017 at 7:27:23 PM UTC+1, Logan Hanks wrote:
You would need to backport PolyGerrit,

My understanding of the original question is that it's entirely
unrelated to the UI, but is a failure of the reviewers plugin,
as reviewers plugin configuration section was quoted, and 
git review tool from openstack project to upload a change
to gerrit.
 
too, or use the REST API directly to add multiple reviewers at once. Batching these emails depends on all the reviewers being added at once by a single API call.

Yes, you are right.

The reviewers plugin uses the rest API to add reviewers to
a change, obviously, but looking at the relevant part of the
code: [1], it uses separate invocation per added reviewer
of PostReviewers#apply(), that doesn't support passing
multiple reviewers at once. So just cherry-picking the 90450
wouldn't solve the problem. Reviewers plugin must change
the way how it adds the reviewers to use PostReview that
allows passing several Reviewers in batch.


David Ostrovsky

unread,
Feb 12, 2017, 3:07:56 PM2/12/17
to Repo and Gerrit Discussion, ashu.r...@gmail.com, david.pu...@gmail.com
Turned out, it wasn't sufficient to back-port [1], as it was also required
to back port: [2]. Moreover, the reviewers plugin was fixed to use batch
capable endpoint `/changes/<id>/revisions/<id>/review` instead of non
batch capable `/changes/<id>/reviewers`: [3].

Note, that [3] is still pending for reviews, and new 2.13 stable release
included the back ported changes wasn't released yet.

Also note, that all those fixes only help when using reviewers plugin. The
UI issues are still unsolved for both UIs on 2.13 and still unsolved for the
old UI on master.

David Ostrovsky

unread,
Feb 26, 2017, 5:13:45 PM2/26/17
to Repo and Gerrit Discussion

On Wednesday, February 1, 2017 at 1:10:09 PM UTC+1, Benjamin Copeland wrote:
Hi Ashwini,

This is a known issue, I've been having the same problem, see
https://bugs.chromium.org/p/gerrit/issues/detail?id=5190#c3.

Probably not going to see a fix until 2.14, which is a shame as its
causing havoc here.

I was able to track it down. Reproducer is here: [1]. This regression
was introduced in 2.13.


Reply all
Reply to author
Forward
0 new messages