Skip to content

Gerrit for Maintainers

Nigel Babu edited this page Sep 11, 2017 · 2 revisions

Watching projects

As a maintainer, you may not have time to look at all the review requests to determine which ones touch your component. It is useful to watch projects so you can receive notifications. You can configure your settings so you get an email if change has modifed files in certain folders or even down to a particular file. Here's how you set it up.

  • Once you're logged in, click on your name in the top right corner and click on settings.

  • Now click on "Watched Projects" in the left sidebar.

  • Under "Project Name", put "glusterfs".

  • Under "Only If" you can sort of put in how you want to limit the results. For instance, if you want to watch the "xlators/features/arbiter" and "xlators/cluster/afr" folders, here's what you'd put:

    path:"^xlators/features/arbiter/." OR file:"^xlators/cluster/afr/."

    Please refer to the full documentation1 for path parameter.

  • You can also select when you want an email. I recommend selecting all but "Abandoned Changes".

Creating Dashboards

Building your own dashboard

Gerrit lets you build custom dashboards on the fly. We have a dashboard for master, which can be used for all the bits you care about. Again, taking the example of arbiter and afr, here's a dashboard for that:

AFR Dashboard

Breaking that down

# The URL where all dashboards begin
https://review.gluster.org/#/dashboard/?

# This is the main query. All the remaining sections apply filters to the results of this query. Notice the bit with path. It is the same as the one we put in the watch expression above but in braces so the OR is applied only to the path.
foreach=status:open project:glusterfs branch:master (path:"^xlators/features/arbiter/.*" OR file:"^xlators/cluster/afr/.*") NOT age:90d

# This is the title of the review page
&title=Review Inbox

# You most likely do not want to touch anything in the sections below.

# Subsection called Possible to merge
&Possible to Merge=label:Code-Review>=1 AND -label:Code-Review<=-1 AND label:CentOS-regression=1 AND label:Smoke=1

# Subsection where the reviewer or the author needs to perform actions
&Awaiting Reviews Or Regression=-(label:Code-Review>=1 AND -label:Code-Review<=-1 AND label:CentOS-regression=1 AND label:Smoke=1) (-label:CentOS-regression=-1 AND -label:Smoke=-1 AND -label:Code-Review<=-1)

# Subsections where no merge is possible at this momment.
&Regression Failure or Review Action Needed=(label:CentOS-regression=-1 OR label:Smoke=-1 OR label:Code-Review<=-1)

If you have a custom dashboard for yourself, you can add it to your menu, by going to Settings -> Preferences. Remember to add from the first #/dashboard onwards like the rest of the URLs. Only you can see these links.

If you cannot get it working, talk to me.