wiki:ReleaseProcess

Version 182 (modified by hawkowl, 10 months ago) (diff)

New example for release announcement

This document describes the Twisted release process. Although it is still incomplete, every effort has been made to ensure that it is accurate and up-to-date. There are plans to eventually move this document into the source tree (#4543).

This process has only been tested on Linux, so we recommend that you do the release on Linux.

Thinking about editing this document? DON'T. The only time changes to this document are allowed is during a release. The only changes that may be made are changes that are tested by the release engineer and found to actually work.

If you want to make other changes to the release process, follow the normal Twisted development process (contribute release automation software that has documentation and unit tests demonstrating that it works).

Outcomes

By the end of a Twisted release we'll have:

  • Tarballs for Twisted as a whole, and for each of its sub-projects
  • Windows installers for the whole Twisted project
  • Updated documentation (API, howtos & book) on the twistedmatrix.com site
  • Updated download links on the twistedmatrix.com site
  • Announcement emails sent to major Python lists
  • Announcement post on http://labs.twistedmatrix.com
  • A tag in our Subversion repository marking the release

Prerequisites

To release Twisted, you will need:

Version numbers

Twisted releases use a time-based numbering scheme. Releases versions like YY.MM.mm, where YY is the last two digits of the year of the release, MM is the number of the release in the year, and mm is the number of the patch release.

For example:

  • The first release of 2010 is 10.0.0
  • The second release of 2010 is 10.1.0
  • If 10.1.0 has some critical defects, then a patch release would be numbered 10.1.1
  • The first pre-release of 10.0.0 is 10.0.0pre1, the second is 10.0.0pre2

Every release of Twisted includes the whole project, the core and all sub-projects. Each of these has the same number.

Throughout this document, we'll refer to the version number of the release as $RELEASE. Examples of $RELEASE include 10.0.0, 10.1.0, 10.1.1 etc.

We'll refer to the first two components of the release as $API, since all releases that share those numbers are mutually API compatible. e.g. for 10.0.0, $API is 10.0; for 10.1.0 and 10.1.1, $API is 10.1.

The change-versions script automatically picks the right number for you. Please retrieve it after you run it.

Overview

To release Twisted, we

  1. Prepare for a release
  2. Release N pre-releases
  3. Release the final release

Prepare for a release

  1. Check the milestone for the upcoming release
    1. Get rid of any non-critical bugs
    2. Get any critical bugs fixed
  2. Check for any regressions
  3. Read through the INSTALL and README files to make sure things like the supported Python versions are correct
    1. Check the required Python version.
    2. Check that the list matches the current set of buildbots.
    3. Any mistakes should be fixed in trunk before making the release branch
  4. Choose a version number. Remember to include the 'preN' suffix
  5. File a ticket
    1. Assign it to the upcoming release milestone
    2. Assign it to yourself
    3. Call it "Release $RELEASE"
  6. Make a branch (e.g. mkbranch Twisted releases/release-$RELEASE-4290)

How to do a pre-release

  1. Check buildbot to make sure all supported platforms are green (wait for pending builds if necessary).
  2. If a previously supported platform does not currently have a buildbot, move from supported platforms to "expected to work" in INSTALL. (Pending #1305)
  3. Run ./bin/admin/change-versions --prerelease
  4. Commit the changes made by change-versions
  5. Run ./bin/admin/build-news .
  6. Commit the changes made by build-news - this automatically removes the NEWS topfiles (see #4315)
  7. Bump copyright dates in LICENSE, twisted/copyright.py, and README if required
  8. Make a temporary directory for the tarballs to live in (e.g. mkdir /tmp/twisted-release)
  9. Run ./bin/admin/build-tarballs . /tmp/twisted-release/
    1. Note: build-tarballs does not produce exactly the same output when run multiple times, even when nothing else has changed. If a problem is encountered that requires build-tarballs to be re-run (either during the pre-release or later during the release), care must be taken to avoid releasing two or more different versions of the tarball.
  10. Upload the tarballs to twistedmatrix.com/Releases/pre/$RELEASE (see #4353)
  11. Write the pre-release announcement
    1. Read through the NEWS file and summarize the interesting changes for the release
    2. Get someone else to look over the announcement before doing it
  12. Announce the pre-release on
    1. the twisted-python mailing list
    2. on IRC in the #twisted topic
    3. in a blog post, ideally labs.twistedmatrix.com

Pre-release announcement

The pre-release announcement should mention the important changes since the last release, and exhort readers to test this pre-release.

Here's what the $RELEASEpre1 release announcement might look like:

Live from PyCon Atlanta, I'm pleased to herald the approaching
footsteps of the $API release.

Tarballs for the first Twisted $RELEASE pre-release are now available at:
 http://people.canonical.com/~jml/Twisted/

Highlights include:

 * Improved documentation, including "Twisted Web in 60 seconds"

 * Faster Perspective Broker applications

 * A new Windows installer that ships without zope.interface

 * Twisted no longer supports Python 2.3

 * Over one hundred closed tickets

For more information, see the NEWS file.

Please download the tarballs and test them as much as possible.

Thanks,
jml

How to do a final release

Prepare the branch

  1. Have the release branch, previously used to generate a pre-release, checked out
  2. Run ./bin/admin/change-versions
  3. Add the quote of the release to the README
  4. Make a new quote file for the next version: svn cp doc/fun/Twisted.Quotes doc/historic/Quotes/Twisted-$API; echo '' > doc/fun/Twisted.Quotes.
  5. Commit the version and README changes.
  6. Submit the ticket for review
  7. Pause until the ticket is reviewed and accepted.
  8. Tag the release
    • e.g. svn cp svn+ssh://svn.twistedmatrix.com/svn/Twisted/branches/releases/release-$RELEASE-4290 svn+ssh://svn.twistedmatrix.com/svn/Twisted/tags/releases/twisted-$RELEASE
    • A good commit message to use is something like "Tag $RELEASE release"

Cut the tarballs & installers

  1. Create a new staging area for the release (e.g. mkdir /tmp/twisted-release)
  2. Using a checkout of the release branch or the release tag (with no local changes!), run ./bin/admin/build-tarballs . /tmp/twisted-release/
  3. Build windows installers
    1. http://buildbot.twistedmatrix.com/builders/winxp32-py2.7-msi/
    2. http://buildbot.twistedmatrix.com/builders/windows7-64-py2.7-msi
    3. For "Branch" specify the release branch, e.g. "branches/releases/release-$RELEASE-4290"
    4. Download the latest .msi, .exe and .whl files from from http://buildbot.twistedmatrix.com/builds/twisted-packages/ and save them in the staging directory
  4. Sign the tarballs and Windows installers. (You will need a PGP key for this - use something like Seahorse to generate one, if you don't have one.)
    1. MD5: md5sum Tw* | gpg -a --clearsign > /tmp/twisted-release/twisted-$RELEASE-md5sums.txt
    2. SHA512: shasum -a 512 Tw* | gpg -a --clearsign > /tmp/twisted-release/twisted-$RELEASE-shasums.txt
    3. Compare these to an example of twisted-$RELEASE-md5sums.txt - they should look the same.

Update documentation

  1. Get the dependencies
    • Pydoctor (use the version from lp:~twisted-dev/pydoctor/twisted-templates-2)
    • Nevow
    • Epydoc (python-epydoc in Debian)
    • Some version of Latex if you didn't use the Epydoc Debian/Ubuntu package or ignored the recommended packages
    • netpbm (graphics conversion tools used by the book-builder)
  2. In another directory, export the version of Twisted being released
    • e.g. svn export svn+ssh://svn.twistedmatrix.com/svn/Twisted/tags/releases/twisted-$RELEASE
  3. Build the documentation
    1. cd twisted-$RELEASE
    2. Retrieve the template file (eg. wget https://raw.github.com/twisted-infra/t-web/master/docs/website-template.tpl)
    3. ./bin/admin/build-docs . ./website-template.tpl
      • If you have latex errors when trying to build the book and retry, don't forget to clean tmp directories which may be leftover in doc/core/howto.
    4. cp -R doc /tmp/twisted-release/
  4. Run the build-apidocs script to build the API docs (in an export of the release tag) and then upload them (See also APIDocs and #2891).
    1. Copy the pydoctor and www directories from twisted-templates-2 into your export.
    2. ./bin/admin/build-apidocs . /tmp/twisted-release/api
    3. Documentation will be generated in a directory called /tmp/twisted-release/api

Distribute

  1. Create a tarball with the contents of the release directory: cd /tmp/twisted-release; tar -cvjf ../release.tar.bz2 *
  2. Upload to the official upload locations (see #2888)
    1. cd ~; git clone https://github.com/twisted-infra/braid
    2. cd braid; git submodule update --init
    3. cd services/t-web/; git checkout release-process; cd ../../
    4. virtualenv ~/dev/braid; source ~/dev/braid/bin/activate; cd ~/braid; python setup.py develop;
    5. cd ~/braid; fab config.production t-web.uploadRelease:$RELEASE,/tmp/release.tar.bz2
  3. Test the generated docs
    1. Browse to http://twistedmatrix.com/documents/$RELEASE/
    2. Make sure that there is content in each of the directories and that it looks good
    3. Follow each link on http://twistedmatrix.com/trac/wiki/Documentation, replace current with $RELEASE (e.g. 10.0.0) and look for any obvious breakage
  4. Change the "current" symlink
    1. Upload release: fab config.production t-web.updateCurrentDocumentation:$RELEASE

Announce

  1. Update Downloads pages
    1. The following updates are automatic, due to the use of the ProjectVersion wiki macro throughout most of the Downloads page.
      1. Text references to the old version to refer to the new version
      2. The link to the NEWS file to point to the new version
      3. Links and text to MSIs
      4. Links and text to the main tarball
      5. Links and text to sub tarballs, including links to news files
    2. Add a new md5sum link
    3. Add a new shasum link
    4. Save the page, check all links
  2. Update PyPI records & upload files
  3. Write the release announcement (see below)
  4. Update ReleaseRevisions with the revision of this release
    • The final revision of the release is the revision in which the release branch was made. The starting revision is the one immediately after the final revision of the previous release.
  5. Announce the release
    1. Send a text version of the announcement to: twisted-python@twistedmatrix.com, python-announce-list@python.org, python-list@python.org, twisted-web@twistedmatrix.com, twisted-jabber@ik.nu
      • Note: you need to be subscribed to some of those lists to be able to send, like twisted-jabber@ik.nu.
    2. Launchpad;
    3. http://labs.twistedmatrix.com
      • Post a web version of the announcements, with links instead of literal URLs
    4. Twitter, if you feel like it
    5. #twisted topic on IRC (you'll need ops)
  6. Merge the release branch into trunk, closing the release ticket at the same time.
    • For now you need to add a .misc NEWS fragment to merge the branch.
  7. Close the release milestone (which should have no tickets in it).
  8. Open a milestone for the next release.

Release announcement

The final release announcement should:

  • Mention the version number
  • Include links to where the release can be downloaded
  • Summarize the significant changes in the release
  • Consider including the quote of the release
  • Thank the contributors to the release

Here's an example:

On behalf of Twisted Matrix Laboratories, I am honoured to announce
the release of Twisted 13.2!

The highlights of this release are:

 * Twisted now includes a HostnameEndpoint implementation which uses
IPv4 and IPv6 in parallel, speeding up the connection by using
whichever connects first (the 'Happy Eyeballs'/RFC 6555 algorithm).
(#4859)

 * Improved support for Cancellable Deferreds by kaizhang, our GSoC
student. (#4320, #6532, #6572, #6639)

 * Improved Twisted.Mail documentation by shira, our Outreach Program
for Women intern. (#6649, #6652)

 * twistd now waits for the application to start successfully before
exiting after daemonization. (#823)

 * SSL server endpoint string descriptions now support the
specification of chain certificates. (#6499)

 * Over 70 closed tickets since 13.1.0.

For more information, check the NEWS file (link provided below).

You can find the downloads at <https://pypi.python.org/pypi/Twisted>
(or alternatively <http://twistedmatrix.com/trac/wiki/Downloads>) .
The NEWS file is also available at
<http://twistedmatrix.com/Releases/Twisted/13.2/NEWS.txt>.

Many thanks to everyone who had a part in this release - the
supporters of the Twisted Software Foundation, the developers who
contributed code as well as documentation, and all the people building
great things with Twisted!

Twisted Regards,
HawkOwl

When things go wrong

If you discover a showstopper bug during the release process, you have three options.

  1. Abort the release, make a new point release (e.g. abort 10.0.0, make 10.0.1 after the bug is fixed)
  2. Abort the release, make a new pre-release (e.g. abort 10.0.0, make 10.0.0pre3 after the bug is fixed)
  3. Interrupt the release, fix the bug, then continue with it (e.g. release 10.0.0 with the bug fix)

If you choose the third option, then you should:

  1. Delete the tag for the release
  2. Recreate the tag from the release branch once the fix has been applied to that branch

Examples

Open questions

  • How do we manage the case where there are untested builds in trunk?
  • Should picking a release quote be part of the release or the pre-release?
  • What bugs should be considered release blockers?
    • Ultimately it's the RM's discretion
  • Should news fragments contain information about who made the changes?
  • A thought for future releases: since we'd really like folks to download the prereleases and try them out, perhaps we should put the NEWS file on the web somewhere official, too, so they can see all the cool stuff they can try out?
    • XXX: jml doesn't know what this means any more

Bugs mentioned on this page

See also