Diff for "LEP/ReleaseFeaturesWhenTheyAreDone"

Not logged in - Log In / Register

Differences between revisions 8 and 9
Revision 8 as of 2010-08-04 05:52:56
Size: 4842
Editor: lifeless
Comment: streamline
Revision 9 as of 2010-08-04 20:49:53
Size: 5104
Editor: lifeless
Comment: mention simple DB patches
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
 * Optimising the flow of features that require database schema changes. That is up for review in a future effort.  * Optimising the flow of features that require database schema changes. That is up for review in a future effort. Note that smaller changes will be doable in stable with this workflow.
Line 63: Line 63:
See MergeWorkflow for the QA process details, See MergeWorkflow for the QA process details. This stage permits no-downtime DB patches to be applied within a release cycle, as long as they are blessed as such, and code that depends on them is landed after the patch has been applied.

Rationale

We currently tie together two unrelated things:

  • Changes to the database
  • exposure of new features on 'launchpad.net'

This causes many problems for us, including:

  • Unfinished features are deployed to the entire userbase.
  • Finished features and small bugfixes/tweaks are held back from users for (on average) 2 weeks.
  • We regularly encounter conflicts and test interactions between the 'released' and 'beta' code bases.
  • We have a very complex deployment situation, with *at best* 2 versions of the code running at any one time, and regularly encounter friction between the two versions.

We want to decouple these two things, deliver features when they are ready, not earlier or later, and streamline and simplify our deployment of code, changes to the database and general maintenance processes.

Stakeholders

Launchpad developers: Various mails have been sent to launchpad-dev. Developers have their processes impacted when we change development process, so need to be able to have their needs met.

Launchpad users: hard to have a discussion with all the users that are affected. Users generally want Launchpad to be fast and reliable, and if we are successful with this LEP will get both of those things more often.

Constraints

  • Allow features that are not polished to only be shown to early adopters.
  • Must be able to review the list of features that are exposed to less-than-every-user.
  • Must not slow down the current development process.
  • Deliver finished features to all users as promptly as possible.

Out-of-scope

  • Optimising the flow of features that require database schema changes. That is up for review in a future effort. Note that smaller changes will be doable in stable with this workflow.

Nice-to-have

  • Obvious when looking at edge that a feature is new and warrants feedback.

    • This won't be delivered as a core part of this, though an idiom for doing it will be possible and fairly easy to do on a case by case basis.

Implementation

The end state we want to arrive at is:

  • New features are controlled by feature flags rather than being on edge/on production.
  • All our non test/demo servers run one code base, and that code is fully QA'd.
  • Rollouts are done on demand, are lightweight, can easily be rolled back, and are totally automated.
  • Rollouts are done whenever we have something ready to rollout.

This may take some time to completely achieve, so we are staging the implementation.

Stage 0 - Stop using edge for 'unreleased features'

To detangle the two concerns (deployment and releasing) we need to have features in the code base enabled at runtime, rather than deployment time. This will be accomplished by LEP/FeatureFlags. Nothing should depend on the 'is_edge' check. The feature flags facility is now available in db-devel, and from 10.09 should be used for all changes which the developer does not want *immediately* given to users.

Stage 1 - Remove appserver rollout downtime

RT 40685 : deploy icing to apache before updating appservers, will fix the downtime experienced by some users during appserver-only rollouts.

Stage 2 - QA all code

This involves setting up a QA environment on the staging server running the production database schema against the 'stable' branch. Rather than deploy 'stable tip' we will start deploying a nominated revision of stable which will be the highest revision which every commit has been QA'd. QA failures will require the failing revision to be reverted and any additional revisions landed since the failing one to also be QA'd OK or reverted.

See MergeWorkflow for the QA process details. This stage permits no-downtime DB patches to be applied within a release cycle, as long as they are blessed as such, and code that depends on them is landed after the patch has been applied.

Stage 3 - remove 'edge'

With all code QA'd we will deploy to all appservers when we deploy, rather than to edge; the edge appservers will be repurposed as production appservers, and the edge sites turned into redirects to production

Stage 4 - iterate on deployment friction

To reduce the complexity of our environment we want all the servers running the same revision, but we have some areas that are hard to deploy to, or cause downtime at the moment.

The following RT tickets will improve this:

  • 40477 XMLRPC server rolling upgrades
  • 40480 codehosting rolling upgrades
  • 40482 staging-with-production-schema environment

Some bugs in the LP codebase will also help, but are less strictly needed:

There may be other issues, but we will discover these if/when a deployment goes wrong, and feed them back into the process as high/critical bugs.

Success

When we can update the db schema without rolling out features under development, and the Launchpad developers haven't gone mad from crazy process changes.

Better quality features released to production.

Thoughts?

LEP/ReleaseFeaturesWhenTheyAreDone (last edited 2011-04-05 14:47:16 by flacoste)