Code/MergeQueues

Not logged in - Log In / Register

User Stories

Single Developer Project

Every once in a while, Paul gets a random contribution to a project that he works on by himself. Managing those merges is pretty simple, since he only has one branch that he works on. He merely merges the proposed branches in as he works on other issues. He does not need a merge queue at all.

Small development Project

Tarmac has a few main contributors. The development focus branch is owned by a team, but no one commits directly to it. It's contributors have rules for reviews and landings. Paul gets tired of landing each contribution himself, but it only makes sense to have a point of all the merges.

Paul sets up a queue to manage the Tarmac mainline branch. He goes to the Tarmac "trunk" branch, and clicks "Manage with a queue." He is presented with two choices: Use an existing queue or create a new queue. He chooses to create a new queue. He is taken to a queue creation page where he can set the queue's name, owner, and initial configuration values.

After the queue is created, Paul uses Tarmac to configure more things about the queue that are specific to each branch. He does this using the "tarmac configure" command, and sets the configuration through the API. He chooses to set the review count requirements to require 2 Approve reviews and no Disapprove reviews. He also chooses to run the command "trial tarmac.tests" to make sure the tests pass before the branch lands. This information is all stored in a JSON string as part of the queue.

When a review is complete, it can be queued for merging by any person who has "write" permissions to the branch. The source branch is then added to the merge queue for the target branch. Since Tarmac manages merges on the assigned queue, it will periodically look at the queue and merge branches.

On a normal interval, Tarmac will look at the merge queue (through the Launchpad API) and automatically handle merges in the queue. Tarmac will do its thing, and upon successful merging, it will set the merge proposal as "Merged" and set the merged revno.

Failed merge

If Tarmac fails to merge the branch, it will remove the entry from the merge queue and comment on the merge proposal with the failure message. It is then left to the user to handle the issue and then get the merge queued again.

Multiple branch development

Bazaar has many contributions every day, across two release series branches and trunk. It is simply unrealistic to expect someone to manage the merging of all of these branches and still maintain quality. In this case, the merge queue will be set up to manage these multiple branches.

When $BAZAAR_RELEASE_MANAGER cuts a release of Bazaar, he/she will make sure that the series branch for that release is managed by a queue (whether it be the same as others, or another queue to prevent choking). By joining an existing queue, Tarmac would merely need to be configured for that new branch, and then Tarmac could handle those merges at the same time that it handles other merges.

Multiple branch development (with varying priorities)

The Launchpad team manages MANY branches (launchpad, lazr-js, bzr-builder, etc.). In the case of launchpad, there are a few branches that are high priority and should be dealt with immediately. Instead of having all branches be on the same queue, the high priority branches are put on their own queues, so that they can be dealt with immediately, while merges that don't need to be performed immediately can be left on the larger queue.

Operational Queue Management

Paul, a member of the Launchpad team, says "ZOMG! I need my queued merge to be bumped up the queue." Paul can go to the authorized user (the owner of the queue), and ask them to bump their merge up the queue. The owner then simple goes to the queue view and drag/drops the item into its new state in the queue, quickly dealing with this issue. Paul then writes a letter of apology to the Launchpad list for having to cut in line.

Mockups

Branch page

Person page

Person queue listing Branch merge proposal page

Branch merge queue page

Questions

  1. How can we get tarmac to know about the "restricted mode" for a queue?

Code/MergeQueues (last edited 2010-09-16 21:26:55 by rockstar)