Not logged in - Log In / Register

This page describes the "master" branches for Launchpad development. Please ask for help immediately if you have any questions.

Where's trunk?

Launchpad has four master branches (this is unusual; most projects only have one). All four are owned by launchpad-pqm, the Patch Queue Manager. They are:

  1. devel Where most development takes place (except anything that involves changing the database schema; see below).

  2. db-devel Changes that modify the database schema get merged here first.

  3. stable This is fed by regular merges from the devel branch, and is deployed to daily.

  4. db-stable This is fed by regular merges from the db-devel branch. It is deployed to daily, and deployed to on each release. After release, db-stable is merged back into devel, completing the cycle.

In summary: db-stable is the post-test-run counterpart of db-devel, and stable is the post-test-run counterpart of devel, where "post-test-run" means that once code hits foo-devel it is only cleared into foo-stable if the buildbot test runner succeeds.

db-devel is also the default stacking branch for other Launchpad branches, as it usually has almost all of the revisions that are present in any of the four trunk branches.

If you want to know how all of this works behind the scenes, read Trunk/Glue (after reading the rest of this page).

Look at the Pretty Pictures

Diagrams might be the best way to understand this. (If they don't work, there's text afterwards, don't worry.)


Below, we break the process down a bit with a different diagramming approach. Here's what happens when you submit to devel:


Where are the expected potential problems in the process? Glad you asked!


It is also possible to submit directly to the db-devel branch.


Let's Try That in Words

Database changes can be destabilizing to other work, so we isolate them out into a separate branch (db-devel). Then there are two arenas for stabilizing changes for deployment: stable (which ends up on edge and is fed from the devel branch), and db-stable (which ends up on staging and is fed from the db-devel branch).

In summary:

Problems that can occur

Where to Send Merge Requests

Merge requests that do any of the following should be sent via PQM to the db-devel branch:

All other developer merge requests for the launchpad tree should be addressed to the devel branch.

The current script on the PQM box monitors buildbot to discover what revisions have passed the tests. When a new revision is "blessed" by buildbot, the script copies it over to stable. The poller script generates a merge request to PQM for merging the blessed revision with the db-devel branch. It is also responsible for checking a new buildbot build testing db-devel. The poller will copy revisions of db-devel that buildbot blesses to db-stable.

Staging releases and production releases should run code from db-stable. edge should continue to run code from stable.

When a production release is made, the db-stable code should be pushed to devel and stable before opening devel back up to commits (that is, turning off release-critical mode, or something even stricter). At the moment, we expect this push to be a manual job for LOSAs after a software maintenance.

Problems with the automated merge requests are sent to the Launchpad list (TODO: which list?). The PQM merge request is signed with a key associated with the Launchpad list email address; PQM will send any merge failure email to the Launchpad list.

When fixing a [testfix] or a merge error, reply to the email that was sent to the mailing list with the resolution of the issue.

When the merge of stable -> db-devel does not work automatically, it should be done manually and submitted. The tests do not need to be run (rationale: the bots don't run the tests when they do it automatically, and the failure messages can clutter up the ML really fast.)

How do I submit to db-devel?

See also WorkingWithDbDevel.

cd ~/canonical/lp-branches
bzr branch lp:~launchpad-pqm/launchpad/db-devel mydbbranch
cd mydbbranch
./utilities/link-external-sourcecode ../trunk
make build
make schema

...hack until ready to submit...

bzr pqm-submit --submit-branch bzr+ssh:// -m '[r=so-and-so] improve frobnitz'

Instead of that last line, here's a nice variation from abentley:

Then the last line can be just this:

bzr dbsubmit -m '[r=so-and-so] improve frobnitz'

XXX: Shouldn't this be unnecessary if you have ~/.bazaar/locations.conf configured right?

abentley: No, because you should have ~/.bazaar/locations.conf configured to submit to devel, not db-devel.


Can I land a testfix before buildbot has finished a test run that has failed or will fail?

Yes you can, and please do if appropriate, because this will mean that other developers will not encounter [testfix] mode at all.

If db-devel is broken, does that mean that devel is also in [testfix]? Why?

Yes, as mentioned before, there is a single [testfix] mode for PQM. That is because we regard this as a stop-the-line system breakage.

What happens if the automatic merge from stable to db-devel fails?

The (internal! change?) launchpad list gets an email. This is described on the /Trunk page.

A build failed for some reason other than a test failure. How do I get us out of testfix?

Force a build at We'll come out of testfix after the build has started, which is after the EC2 instance has booted -- so it might take a few minutes.

Trunk (last edited 2010-09-22 17:37:51 by jameinel)