How to add project default reviewer(s)?

2,304 views
Skip to first unread message

Sundar Shankar

unread,
Oct 17, 2013, 11:27:47 PM10/17/13
to repo-d...@googlegroups.com
I have been trying to locate a documentation which can help set project level default reviewers(multiple engineers).
Seems like this is doable, however, i see could not find any useful information on this topic either on discussion board or google. 

Any pointers will be appreciated?

-Sundar

Shawn Pearce

unread,
Oct 18, 2013, 12:15:35 AM10/18/13
to Sundar Shankar, repo-discuss
On Thu, Oct 17, 2013 at 8:27 PM, Sundar Shankar <sundar...@gmail.com> wrote:
> I have been trying to locate a documentation which can help set project
> level default reviewers(multiple engineers).
> Seems like this is doable, however, i see could not find any useful
> information on this topic either on discussion board or google.

You can't really set reviewers, but you can notify them by email:

https://gerrit-review.googlesource.com/Documentation/user-notify.html#_project_level_settings

David Ostrovsky

unread,
Oct 19, 2013, 1:18:50 PM10/19/13
to repo-d...@googlegroups.com, repo-discuss


Am Freitag, 18. Oktober 2013 06:15:35 UTC+2 schrieb Shawn Pearce:
On Thu, Oct 17, 2013 at 8:27 PM, Sundar Shankar <sundar...@gmail.com> wrote:
> I have been trying to locate a documentation which can help set project
> level default reviewers(multiple engineers).
> Seems like this is doable, however, i see could not find any useful
> information on this topic either on discussion board or google.

You can't really set reviewers [...]

Now you can set project level default reviewers: [1].


Sundar Shankar

unread,
Oct 30, 2013, 9:59:17 AM10/30/13
to repo-d...@googlegroups.com
David,

Is that mean, I have to compile and install this reviewers-by blame plugin ?

-Sundar

David Ostrovsky

unread,
Oct 30, 2013, 11:22:37 AM10/30/13
to repo-d...@googlegroups.com, Shawn Pearce, Edwin Kempin, David Pursehouse (Sony Mobile)

On Wednesday, October 30, 2013 2:59:17 PM UTC+1, Sundar Shankar wrote:
David,

Is that mean, I have to compile and install this reviewers-by blame plugin ?


Unfortunately the plugin owner disagreed with my proposal to enhance
the existing reviewers-by blame plugin with new strategies, like,
fixed reviewers, per topic, per branch or even per pattern, like we are
using for watching changes.

I don't think that we should have one plugin per reviewer strategy though, but
one reviewers-plugin that can handle all them.

With Edwin's recent changes the project specific plugin configuration can
be stored in an own configuration file in the projects 'refs/meta/config' branch.
And even project inheritance is supported.

All that make such a multi strategy reviewers plugin much more sense for me.

Can someone please create a new plugins/reviewers project on Gerrit review?

David Ostrovsky

unread,
Oct 31, 2013, 4:31:53 AM10/31/13
to repo-d...@googlegroups.com, Shawn Pearce, Edwin Kempin, David Pursehouse (Sony Mobile)
So i created the first version of default-reviewers plugin on gh [1],
but i would like to host it on gerrit-review to make contribution easier:

Any chance to create a project on gerrit-review?

Edwin Kempin

unread,
Oct 31, 2013, 4:35:19 AM10/31/13
to David Ostrovsky, Repo and Gerrit Discussion, Shawn Pearce, Edwin Kempin, David Pursehouse (Sony Mobile)



2013/10/31 David Ostrovsky <david.o...@gmail.com>

So i created the first version of default-reviewers plugin on gh [1],
but i would like to host it on gerrit-review to make contribution easier:

Any chance to create a project on gerrit-review?
But at the moment I can't assign the owner permissions.
I've created the 'plugins/reviewers' group but it seems to be not yet replicated to all the nodes,
so that when I'm trying to assign permissions to this group, it is not found.
I guess it only takes some time and I will try again later.

 


Am Mittwoch, 30. Oktober 2013 16:22:37 UTC+1 schrieb David Ostrovsky:

On Wednesday, October 30, 2013 2:59:17 PM UTC+1, Sundar Shankar wrote:
David,

Is that mean, I have to compile and install this reviewers-by blame plugin ?


Unfortunately the plugin owner disagreed with my proposal to enhance
the existing reviewers-by blame plugin with new strategies, like,
fixed reviewers, per topic, per branch or even per pattern, like we are
using for watching changes.

I don't think that we should have one plugin per reviewer strategy though, but
one reviewers-plugin that can handle all them.

With Edwin's recent changes the project specific plugin configuration can
be stored in an own configuration file in the projects 'refs/meta/config' branch.
And even project inheritance is supported.

All that make such a multi strategy reviewers plugin much more sense for me.

Can someone please create a new plugins/reviewers project on Gerrit review?

--
--
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/groups/opt_out.

David Ostrovsky

unread,
Oct 31, 2013, 4:38:57 AM10/31/13
to repo-d...@googlegroups.com, Shawn Pearce, Edwin Kempin, David Pursehouse (Sony Mobile)

Am Donnerstag, 31. Oktober 2013 09:35:19 UTC+1 schrieb Edwin Kempin:



2013/10/31 David Ostrovsky <david.o...@gmail.com>
So i created the first version of default-reviewers plugin on gh [1],
but i would like to host it on gerrit-review to make contribution easier:

Any chance to create a project on gerrit-review?

Thanks! Move it there then. 

Dave Borowitz

unread,
Jan 10, 2014, 2:12:02 PM1/10/14
to David Ostrovsky, repo-discuss, Shawn Pearce, Edwin Kempin, David Pursehouse (Sony Mobile)
I've submitted the current patch set of your change in the interest of getting this out there.

mani chandel

unread,
Jan 16, 2014, 8:18:08 AM1/16/14
to repo-d...@googlegroups.com, David Ostrovsky, Shawn Pearce, Edwin Kempin, David Pursehouse (Sony Mobile)
Hi Dave,

Can you please provide the link to the patch set that you have submitted for issue 681:default reviewer.

Thanks,
Mani

Edwin Kempin

unread,
Jan 16, 2014, 8:30:00 AM1/16/14
to mani chandel, Repo and Gerrit Discussion, David Ostrovsky, Shawn Pearce, Edwin Kempin, David Pursehouse (Sony Mobile)



2014/1/16 mani chandel <mani.c...@gmail.com>

Hi Dave,

Can you please provide the link to the patch set that you have submitted for issue 681:default reviewer.

David Ostrovsky

unread,
Jan 16, 2014, 8:30:05 AM1/16/14
to repo-d...@googlegroups.com, repo-discuss

This patch was merged [1] and the plugin can be cloned as usually [2].

mani chandel

unread,
Jan 16, 2014, 8:41:14 AM1/16/14
to repo-d...@googlegroups.com
Thank You Edwin and David :-)

mani chandel

unread,
Jan 16, 2014, 9:03:28 AM1/16/14
to repo-d...@googlegroups.com

Hi Edwin/David,

I have cloned reviewers plugin to my local machine and now
I am trying to build the reviewers plugin but I am getting error.
Please let me know if I am missing something.

[mani@localhost gerrit]$ buck build plugins/reviewers:reviewers
[+] PARSING BUILD FILES...0.4s
Traceback (most recent call last):
  File "/home/mani/buck/src/com/facebook/buck/parser/buck.py", line 872, in <module>
    main()
  File "/home/mani/buck/src/com/facebook/buck/parser/buck.py", line 867, in main
    buildFileProcessor.process(build_file.rstrip())
  File "/home/mani/buck/src/com/facebook/buck/parser/buck.py", line 800, in process
    build_env['BUILD_FILE_SYMBOL_TABLE'])
  File "/home/mani/git/gerrit/./plugins/reviewers/BUCK", line 2, in <module>
    REPO = MAVEN_LOCAL
NameError: name 'MAVEN_LOCAL' is not defined
BUILD FAILED: Parse error for BUCK file ./plugins/reviewers/BUCK: End of input at line 1 column 1

Thanks,
Mani

mani chandel

unread,
Jan 16, 2014, 9:13:31 AM1/16/14
to repo-d...@googlegroups.com, Edwin Kempin, David Ostrovsky
Please advise on below error.

David Pursehouse

unread,
Jan 16, 2014, 9:46:38 AM1/16/14
to mani chandel, repo-discuss
On Thu, Jan 16, 2014 at 11:03 PM, mani chandel <mani.c...@gmail.com> wrote:

Hi Edwin/David,

I have cloned reviewers plugin to my local machine and now
I am trying to build the reviewers plugin but I am getting error.
Please let me know if I am missing something.

[mani@localhost gerrit]$ buck build plugins/reviewers:reviewers
[+] PARSING BUILD FILES...0.4s
Traceback (most recent call last):
  File "/home/mani/buck/src/com/facebook/buck/parser/buck.py", line 872, in <module>
    main()
  File "/home/mani/buck/src/com/facebook/buck/parser/buck.py", line 867, in main
    buildFileProcessor.process(build_file.rstrip())
  File "/home/mani/buck/src/com/facebook/buck/parser/buck.py", line 800, in process
    build_env['BUILD_FILE_SYMBOL_TABLE'])
  File "/home/mani/git/gerrit/./plugins/reviewers/BUCK", line 2, in <module>
    REPO = MAVEN_LOCAL
NameError: name 'MAVEN_LOCAL' is not defined
BUILD FAILED: Parse error for BUCK file ./plugins/reviewers/BUCK: End of input at line 1 column 1


MAVEN_LOCAL should be defined if you have cloned the git into the plugins subfolder of your gerrit workspace and are building it with `buck build plugins/reviewers`

mani chandel

unread,
Jan 16, 2014, 10:44:12 AM1/16/14
to repo-d...@googlegroups.com, mani chandel
Hi David,

I tried the following -

1- export MAVEN_LOCAL = /home/mani
2- export MAVEN_LOCAL = /home/mani/git/gerrit
3- Also tried setting the MAVEN_LOCAL in /reviewers/tools/download_file.py to file:///home/mani/.m2/repository

but none of them seem to work :(
Please let me know where do we need to set this variable and what value we need to set for it.

Thanks,
Mani

David Ostrovsky

unread,
Jan 16, 2014, 11:42:18 AM1/16/14
to repo-d...@googlegroups.com, mani chandel, repo-discuss

Am Donnerstag, 16. Januar 2014 16:44:12 UTC+1 schrieb mani chandel:
Hi David,

I tried the following -

I think fixed the build in [1]. Apply this cange and build either in standalone Buck mode:

cd reviewers
buck build plugin

(result is in buck-out/gen/reviewers.jar)

or with Maven:

mvn clean package

Note it would build against 2.8.1 release. If you want to build it against 2.9-SNAPSHOT
you need adjust things and deploy plugin-api-2.9-SNAPSHOT in your local Maven repository.

mani chandel

unread,
Jan 17, 2014, 5:58:08 AM1/17/14
to repo-d...@googlegroups.com, mani chandel
Hi David,

I am getting following error on using given steps.
t-plugin-api-2.9-SNAPSHOT.jar
error using curl: Command '['curl', '--proxy-anyauth', '-sfo', '/home/mani/.gerritcodereview/buck-cache/gerrit-plugin-api-2.9-SNAPSHOT.jar-a9917a1b90baf00ec7a4b2a6393fb0353fa19146', 'file:///home/mani/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.9-SNAPSHOT/gerrit-plugin-api-2.9-SNAPSHOT.jar']' returned non-zero exit status 37
BUILD FAILED: //:plugin-lib__download_bin failed with exit code 1:
OUT=/home/mani/git/gerrit/plugins/reviewers/buck-out/gen/plugin-lib/gerrit-plugin-api-2.9-SNAPSHOT.jar /bin/bash -e -c 'PYTHONPATH= python /home/mani/git/gerrit/plugins/reviewers/tools/download_file.py -o $OUT -u MAVEN_LOCAL:/com/google/gerrit/gerrit-plugin-api/2.9-SNAPSHOT/gerrit-plugin-api-2.9-SNAPSHOT.jar'

Please help.

Thanks,
Mani

David Ostrovsky

unread,
Jan 17, 2014, 6:53:57 AM1/17/14
to repo-d...@googlegroups.com, mani chandel, repo-discuss

On Friday, January 17, 2014 11:58:08 AM UTC+1, mani chandel wrote:
Hi David,

I am getting following error on using given steps.

The steps changed since yesterday ;-)
The change i linked to was replaced by another change for stable-2.8 branch [1].

With this change applied you should be able to build the plugin from the plugin directory
(not linking in Gerrit tree), with both Buck and Maven.


mani chandel

unread,
Jan 20, 2014, 8:58:46 AM1/20/14
to repo-d...@googlegroups.com, mani chandel
Hi David,
Thanks. I was able to download the plugin and also build it successfully.
Do we have any documentation where it is menationed where we can see 
how to use it plugin?

Where can I see changes in UI (to set reviewers for project) after building this plugin?

Thanks.

David Ostrovsky

unread,
Jan 20, 2014, 1:36:56 PM1/20/14
to repo-d...@googlegroups.com, mani chandel, repo-discuss

Am Montag, 20. Januar 2014 14:58:46 UTC+1 schrieb mani chandel:
Hi David,
Thanks. I was able to download the plugin and also build it successfully.
Do we have any documentation where it is menationed where we can see 
how to use it plugin?

Usualy plugins add Documentation/config.md file where the configuration is described [1].
 

Where can I see changes in UI (to set reviewers for project) after building this plugin?


For now you can only do it per project.config as described. Once this series is merged [2],
we can expose simple plugin configuration parameters on Project Info screen dynamically.
Next step would be to make configuration of parameter lists exposable and one day generic
ReviewerSuggestOracle for user and groups, like in CS2?


mani chandel

unread,
Jan 27, 2014, 5:38:13 AM1/27/14
to repo-d...@googlegroups.com, David Ostrovsky, Edwin Kempin
Hi David,

I saw that the [1] series of changes that you mentioned have now been merged into gerrit.
Does this mean that now we add default reviewers through the UI ?


Thanks,
Mani

David Ostrovsky

unread,
Jan 27, 2014, 5:59:05 PM1/27/14
to repo-d...@googlegroups.com, Edwin Kempin, repo-discuss

Am Montag, 27. Januar 2014 11:38:13 UTC+1 schrieb mani chandel:
Hi David,

I saw that the [1] series of changes that you mentioned have now been merged into gerrit.
Does this mean that now we add default reviewers through the UI ?

Not yet, this approach must be extended to support lists for that.

mani chandel

unread,
Jan 28, 2014, 2:50:40 AM1/28/14
to repo-d...@googlegroups.com
Hi David, Ok. So can you please let me know if any changes have already been submitted for that? Also after that list of changes is merged how do they impact or help default reviewer plugin?

David Ostrovsky

unread,
Jan 28, 2014, 7:25:13 AM1/28/14
to repo-d...@googlegroups.com, repo-discuss

On Tuesday, January 28, 2014 8:50:40 AM UTC+1, mani chandel wrote:
Hi David, Ok. So can you please let me know if any changes have already been submitted for that?

Not yet, but that shouldn't be hard to do:

ProjectConfigEntry must be extended to support MULTIPLE config entry types or some such [1].
For now it only supports:

public enum Type {STRING, INT, LONG, BOOLEAN, LIST}

This must be reflected on the client and server sides:

* Client: ProjectInfoScreen must render the UI for this type somehow. May be as a text area, then can be split?
* Server: the corresponding section in project.config must be saved:

So from these line in the text area:


This section must be created:

  1. [plugin "reviewers"]
  2.     reviewer = john...@example.com
  3.     reviewer = jane...@example.com
 

 Also after that list of changes is merged how do they impact or help default reviewer plugin?

Once ProjectConfigEntry and the friends were extended, It must be bound in the reviewer plugin.
Check this example in cookbook-plugin, that activates number of project config entries [2].


David Ostrovsky

unread,
Mar 12, 2014, 3:04:08 AM3/12/14
to repo-d...@googlegroups.com

Am Dienstag, 28. Januar 2014 08:50:40 UTC+1 schrieb mani chandel:
Hi David, Ok. So can you please let me know if any changes have already been submitted for that?  Also after that list of changes is merged how do they impact or help default reviewer plugin?

On current master (Gerrit & reviewers plugin) reviewers can be added/changed on project info screen.
No need to edit project.config file manually. 

mani chandel

unread,
Mar 12, 2014, 9:33:00 AM3/12/14
to repo-d...@googlegroups.com
Hi David,

I have a few queries regarding the existing functionality available for setting the default reviewers.
 
1. Is it possible to set the default reviewers per branch?
2. Is it possible to define project configurations per project either in the parent project or in a separate configuration file.
a. E.g. in our case we have different +2 reviewers for almost every component which we make changes to. It’s quite complex to define the reviewers in each project’s project.config file. Would help a lot if you could do the definitions to a parent project or  to a separate common configuration file for defined projects.

In case the above is currently not available, can you please let me know if it is feasible to add these functionality 
and also guide us with an initial pointer so we can start working upon it?

Thanks.
Message has been deleted

Gouranga Panigrahi

unread,
Mar 24, 2014, 5:46:30 AM3/24/14
to repo-d...@googlegroups.com
Hi David,

I am trying to add default reviewers to a project using Reviewer plugin.
For this I followed these steps:
1 -Installed the Reviewer plugin in my local environment. It installed successfully. 
2- I am able to see the Reviewer plugin field in the project config page now.
3- Here I added a reviewer for a project (tested adding with both emailId and username) and saved it.
4- Logged in with the added reviewer and clicked on My changes link to see the change here 
   but that change wasn't appearing.
Also, in the change, I was not able to see the added reviewer.

Please let me know if I am missing anything here.

Thanks
Gouranga
Reviewer_plugin.png

David Ostrovsky

unread,
Mar 24, 2014, 1:57:38 PM3/24/14
to repo-d...@googlegroups.com
Am Montag, 24. März 2014 02:46:30 UTC-7 schrieb Gouranga Panigrahi:
Hi David,

I am trying to add default reviewers to a project using Reviewer plugin.
For this I followed these steps:
1 -Installed the Reviewer plugin in my local environment. It installed successfully. 
2- I am able to see the Reviewer plugin field in the project config page now.
3- Here I added a reviewer for a project (tested adding with both emailId and username) and saved it.
4- Logged in with the added reviewer and clicked on My changes link to see the change here 
   but that change wasn't appearing.

Reviewer plugin is based on PatchSetCreatedEvent.
So you have to upload a new patch set to see it in action.

Gouranga Panigrahi

unread,
Mar 25, 2014, 2:12:37 AM3/25/14
to repo-d...@googlegroups.com
Hi David,

I uploaded a new patchset as per your suggestion and tried but still the change isn't appearing for the added reviewer.

Let me rephrase the steps i did for the above.

1. Created three users gouranga admin(Admin), gouranga developer, gouranga developer1.
2. Uploaded a change through the user gouranga developer and uploaded new patchsets as per 1.png.
3. Logged in with gouranga admin(Admin) and added the reviewer gouranga developer1(goura...@gmail.com) for the
    project in the reviewer plugin as per 2.png
4. Logged in with the gouranga developer1 and clicked on My changes link to see the change here but that change wasn't appearing.

Am i doing the steps right or missing something here ?
Please suggest.

Thanks
Gouranga
1.png
2.png

Gouranga Panigrahi

unread,
Mar 26, 2014, 1:50:35 AM3/26/14
to repo-d...@googlegroups.com
Hi David,

Any Suggestions on the above ?



On Tuesday, March 25, 2014 11:42:37 AM UTC+5:30, Gouranga Panigrahi wrote:
Hi David,

I uploaded a new patchset as per your suggestion and tried but still the change isn't appearing for the added reviewer.

Let me rephrase the steps i did for the above.

1. Created three users gouranga admin(Admin), gouranga developer, gouranga developer1.
2. Uploaded a change through the user gouranga developer and uploaded new patchsets as per 1.png.
3. Logged in with gouranga admin(Admin) and added the reviewer gouranga developer1(gourangabam@gmail.com) for the

David Pursehouse

unread,
Mar 26, 2014, 2:33:19 AM3/26/14
to Gouranga Panigrahi, repo-discuss
On Tue, Mar 25, 2014 at 10:50 PM, Gouranga Panigrahi <goura...@gmail.com> wrote:
Hi David,

Any Suggestions on the above ?



Possible reasons that there has not been a reply in the 11 hours since your previous question:

- Nobody knows the answer

- Everybody is busy with other work

- They are deliberately not answering, in the hope that you'll start to make a little more effort to figure it out by yourself

 

On Tuesday, March 25, 2014 11:42:37 AM UTC+5:30, Gouranga Panigrahi wrote:
Hi David,

I uploaded a new patchset as per your suggestion and tried but still the change isn't appearing for the added reviewer.

Let me rephrase the steps i did for the above.

1. Created three users gouranga admin(Admin), gouranga developer, gouranga developer1.
2. Uploaded a change through the user gouranga developer and uploaded new patchsets as per 1.png.
3. Logged in with gouranga admin(Admin) and added the reviewer gouranga developer1(gourangabam@gmail.com) for the
    project in the reviewer plugin as per 2.png
4. Logged in with the gouranga developer1 and clicked on My changes link to see the change here but that change wasn't appearing.

Am i doing the steps right or missing something here ?
Please suggest.


I've never used this plugin, but it seems pretty obvious that you need to add the expected reviewers in the settings BEFORE you upload the patch sets.

Gouranga Panigrahi

unread,
Mar 26, 2014, 2:41:18 AM3/26/14
to repo-d...@googlegroups.com, Gouranga Panigrahi
Hi David,

Thanks for the suggestion. I tried with the order you suggested but no luck :(
Is there any documentation for the same which could be helpful.

Thanks
Gouranga


On Wednesday, March 26, 2014 12:03:19 PM UTC+5:30, David Pursehouse wrote:
On Tue, Mar 25, 2014 at 10:50 PM, Gouranga Panigrahi <goura...@gmail.com> wrote:
Hi David,

Any Suggestions on the above ?



Possible reasons that there has not been a reply in the 11 hours since your previous question:

- Nobody knows the answer

- Everybody is busy with other work

- They are deliberately not answering, in the hope that you'll start to make a little more effort to figure it out by yourself

 

On Tuesday, March 25, 2014 11:42:37 AM UTC+5:30, Gouranga Panigrahi wrote:
Hi David,

I uploaded a new patchset as per your suggestion and tried but still the change isn't appearing for the added reviewer.

Let me rephrase the steps i did for the above.

1. Created three users gouranga admin(Admin), gouranga developer, gouranga developer1.
2. Uploaded a change through the user gouranga developer and uploaded new patchsets as per 1.png.
3. Logged in with gouranga admin(Admin) and added the reviewer gouranga developer1(goura...@gmail.com) for the

    project in the reviewer plugin as per 2.png
4. Logged in with the gouranga developer1 and clicked on My changes link to see the change here but that change wasn't appearing.

Am i doing the steps right or missing something here ?
Please suggest.

David Pursehouse

unread,
Mar 26, 2014, 3:47:51 AM3/26/14
to Gouranga Panigrahi, repo-discuss
On Tue, Mar 25, 2014 at 11:41 PM, Gouranga Panigrahi <goura...@gmail.com> wrote:
Hi David,

Thanks for the suggestion. I tried with the order you suggested but no luck :(
Is there any documentation for the same which could be helpful.


The only documentation is in the plugin itself.  I had a look at the config.md and found that the content of project.config is different to what it says there.

Digging a bit deeper, it turns out that the plugin is in fact broken :(

This change seems to fix it:





 

--
--
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.

Gouranga Panigrahi

unread,
May 21, 2014, 5:23:00 AM5/21/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, david.o...@gmail.com
Hi David O,

I am working on issue 681 where i have to add default reviewers per branch.

Currently we can add reviewers at project level using reviewer plugin.

As Is scenario (in project.config):
[plugin "reviewers"]
    reviewer = <email>

Scenario to be implemented (so that reviewer is added per branch of project):
[plugin "reviewers"]
    reviewer = <email> <branch>

However, now when I am trying too add reviewer via backend I am unable to do so.
although I can add via UI.
So can you tell me if adding reviewer via backend is now disabled?
If I need to add reviewer per branch can it only be done via UI now  or I need to enable this feature from backend and then extend it to UI later?

Thanks.
Gouranga

David Ostrovsky

unread,
May 21, 2014, 6:25:10 AM5/21/14
to repo-d...@googlegroups.com, Gouranga Panigrahi

Am Mittwoch, 21. Mai 2014 11:23:00 UTC+2 schrieb Gouranga Panigrahi:
Hi David O,

I am working on issue 681 where i have to add default reviewers per branch.

Currently we can add reviewers at project level using reviewer plugin.

As Is scenario (in project.config):
[plugin "reviewers"]
    reviewer = <email>

Scenario to be implemented (so that reviewer is added per branch of project):
[plugin "reviewers"]
    reviewer = <email> <branch>

However, now when I am trying too add reviewer via backend I am unable to do so.
although I can add via UI.

I am not following. What do you mean by "add reviewer via backend"
and "adding reviewer via UI"? 

Gouranga Panigrahi

unread,
May 21, 2014, 6:43:08 AM5/21/14
to repo-d...@googlegroups.com, Gouranga Panigrahi
Hi David O,

Adding via UI meaning:
Currently after installing reviewer plugin in gerrit, a text box gets added in the projectinfo screen where 
we can add the default reviewer for the project and save.

Adding via backend meaning:
Previously the same feature was achieved by adding the default reviewer in the project.config file manually as below:

[plugin "reviewers"]
    reviewer = <email>


Is it still possible to add reviewers by adding them to project.config manually? or only via UI now?
To add reviewer per branch, I am planning to implement the following functionality in project.config and later extend to UI.
[plugin "reviewers"]
    reviewer = <email> <branch>
Please suggest on this approach.

Thanks
Gouranga

David Ostrovsky

unread,
May 21, 2014, 7:42:53 AM5/21/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)

Am Mittwoch, 21. Mai 2014 12:43:08 UTC+2 schrieb Gouranga Panigrahi:
Hi David O,

Adding via UI meaning:
Currently after installing reviewer plugin in gerrit, a text box gets added in the projectinfo screen where 
we can add the default reviewer for the project and save.

Adding via backend meaning:
Previously the same feature was achieved by adding the default reviewer in the project.config file manually as below:

[plugin "reviewers"]
    reviewer = <email>


Is it still possible to add reviewers by adding them to project.config manually? or only via UI now?
To add reviewer per branch, I am planning to implement the following functionality in project.config and later extend to UI.
[plugin "reviewers"]
    reviewer = <email> <branch>
Please suggest on this approach.

OK, the wording "adding reviewers" is confusing in this context: you are configuring users to be added by the plugin.

Anyway, adding Edwin and David P. to this thread, as they commented on my original
change [1] to extend the functionality of reviewers-by-blame plugin to add different strategies.
In his comment on 20.10.2013 Edwin suggested to use something like:

[reviewers "branch:master"]
reviewer = MyProject-Developers
reviewer = q...@test.com

This would mean, to move the configuration to plugin specific configuration file. e. g. reviewers.config,
because plugin name must be replaced with branch name and generic project configuration with
the ability to configure it on "Project Info screen" would be missing. Right?

@Edwin, David any comments on that?

Oct 20, 2013

Edwin Kempin

unread,
May 21, 2014, 8:30:12 AM5/21/14
to David Ostrovsky, Repo and Gerrit Discussion, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)
I agree that we should keep future extensibility in mind here and that we should think carefully about
the config format. I'm still undecided which is the best format for this, but likely a single section in project.config
is not enough for this and we need an own "reviewers.config" config file for the plugin.

I still like the config format as proposed above. What is important here is that it is NOT hard-coding to
match changes by branch, but that any query can be specified as subsection name, e.g. to add a default
reviewer for all changes in master that touch file "Foo.java" you would simply write:
[reviewers "branch:master file:Foo.java"]

reviewer = MyProject-Developers
reviewer = q...@test.com

This is similar to how watching of changes works and shouldn't be too difficult to implement.

Default reviewers for all changes of a project would go directly into the "reviewers" section:
[reviewers]
reviewer = MyProject-Qualifiers

For other strategies new key/value pairs can be added to the sections, e.g. "maxByBlame = 2".

Unfortunately as you pointed out having an own config file means that the generic project configuration UI
cannot be used for editing anymore since it doesn't support plugin configuration in own config files yet.

Maybe we could then add a plugin screen that is similar to the project watches screen.
A question is also whether we want a user to be able to add himself as default reviewer for certain changes (similar
to watching changes) or if this should be configured by the project owners?

 

--

David Ostrovsky

unread,
May 21, 2014, 9:00:31 AM5/21/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)
Thanks! To restrict the configuration to project owner only should be OK.

So the next steps would be:

1. move the configuration from project.config to reviewers.config
2. extend the plugin configuration as suggested above, to support:

* branch = foo
* dir = bar
* file = baz

3. restrict the plugin configuration to project owners only
4. add (GWT) screen to enable plugin configuration per UI (like in serviceuser plugin)

Sounds like a plan?

Edwin Kempin

unread,
May 21, 2014, 9:15:50 AM5/21/14
to David Ostrovsky, Repo and Gerrit Discussion, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)
At least we can start with this. I believe it is useful for users too. E.g. I want to
configure myself that I'm automatically added on changes of my peer reviewer.
But this can be done later.
 

So the next steps would be:

1. move the configuration from project.config to reviewers.config
2. extend the plugin configuration as suggested above, to support:

* branch = foo
* dir = bar
* file = baz
Actually I meant that we should support the existing search operators
Means no "dir", but only "file", but also others. e.g. "owner" would make sense for peer reviewers
or if I'm mentor of a new colleague. "topic" and "message" should be useful too.



3. restrict the plugin configuration to project owners only
Nothing to do for this. The plugin configurstion is stored in refs/meta/config which is by default
restricted to project owners.
 
4. add (GWT) screen to enable plugin configuration per UI (like in serviceuser plugin)

Sounds like a plan?

Gouranga Panigrahi

unread,
May 22, 2014, 8:18:39 AM5/22/14
to repo-d...@googlegroups.com, David Ostrovsky, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)
Hi Edwin/David O,

Can you please confirm if you are planning to add this feature as an extension to the existing functionality of reviewers-by-blame plugin ?

Thanks
Gouranga

Edwin Kempin

unread,
May 22, 2014, 8:22:56 AM5/22/14
to Gouranga Panigrahi, Repo and Gerrit Discussion, David Ostrovsky, Edwin Kempin, David Pursehouse (Sony Mobile)
2014-05-22 14:18 GMT+02:00 Gouranga Panigrahi <goura...@gmail.com>:
Hi Edwin/David O,

Can you please confirm if you are planning to add this feature as an extension to the existing functionality of reviewers-by-blame plugin ?
I think this is about the 'reviewers' plugin [1] and not about the 'reviewers-by-blame' plugin.
But no, I'm currently neither working on this nor plan to work on it soon.
It would be nice to work on it, but I'm busy with other tasks.

Gouranga Panigrahi

unread,
May 22, 2014, 9:19:39 AM5/22/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, David Ostrovsky, Edwin Kempin, David Pursehouse (Sony Mobile)
Thanks Edwin,

I had one more query. Is it still possible to add reviewers at project level by adding them to project.config manually? or only via UI now?

Thanks
Gouranga

Edwin Kempin

unread,
May 23, 2014, 9:41:50 AM5/23/14
to Gouranga Panigrahi, Repo and Gerrit Discussion, David Ostrovsky, Edwin Kempin, David Pursehouse (Sony Mobile)
2014-05-22 15:19 GMT+02:00 Gouranga Panigrahi <goura...@gmail.com>:
Thanks Edwin,

I had one more query. Is it still possible to add reviewers at project level by adding them to project.config manually?
This functionality should be kept.

Gouranga Panigrahi

unread,
May 27, 2014, 2:11:36 AM5/27/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, David Ostrovsky, Edwin Kempin, David Pursehouse (Sony Mobile)
Hi Edwin,

I tried to add a default reviewer at project level by adding it into project.config file and tested but the reviewer didn't get added. Can you please confirm if this feature still exists or i am missing anything ?

Thanks
Gouranga

Edwin Kempin

unread,
May 27, 2014, 2:14:31 AM5/27/14
to Gouranga Panigrahi, Repo and Gerrit Discussion, David Ostrovsky, Edwin Kempin, David Pursehouse (Sony Mobile)
2014-05-27 8:11 GMT+02:00 Gouranga Panigrahi <goura...@gmail.com>:
Hi Edwin,

I tried to add a default reviewer at project level by adding it into project.config file and tested but the reviewer didn't get added. Can you please confirm if this feature still exists or i am missing anything ?
Have you installed the reviewers plugin?

Gouranga Panigrahi

unread,
May 27, 2014, 2:15:56 AM5/27/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, David Ostrovsky, Edwin Kempin, David Pursehouse (Sony Mobile)
Yes Edwin i have installed it.

Edwin Kempin

unread,
May 27, 2014, 2:16:31 AM5/27/14
to Gouranga Panigrahi, Repo and Gerrit Discussion, David Ostrovsky, Edwin Kempin, David Pursehouse (Sony Mobile)
2014-05-27 8:15 GMT+02:00 Gouranga Panigrahi <goura...@gmail.com>:
Yes Edwin i have installed it.
Then I don't know. I wasn't using this plugin yet.

David Ostrovsky

unread,
May 27, 2014, 3:11:25 AM5/27/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)

Am Dienstag, 27. Mai 2014 08:11:36 UTC+2 schrieb Gouranga Panigrahi:
Hi Edwin,

I tried to add a default reviewer at project level by adding it into project.config file and tested but the reviewer didn't get added. Can you please confirm if this feature still exists or i am missing anything ?


There was a regression in reviewers plugin, that was fixed by David in [1].
Make sure that you have that fix installed.


Gouranga Panigrahi

unread,
May 27, 2014, 4:56:55 AM5/27/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)
Hi David O,

Yes, i have this fix installed in my local.

Thanks
Gouranga

David Ostrovsky

unread,
May 27, 2014, 5:41:40 PM5/27/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)

Am Dienstag, 27. Mai 2014 10:56:55 UTC+2 schrieb Gouranga Panigrahi:
Hi David O,

Yes, i have this fix installed in my local.

So i recheked against Gerrit master and newest available version of reviewers plugin.
It works as expected for project specific configuration (not touching All-Projects).

Here are my steps:

* set up fresh Gerrrit site
* install reviewers plugin
* create project test
* create user foo (admin)
* create user bar (b...@example.org)
* add default reviewer: b...@example.org on project config UI for project test
* save project specific configuration (save button)
* checkout refs/meta/config and check the content:

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
[plugin "reviewers"]
          reviewer = b...@example.org
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Reformat the project.config (just test):

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
[plugin "reviewers"]
reviewer = b...@example.org
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

* commit and push the project.config change
* restart Gerrit
* commit and push change for project test for review on behalf of user foo
* open change screen new change

As expected user bar was added as reviewer

Gouranga Panigrahi

unread,
May 29, 2014, 2:15:36 AM5/29/14
to repo-d...@googlegroups.com, Gouranga Panigrahi, Edwin Kempin, David Pursehouse (Sony Mobile)
Hi David O,

Thanks for your analysis.
Actually i am little bit confused with the above steps. Please correct me if i am wrong.
You have added the reviewer in the UI first and then have pushed it to project.config.
But adding it in the UI and uploading a new patchset to the change alone adds the reviewer for that change(Tested in my local).
So my doubt is why there is again a need to push it to project.config

Thanks
Gouranga
Reply all
Reply to author
Forward
0 new messages