Diff for "Trunk"

Not logged in - Log In / Register

Differences between revisions 7 and 8
Revision 7 as of 2009-08-10 19:07:37
Size: 6964
Editor: barry
Comment:
Revision 8 as of 2009-08-11 04:12:11
Size: 7238
Editor: kfogel
Comment: Put the pictures first; improve some of the summaries.
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
 1. '''[[https://code.edge.launchpad.net/~launchpad-pqm/launchpad/stable|stable]]''' This is what we roll out to production servers when we do a release.
 1. '''[[https://code.edge.launchpad.net/~launchpad-pqm/launchpad/db-stable|db-stable]]'''  (see below)
 1. '''[[https://code.edge.launchpad.net/~launchpad-pqm/launchpad/stable|stable]]''' What [[https://edge.launchpad.net/|edge]] runs; fed by regular merges from the '''devel''' branch. This is also what we roll out to production servers on each release.
 1. '''[[https://code.edge.launchpad.net/~launchpad-pqm/launchpad/db-stable|db-stable]]''' What [[https://staging.launchpad.net/|staging]] runs; fed by regular merges from the '''db-devel''' branch.
Line 14: Line 14:
= Understanding the DB distinction: = = First, 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.)

{{attachment:codeflow.png}}

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

{{attachment:db-devel-normal.png}}

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

{{attachment:db-devel-problems.png}}

All of this is really to support being able to submit directly to the '''db-devel''' branch.

{{attachment:db-devel-direct.png}}

= Let's Try That in Words =
Line 24: Line 42:
  * When changes are approved by buildbot to go from '''devel''' to '''stable''', a script also generates a PQM request to merge '''stable''' with '''db-devel''', sent as if it came from the Launchpad list. The Launchpad list will be informed of merge failures, and launchpad developers will collectively be responsible for correcting them. ('''''TODO: is this some internal list? Hmmm.''''')  * When changes are approved by buildbot to go from '''devel''' to '''stable''', a script also generates a PQM request to merge '''stable''' with '''db-devel''', sent as if it came from the Launchpad list. The Launchpad list will be informed of merge failures, and launchpad developers will collectively be responsible for correcting them. ('''''TODO: is this some internal list? Hmmm.''''')
Line 26: Line 44:
  * Staging runs '''db-stable'''; edge runs '''stable'''. We will deploy the production site from '''db-stable'''. (After a deployment, '''db-stable''' is manually pushed to '''devel''' and '''stable'''.)  * Staging runs '''db-stable'''; edge runs '''stable'''. We will deploy the production site from '''db-stable'''. (After a deployment, '''db-stable''' is manually pushed to '''devel''' and '''stable'''.)
Line 28: Line 46:
  * When '''devel''' ''or'' '''db-devel''' get a test failure, we go into `[testfix]` mode ''for both branches''. If only one branch is broken, a `[testfix]` to the broken branch that then makes the tests pass will reopen both branches for normal use.  * When '''devel''' ''or'' '''db-devel''' get a test failure, we go into `[testfix]` mode ''for both branches''. If only one branch is broken, a `[testfix]` to the broken branch that then makes the tests pass will reopen both branches for normal use.
Line 30: Line 48:
= Problems that can occur = == Problems that can occur ==
Line 34: Line 52:
= Process under experiment = = Where to Send Merge Requests =
Line 58: Line 76:

= Let's try it in pictures =

This summary might be all you need.

{{attachment:codeflow.png}}

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

{{attachment:db-devel-normal.png}}

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

{{attachment:db-devel-problems.png}}

All of this is really to support being able to submit directly to the '''db-devel''' branch.

{{attachment:db-devel-direct.png}}

Where's trunk?

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

TODO: This page is still in progress; I'm still bringing material over from https://wiki.canonical.com/Launchpad/Experiments/DBDevel and rearranging. I'll finish out bug #408069 when done. -kfogel

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. Note: this is also the default stacking branch for other Launchpad branches.

  3. stable What edge runs; fed by regular merges from the devel branch. This is also what we roll out to production servers on each release.

  4. db-stable What staging runs; fed by regular merges from the db-devel branch.

First, 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.)

codeflow.png

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

db-devel-normal.png

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

db-devel-problems.png

All of this is really to support being able to submit directly to the db-devel branch.

db-devel-direct.png

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 rollout to production: 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:

  • Developers submit to devel and db-devel.

  • Buildbot tests the tip of db-devel, in addition to devel. If a db-devel change passes, it is pushed automatically to db-stable.

  • When changes are approved by buildbot to go from devel to stable, a script also generates a PQM request to merge stable with db-devel, sent as if it came from the Launchpad list. The Launchpad list will be informed of merge failures, and launchpad developers will collectively be responsible for correcting them. (TODO: is this some internal list? Hmmm.)

  • Staging runs db-stable; edge runs stable. We will deploy the production site from db-stable. (After a deployment, db-stable is manually pushed to devel and stable.)

  • When devel or db-devel get a test failure, we go into [testfix] mode for both branches. If only one branch is broken, a [testfix] to the broken branch that then makes the tests pass will reopen both branches for normal use.

Problems that can occur

  • The merge from stable to db-devel fails. That's a real risk but we expect it to be occur infrequently. When it does occur, the Launchpad list (TODO: which one?) will be emailed, and it is the collective responsibility of everyone to fix the problem, by manually submitting a branch to db-devel that includes the branch that failed to merge plus any necessary adjustments.

Where to Send Merge Requests

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

  • changes the database schema
  • depends on database schema change only in db-devel / db-stable

  • requires changes on machines other than edge

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

The current buildbot-poller.py 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 staging -> 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 the do it automatically, and the failure messages can clutter up the ML really fast.)

How do I submit to db-devel?

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://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-devel -m '[r=so-and-so] improve frobnitz'

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

  • I suggest creating an alias in bazaar.conf like:
        dbsubmit = pqm-submit --submit-branch bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-devel

Then the last line can be just this:

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

Trunk (last edited 2021-10-19 13:35:30 by cjwatson)