Diff for "MergeWorkflow"

Not logged in - Log In / Register

Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2010-02-12 16:05:39
Size: 2907
Editor: bjornt
Comment:
Revision 8 as of 2010-03-02 10:19:14
Size: 4621
Editor: bjornt
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This is a proposal of how a developer branch flows through the different production branches we have, after the developer branch is ready for landing. This is a proposal of how a developer branch flows through the different
production branches we have, after the developer branch is ready for
landing.
Line 3: Line 5:
To summarize, branches that contain db changes always get landed to the `db`
branch. Other changes get landed to the `edge` branch, although branches that are part of a larger features (consisting of multiple branches) get landed to edge through an integration branch for that feature.
To summarize, branches that contain db changes always get landed to the
`db` branch. Bug fixes get landed to the `devel` branch, and larger
features (consisting of multi
ple branches) get landed to an integration
branch for that feature.
Line 6: Line 10:
The landed revision stays in the `edge` branch until it has been marked as
being QAed. When the revision is marked as good, it automatically gets merged
into the `production` branch, which is rolled out to `launchpad.net` daily.
For bug fixes, the landed revision stays in the `devel` branch until it
has been marked as being QAed. When the revision is marked as good, it
automatically gets merged into the `production` branch, which is rolled
out to `launchpad.net` daily.

For larger features, the integration branch gets combined with devel,
and rolled out to `edge.launchpad.net` daily. When the feature is done
and QAed, it gets merged into the `devel` branch, and the merged
revision finally gets merged into the `production` branch after it has
been QAed again on staging.
Line 12: Line 23:
''Image source: [[attachment:merge-workflow.dia]]''
Line 14: Line 27:
A revision gets merged from `edge` to `production` only after it has been
marked as good in the QA step. This helps ensure that we don't rollout feature
to `launchpad.net` that haven't been QAed.
A revision gets merged from `devel` to `production` only after it has
been marked as good in the QA step. This helps ensure that we don't
rollout feature to `launchpad.net` that haven't been QAed.
Line 18: Line 31:
XXX: How the QA step works regarding to marking the revision as good/bad is still
undefined.
In addition to this, a revision only gets merged from `devel` to
`production` if all the previous revisions have been marked as good as
well. This is because bzr doesn't support cherry picking, and we want to
keep track of which revisions have been merged.

XXX: How the QA step works regarding to marking the revision as good/bad
is still undefined.
Line 24: Line 42:
Features that will involve multiple branches should have an integration branch
for that feature. Instead of landing branches related to the feature to `edge`,
they land their branches to the integration branch. New revisions in the
integration branch will automatically be merge into the `edge` branch.
Features that will involve multiple branches should have an integration
branch for that feature. Instead of landing branches related to the
feature to `devel`, they land their branches to the integration branch.
New revisions in the integration branch will automatically be merged
into the `edge` branch.
Line 29: Line 48:
The reason for having an integration branch branch is to keep track of all the
revisions that belong to the feature, so that when the feature has been marked
as good in the QA process, the whole feature can be rolled out at once. Parts
of the feature can still be rolled out by QAing specific revisions.
The reason for having an integration branch branch is to keep track of
all the revisions that belong to the feature, so that when the feature
has been marked as good in the QA process, the whole feature can be
rolled out at once. Parts of the feature can still be rolled out by
merging specific revisions into `devel`.
Line 34: Line 54:
XXX: How to register new feature branches, and how to merge to them, is still
undefined. Maybe a better way would be to use revision properties to tag
revisions as being part of a bigger feature, or use bug links?
XXX: How to register new feature branches, and how to merge to them, is
still undefined. Maybe a better way would be to use revision properties
to tag revisions as being part of a bigger feature, or use bug links?
Line 40: Line 60:
If there's a conflict when automatically merging the feature branch into the `edge` branch, someone has to manually merge the feature branch into `edge` and resolve the conflicts. If there's a conflict when automatically merging the feature branch into
the `edge` branch, someone has to manually merge the feature branch into
`edge` and resolve the conflicts.
Line 45: Line 67:
Bug fixes for features that already exposed on `launchpad.net` can go directly
to the `edge` branch. After the revision has been QAed, it gets merged into the
`production` branch.
Bug fixes for features that are already exposed on `launchpad.net` can go
directly to the `devel` branch. After the revision has been QAed, it gets
merged into the `production` branch.

== When to use a feature branch ==

So far we've talked about features and bug fixes. However, all features
don't need a feature branch. A feature branch is only necessary when you
have a larger feature that will require multiple branches to complete.
If you have a small feature, or improvement of an existing feature, that
you're quite sure will require only one branch, landing it directly on
the `devel` branch is fine.

== Which branch should you branch off from when starting new work? ==

When starting new work, you should branch off from the `db` branch if
your work will require db changes, and from the `devel` branch
otherwise. You shouldn't start of from `edge`, since it contains
features that shouldn't be rolled out to production yet, which means
that you would have to wait for the existing features to be finished,
before your feature can be considered for rollout.

If possible, the required db changes should go to the `db` branch one
cyle in advance, to make it possible to QA the other work on edge.
Line 52: Line 95:
The `production` branch gets rolled out to the web app servers daily, to expose
our users to bug fixes not too long after the fix has been verified to work on
`edge.launchpad.net`.
The `production` branch gets rolled out to the web app servers daily, to
expose our users to bug fixes not too long after the fix has been
verified to work on `edge.launchpad.net`.
Line 56: Line 99:
We only do this for the web app servers, since we can update them without any
downtime.
We only do this for the web app servers, since we can update them
without any downtime.
Line 59: Line 102:
XXX: If we're not ready for this, things could get merged into the `db` branch after being QAed, waiting to get rolled out with the next release. XXX: If we're not ready for this, things could get merged into the `db`
branch after being QAed, waiting to get rolled out with the next
release.
Line 64: Line 109:
Staging takes the `edge` branch and merges in the `db` branch. Staging uses the `db` branch, so that we can do final QA of what gets
rolled out to `launchpad.net`.

This is a proposal of how a developer branch flows through the different production branches we have, after the developer branch is ready for landing.

To summarize, branches that contain db changes always get landed to the db branch. Bug fixes get landed to the devel branch, and larger features (consisting of multiple branches) get landed to an integration branch for that feature.

For bug fixes, the landed revision stays in the devel branch until it has been marked as being QAed. When the revision is marked as good, it automatically gets merged into the production branch, which is rolled out to launchpad.net daily.

For larger features, the integration branch gets combined with devel, and rolled out to edge.launchpad.net daily. When the feature is done and QAed, it gets merged into the devel branch, and the merged revision finally gets merged into the production branch after it has been QAed again on staging.

merge-workflow.png

Image source: merge-workflow.dia

The QA step

A revision gets merged from devel to production only after it has been marked as good in the QA step. This helps ensure that we don't rollout feature to launchpad.net that haven't been QAed.

In addition to this, a revision only gets merged from devel to production if all the previous revisions have been marked as good as well. This is because bzr doesn't support cherry picking, and we want to keep track of which revisions have been merged.

XXX: How the QA step works regarding to marking the revision as good/bad is still undefined.

Feature branches

Features that will involve multiple branches should have an integration branch for that feature. Instead of landing branches related to the feature to devel, they land their branches to the integration branch. New revisions in the integration branch will automatically be merged into the edge branch.

The reason for having an integration branch branch is to keep track of all the revisions that belong to the feature, so that when the feature has been marked as good in the QA process, the whole feature can be rolled out at once. Parts of the feature can still be rolled out by merging specific revisions into devel.

XXX: How to register new feature branches, and how to merge to them, is still undefined. Maybe a better way would be to use revision properties to tag revisions as being part of a bigger feature, or use bug links?

Resolving conflicts

If there's a conflict when automatically merging the feature branch into the edge branch, someone has to manually merge the feature branch into edge and resolve the conflicts.

Bug fixes

Bug fixes for features that are already exposed on launchpad.net can go directly to the devel branch. After the revision has been QAed, it gets merged into the production branch.

When to use a feature branch

So far we've talked about features and bug fixes. However, all features don't need a feature branch. A feature branch is only necessary when you have a larger feature that will require multiple branches to complete. If you have a small feature, or improvement of an existing feature, that you're quite sure will require only one branch, landing it directly on the devel branch is fine.

Which branch should you branch off from when starting new work?

When starting new work, you should branch off from the db branch if your work will require db changes, and from the devel branch otherwise. You shouldn't start of from edge, since it contains features that shouldn't be rolled out to production yet, which means that you would have to wait for the existing features to be finished, before your feature can be considered for rollout.

If possible, the required db changes should go to the db branch one cyle in advance, to make it possible to QA the other work on edge.

Continuous rollouts to `launchpad.net`

The production branch gets rolled out to the web app servers daily, to expose our users to bug fixes not too long after the fix has been verified to work on edge.launchpad.net.

We only do this for the web app servers, since we can update them without any downtime.

XXX: If we're not ready for this, things could get merged into the db branch after being QAed, waiting to get rolled out with the next release.

What about `staging.launchpad.net`

Staging uses the db branch, so that we can do final QA of what gets rolled out to launchpad.net.

MergeWorkflow (last edited 2010-11-08 22:01:23 by lifeless)