Diff for "QAProcessContinuousRollouts"

Not logged in - Log In / Register

Differences between revisions 4 and 5
Revision 4 as of 2010-07-16 14:04:59
Size: 6739
Editor: ursinha
Comment: Changed according to diogo's suggestions
Revision 5 as of 2010-07-16 14:26:56
Size: 7418
Editor: ursinha
Comment:
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:
qa-untestable, qa-rollback and qa-needstesting should be set by the Tagger. qa-bad and qa-ok should be manually set. The diagram shows the QA states of the bug and what causes them. qa-untestable, qa-rollback and qa-needstesting should be set by the Tagger. qa-bad and qa-ok should be manually set. The diagram at the end of this page shows the QA states of the bug and the changes that trigger them.
Line 37: Line 37:
  * Developer action: Link the bug to the branch in Launchpad. ([[Alternative way]]).
  * Tagger action: Each related bug is marked Fix Committed and tagged qa-needstesting, and a comment is added mentioning the revision number and branch name it landed in.
  * '''Developer action''': Link the bug to the branch in Launchpad. (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically).
  * '''Tagger action''': Each related bug is marked Fix Committed and tagged qa-needstesting, and a comment is added mentioning the revision number and branch name it landed in.

||<tablestyle="width: 100%;" colspan=3 style="background: #dddddd; font-weight: bold; color: #fff;">TIP:||'''Alternative way to link bugs to branches in Launchpad, automatically:''' Instead of accessing the branch page in Launchpad and linking the bugs manually after pushing it, the developer can use alternatively {{{bzr commit --fixes=123456}}}. It adds the information of the bug fixed in the branch metadata. When the same branch is pushed to Launchpad, it's scanned and provided fixed bugs are automatically linked to the branch in Launchpad. ||
Line 42: Line 44:
  * Developer action: Link the bug to the branch in Launchpad ([[Alternative way]]), and use {{{--incremental}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * Tagger action: Each related bug is tagged qa-needstesting, and a comment is added mentioning the revision number and branch name it landed in. The status of the bug will remain In Progress.
  * '''Developer action''': Link the bug to the branch in Launchpad (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically), and use {{{--incremental}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * '''Tagger action''': Each related bug is tagged qa-needstesting, and a comment is added mentioning the revision number and branch name it landed in. The status of the bug will remain In Progress.
Line 47: Line 49:
  * Developer action: Link the bug to the branch in Launchpad ([[Alternative way]]), and use {{{--incremental}}} and {{{--no-qa}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * Tagger action: Each related bug is tagged qa-untestable, and a comment is added mentioning the revision number and branch name it landed in. The status of the bug will remain In Progress.
  * '''Developer action''': Link the bug to the branch in Launchpad (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically), and use {{{--incremental}}} and {{{--no-qa}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * '''Tagger action''': Each related bug is tagged qa-untestable, and a comment is added mentioning the revision number and branch name it landed in. The status of the bug will remain In Progress.
Line 54: Line 56:
  * Developer action: Link the bug and the branch in Launchpad ([[Alternative way]]), and use {{{--no-qa}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * Tagger action: Each related bug is marked Fix Committed and tagged qa-untestable.
  * '''Developer action''': Link the bug and the branch in Launchpad (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically), and use {{{--no-qa}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * '''Tagger action''': Each related bug is marked Fix Committed and tagged qa-untestable.
Line 59: Line 61:
  * Developer action: Use {{{--no-qa}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * Tagger action: Nothing. We include it in a QA report for the current cycle (just a wiki page for now).
  * '''Developer action''': Use {{{--no-qa}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * '''Tagger action''': Nothing. We include it in a QA report for the current cycle (just a wiki page for now).
Line 64: Line 66:
  * Developer action: Use {{{--rollback}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * Tagger action: Each related bug is tagged qa-rollback. The status of the bug will remain the same.
  * '''Developer action''': Use {{{--rollback}}} on {{{ec2 land}}} or {{{bzr lp-land}}}.
  * '''Tagger action''': Each related bug is tagged qa-rollback. The status of the bug will remain the same.
Line 68: Line 70:

=== Alternative way to linking bugs to branches using Launchpad UI ===

Using --fixes when doing local commits add the metadata to the branch. When the branch is pushed to Launchpad, it scans the revisions and automatically links the mentioned bugs to the branch.

Continuous Rollouts Process: the QA side

The proposed merge workflow is in https://dev.launchpad.net/MergeWorkflowDraft. This workflow relies on QA, enough to assume a branch able (or not) to be rolled out to production based on its QA state.

We need to do the bookkeeping to provide the QA information to the merger. Details on how we intent to do this are described in this wiki page.

Definition of QA

A bug is the smallest unit of QA. So, deciding if something needs QA is based on the existence of the bug. But, it's NOT required to have a bug for each branch. Informing that a branch is unQAable when landing it will QA-cover it.

A fix is considered QAed when falling into one of the following categories:

States of QA

  • qa-ok: The branch is verified and implements successfully what it proposes.
  • qa-untestable: The branch cannot be tested separately of the rest of the fix or cannot be tested at all, and is harmless.
  • qa-bad: The branch is verified and doesn't work as it should or causes regressions.
  • qa-rollback: The branch reverts a previous one that's in a blocker state (qa-bad or qa-needstesting).
  • qa-needstesting: The branch has landed and is waiting to be QAed.

qa-untestable, qa-rollback and qa-needstesting should be set by the Tagger. qa-bad and qa-ok should be manually set. The diagram at the end of this page shows the QA states of the bug and the changes that trigger them.

Connecting branches and QA

As a rule, if a branch needs QA, it should be represented by at least one bug. Rarely, QA is not necessary for some branches, or can't be done. Also rarely, some branches cannot be QA'd until more branches land -- they are incremental branches towards a larger bug. Equally rarely are expected branches that only revert others that are bad fixes or rollout blockers: they rollback other branches.

How to make branches QA-aware when landing them

To represent and sign those situations, there are three new commit message tags: [no-qa], [incr] and [rollback]. Note that the idea is to gather as much information as possible in the merge proposal, so the developer only has to use parameters on ec2 land and bzr lp-land instead of handcrafting the commit message for it to be recognized as in a QA-consistent state.

Each category below describes what the developer needs to do to make the assertion. It also tells the developer what automation it will trigger. In order to get the branch landed, the developer must assert that the branch falls in one of the following categories:

We can QA the branch, and it fixes one or more bugs (most common)

  • Developer action: Link the bug to the branch in Launchpad. (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically).

  • Tagger action: Each related bug is marked Fix Committed and tagged qa-needstesting, and a comment is added mentioning the revision number and branch name it landed in.

TIP:

Alternative way to link bugs to branches in Launchpad, automatically: Instead of accessing the branch page in Launchpad and linking the bugs manually after pushing it, the developer can use alternatively bzr commit --fixes=123456. It adds the information of the bug fixed in the branch metadata. When the same branch is pushed to Launchpad, it's scanned and provided fixed bugs are automatically linked to the branch in Launchpad.

We can QA the branch, and it is an incremental step towards the fix of one or more bugs

  • Developer action: Link the bug to the branch in Launchpad (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically), and use --incremental on ec2 land or bzr lp-land.

  • Tagger action: Each related bug is tagged qa-needstesting, and a comment is added mentioning the revision number and branch name it landed in. The status of the bug will remain In Progress.

We cannot QA the branch, and it is an incremental step towards the fix of one or more bugs

  • Developer action: Link the bug to the branch in Launchpad (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically), and use --incremental and --no-qa on ec2 land or bzr lp-land.

  • Tagger action: Each related bug is tagged qa-untestable, and a comment is added mentioning the revision number and branch name it landed in. The status of the bug will remain In Progress.

NOTE: Developer shouldn't use the --incremental option when landing the last branch in an incremental chain. Branch must be submitted like the most common case.

We cannot QA the branch, but it fixes one or more bugs

  • Developer action: Link the bug and the branch in Launchpad (see the TIP box for an alternative way to link bugs to branches in Launchpad automatically), and use --no-qa on ec2 land or bzr lp-land.

  • Tagger action: Each related bug is marked Fix Committed and tagged qa-untestable.

We cannot QA it, and it does not have an associated bug

  • Developer action: Use --no-qa on ec2 land or bzr lp-land.

  • Tagger action: Nothing. We include it in a QA report for the current cycle (just a wiki page for now).

We cannot QA it, and it's just a rollback of a previous qa-bad or blocker qa-needstesting branch

  • Developer action: Use --rollback on ec2 land or bzr lp-land.

  • Tagger action: Each related bug is tagged qa-rollback. The status of the bug will remain the same.

NOTE: Regular branches that fix qa-bad bugs should be submitted like the most common case.

PQM will enforce these rules with the usual regex dances. ec2 land and bzr lp-land help the developer conform to the PQM regex with quicker and more helpful error messages. Alternatively, the developer can add "[incr]", "[no-qa]" or "[rollback]" in the PQM submission message, if using pqm-submit directly, but it's not recommended considering it's not needed and other tools with faster response automatically check and enforce the tags.

Marking revisions as blessed: the blesser

The very important part of having the bugs tagged correctly is that this will determine the QA state of the branch that fixes it, and as a consequence say if the revision is blessed to be rolled out to production of if it's blocked, and therefore should not be rolled out.

There will be a small application called "the blesser". It will check each revision landed on the development branch, check the existence of bugs and commit messages, and mark them as follows:

  1. No bug: Blesser assumes the revision is qa-untestable, therefore revision is blessed.
  2. Bug AND it's qa-untestable, qa-ok or qa-rollback: Blesser assumes that's ok, therefore revision is blessed.
  3. Bug AND it's qa-needstesting or qa-bad: Blesser blocks the rollouts by marking the revision as blocked.

Here is a diagram that shows how developers and the tagger script will interact with bugs, leaving them ready for the blesser:

bug_machine_state.png

QAProcessContinuousRollouts (last edited 2010-11-08 10:39:06 by henninge)