Jump to: navigation, search

ReviewWorkflowTips

Revision as of 17:31, 28 February 2014 by Daniel Berrange (talk | contribs) (Review Workflow Tips)

Review Workflow Tips

Tools

  • git review - The same tool we use for submitting patches for review has some options that assist with the review process. See the git-review man page for more details.
  • ReviewDay - A dashboard that prioritizes reviews based on blueprint/bug priority and automated test results
  • next-review - A command line to help you choose the next review to do, primarily based on its age while automatically skipping what you have already reviewed. The tool can also dump a list sorted by its logic, which is helpful if you want to choose from a sorted list.
  • Important Changes - A prioritized list of reviews built in to gerrit.
  • Emacs Gerrit Download - An Emacs mode to download and show reviews.
  • Gerrit View - Command line tools for querying and watching gerrit

Gerrit Queries

You can create a query that shows you the reviews across multiple projects and branches at the same time. For example:

https://review.openstack.org/#/q/status:open+(project:openstack/nova+OR+project:openstack/python-novaclient+OR+project:openstack/oslo-incubator+OR+project:openstack/oslo.config)+(branch:master+OR+branch:stable/grizzly),n,z

More useful queries: http://lists.openstack.org/pipermail/openstack-dev/2013-September/015705.html

Querying with qgerrit

The qgerrit tool is a command line utility distributed with the "Gerrit View" package that facilitates the querying of gerrit to determine candidates for review.

Tailoring the list of reviews to projects and files

When invoked with no arguments it will report all pending reviews across all projects. A first step in reducing the amount displayed is to filter based on the project

$ qgerrit --project openstack/nova

For a project like Nova, this will still produce a very long list. It can thus be helpful to look at specific areas of the code tree. The qgerrit tool accepts a list of positional arguments, which are used to match against filenames in the reviews. So to filter the list of reviews to only those which touch a file with "libvirt" in the name

$ qgerrit --project openstack/nova libvirt

The arguments are actually regular expressions, not merely substrings, so it is possible to get inventive to look just as libvirt test files

$ qgerrit --project openstack/nova tests/.*libvirt

Identifying changes needing review

To identify changes that haven't had any negative review feedback, qgerrit can be told to only show changes with a code review score of 0 or better

$ qgerrit --project openstack/nova -a c0

Identifying changes for approval

To further identify changes that are ready to be approved, qgerrit can be told to filter based on the code review score where there is no negative karma and at least one +2

$ qgerrit --project openstack/nova -a c2

Identifying changes you have not reviewed

To identify changes where you have not personally commented on the latest patch series

$ qgerrit --project openstack/nova -w ^berrange

Customizing the data display

The list of columns displayed by the qgerrit tool can be customized using the '-f' argument. For example to display the URL, branch, owner, truncated subject line, update/creation dates and approval score only, sorting by creation date

$ qgerrit \
  -f url -f branch -f owner -f subject:80 
  -f lastUpdated -f createdOn \
  -f approvals --sort createdOn 

Other Tips