WorkingWithReviews

Not logged in - Log In / Register

Revision 1 as of 2009-05-25 09:47:51

Clear message

Describe WorkingWithReviews here.This page covers the process for effectively dealing with code and design reviews.

Overview

During the development of a feature from concept to rollout there are a number of reviews that occur. The first review process is the SpecificationProcess where the concept is examined and refined into a plan. This plan is eventually signed off by the appropriate manager. Some time later, a coder will start to implement it. When they are about to do this a DesignPhoneCall takes place, which is a verbal review of the design of the planned implementation. Finally, once the code is complete the PreMergeReviews process takes place.

Specification reviews

Please see SpecificationProcess for the specification workflow.

Design reviews

Design reviews are conducted by a DesignPhoneCall between a coder and a reviewer. The review aims to ensure that the resulting code will have few or no structural problems, which makes review of the code easier and faster.

Code reviews

Once your code is complete, it must go through the PreMergeReviews process to be accepted into the central trunk.

Please be sure to use the bzr review-submit plugin to submit your branch for review.

Handling review responses

The story starts with you putting your branch in the general queue on PendingReviews. From there the branch is assigned to a reviewer within 1 working day. At this point you can nag your reviewer effectively until he reviews your branch.

Once your reviewer has had time to go over the modifications, he will email you back, CC: launchpad-reviews, with a description of areas or items that need to be fixed, modified or improved in your code. He may also write special recommendations, commend you for your code quality, or ask questions if unclear on domain specifics or obscure functionality.

You must respond to each individual suggestion and question made by your reviewer; one of the main dangers with reviews is wasting the reviewer's time by ignoring or forgetting to deal with some specific issue, and the reviewer can't be expected to go through and ensure each item was dealt with --- please make an effort to ensure you respond accurately to reviews.

One or more review cycles will be necessary per-modification; the number of cycles will depend on the amount of code changed, the increasing familiarity of the reviewer with your code, and of course the quality of the code produced.

You may only merge once the reviewer has approved the modification.

Small branches are faster to review than large ones - a branch that is twice as big as another takes more than twice as long to review. Please try to keep branches small and focused.

Review tags

During the review process, you should keep your branch tags updated correctly in

The tags are meant to give better feedback of where the review stands, and will allow the review status page to show the branches clearly.

The tags may assume one of the following strings:

Also, if your branch was reviewed by a mentored reviewer (a.k.a. a recruit), your review status will have a '*' appended to it. This means that the mentor has not yet signed off on the review. You may never land a starred branch. Once the recruit's mentor has signed off on the branch, the recruit will remove the star and then the review status may be acted on. It's your responsibility to ping your reviewer if your branch is sitting in merge-approved* or merge-conditional*. That way, your reviewer can bug his mentor to perform the oversight sign off.

There is usually a cycle between needs-review and needs-reply and finally ending with one of the merge tags. When you have replied to the reviewer, change the tag to needs-review; when the reviewer has reviewed (and possibly re-reviewed) the branch, he will move it back to needs-reply. Spiv's diagram summarizes:

                             .--------------------.
                             |                    |
                             v                    |
                     .--------------.      .-------------.
        START --->   | needs-review | ---> | needs-reply |
                     '--------------'      '-------------'
                            /|\
 .-------------------.     / | \     .----------------.
 | merge-conditional | <--'  |  '--> | merge-approved |
 '-------------------'       |       '----------------'
                             |
                    .------------------.
                    | work-in-progress |
                    '------------------'

Dealing with Conflicts

If, after a successful review process, you submit your code to PQM only to find conflict you need to resolve the conflicts:

  1. Merge rocketfuel onto your reviewed branch, resolve the conflict, push, and submit another merge request.

If, in the process of resolving conflicts, you make non-trivial changes to the code, you should consider having those changes reviewed before attempting to merge them.

The merge message

Each merge message must include an item indicating who the reviewer of the change was. There are a few special-cases involved, so the rules for the merge message are detailed below individually:

Make it so

When you are ready to submit your branch to pqm for merging, use the following command (from RocketFuelSetup):

bzr pqm-submit -m '[r=reviewer] description of changes'

where [r=reviewer] is the most common case, but may be substituted with any review status from above as appropriate. Here's an example:

bzr pqm-submit -m'[r=BjornT] Fix bug 523.'

If you like being extra cautious, you might want to use the --dry-run option first, just to check that everything is in order before submitting:

bzr pqm-submit --dry-run -m'[r=BjornT] Fix bug 523.'

After you've merged

Once your branch or patch has landed, you should visit PendingReviews and remove the branch.