~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/releasing.txt

Add bzrlib.pyutils, which has get_named_object, a wrapper around __import__.

This is used to replace various ad hoc implementations of the same logic,
notably the version used in registry's _LazyObjectGetter which had a bug when
getting a module without also getting a member.  And of course, this new
function has unit tests, unlike the replaced code.

This also adds a KnownHooksRegistry subclass to provide a more natural home for
some other logic.

I'm not thrilled about the name of the new module or the new functions, but it's
hard to think of good names for such generic functionality.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Releasing Bazaar
2
 
================
 
2
################
3
3
 
4
4
This document describes the processes for making and announcing a Bazaar
5
5
release, and managing the release process.  This is just one phase of the
6
 
`overall development cycle <http://doc.bazaar-vcs.org/developers/cycle.html>`_,
7
 
but it's the most complex part.
8
 
This document gives a checklist you can follow from start to end in one
9
 
go.
 
6
`overall development cycle <http://doc.bazaar.canonical.com/developers/cycle.html>`_,
 
7
but it's the most complex part.  This document gives a checklist you can
 
8
follow from start to end in one go.
10
9
 
11
10
If you're helping the Release Manager (RM) for one reason or another, you
12
11
may notice that he didn't follow that document scrupulously. He may have
19
18
 
20
19
 
21
20
Preconditions
22
 
-------------
 
21
=============
23
22
 
24
23
#. Download the pqm plugin and install it into your ``~/.bazaar/plugins``::
25
24
 
26
25
     bzr branch lp:bzr-pqm ~/.bazaar/plugins/pqm
27
26
 
28
27
 
29
 
Starting a cycle
30
 
----------------
 
28
At the start of a release cycle
 
29
===============================
31
30
 
32
31
To start a new release cycle:
33
32
 
34
 
#. Create a new series at <https://launchpad.net/bzr/+addseries>. There is one
35
 
   series for every *x.y* release.
36
 
 
37
 
#. Go to the series web page at <https://launchpad.net/bzr/x.y>
38
 
 
39
 
#. Create a new release at
40
 
   <https://launchpad.net/bzr/x.y/+addrelease> and add
41
 
   information about this release. We will not use it yet, but it
 
33
#. If this is the first release for a given *x.y* then create a new
 
34
   series at <https://launchpad.net/bzr/+addseries>. There is one series
 
35
   for every *x.y* release.
 
36
 
 
37
#. If you made a new series, create a new pqm-controlled branch for this
 
38
   release series, by asking a Canonical sysadmin.  This branch means that
 
39
   from the first release beta or candidate onwards, general development
 
40
   continues on the trunk, and only specifically-targeted fixes go into
 
41
   the release branch.
 
42
 
 
43
#. If you made a new series, add milestones at
 
44
   <https://edge.launchpad.net/bzr/x.y/+addmilestone> to that series for
 
45
   the beta release, release candidate and the final release, and their
 
46
   expected dates.
 
47
 
 
48
#. Create a new milestone <https://edge.launchpad.net/bzr/x.y/+addmilestone>
 
49
   and add information about this release.  We will not use it yet, but it
42
50
   will be available for targeting or nominating bugs.
43
51
 
44
 
#. We create a new pqm-controlled branch for this release series, by
45
 
   asking a Canonical sysadmin.
46
 
   This branch means that from the first release beta or candidate onwards,
47
 
   general development continues on the trunk, and only
48
 
   specifically-targeted fixes go into the release branch.
49
 
 
50
 
#. Add milestones at <https://edge.launchpad.net/bzr/x.y/+addmilestone> to
51
 
   that series for the beta release, release candidate and the final release,
52
 
   and their expected dates.
53
 
 
54
 
#. Update the version number in the ``bzr`` script, and the
55
 
   ``bzrlib/__init__.py`` file. Make sure there is always a corresponding
56
 
   milestone when you change that version number.
57
 
 
58
 
#. Add a new section at the top of ``NEWS`` about the new release,
59
 
   including its version number and the headings from
60
 
   ``NEWS-template.txt``.
61
 
 
62
52
#. Send mail to the list with the key dates, who will be the release
63
53
   manager, and the main themes or targeted bugs.  Ask people to nominate
64
54
   objectives, or point out any high-risk things that are best done early,
71
61
     bzr branch trunk prepare-1.14
72
62
 
73
63
#. Configure pqm-submit for this branch, with a section like this (where
74
 
   x.y is the version to release).
 
64
   x.y is the version to release). **Or use hydrazine for easy use**
75
65
   ``~/.bazaar/locations.conf``::
76
66
 
77
67
        [/home/mbp/bzr/prepare-x.y]
82
72
        submit_to = bazaar@lists.canonical.com
83
73
        smtp_server = mail.example.com:25
84
74
 
85
 
    Please see <http://doc.bazaar-vcs.org/developers/HACKING.html#an-overview-of-pqm>
 
75
    Please see <http://doc.bazaar.canonical.com/developers/HACKING.html#an-overview-of-pqm>
86
76
    for more details on PQM
87
77
 
 
78
#. Update the version number in the ``bzr`` script, and the
 
79
   ``bzrlib/__init__.py`` file::
 
80
   
 
81
       version_info = (x, y, z, 'dev', 0)
 
82
   
 
83
#. Add a new section at the top of ``NEWS`` about the new release,
 
84
   including its version number and the headings from
 
85
   ``NEWS-template.txt``.
 
86
 
 
87
#. Update the "What's New" documents in ``doc/en/whats-new``.
 
88
 
 
89
#. Commit this and send it to PQM.
 
90
 
 
91
 
 
92
Doing a particular release
 
93
==========================
 
94
 
 
95
Update the source code
 
96
----------------------
 
97
 
 
98
#. Check that there is a milestone for the release you're doing. If there
 
99
   is no milestone it indicates a process problem - make the milestone but
 
100
   also mail the list to raise this issue in our process. Milestones are
 
101
   found at <https://launchpad.net/bzr/+milestone/x.y.z>.
 
102
 
88
103
#. In the release branch, update  ``version_info`` in ``./bzrlib/__init__.py``.
89
104
   Make sure the corresponding milestone exists.
90
105
   Double check that ./bzr ``_script_version`` matches ``version_info``. Check
92
107
 
93
108
   For beta releases use::
94
109
 
 
110
       version_info = (2, 1, 0, 'beta', SERIAL)
 
111
 
 
112
   For instance 2.1b1::
 
113
 
95
114
       version_info = (2, 1, 0, 'beta', 1)
96
115
 
97
 
 
98
116
   For release candidates use::
99
117
 
100
 
       version_info = (2, 0, 1, 'candidate', 1)
101
 
 
102
 
 
103
 
Starting the release phase
104
 
--------------------------
105
 
 
106
 
#. Create a new milestone at <https://launchpad.net/bzr/x.y/+addmilestone>
107
 
   for the beta release or release candidate if you haven't already.
108
 
 
109
 
#. Add the date and release number to ``./NEWS``
110
 
 
111
 
   Depending on whether you're doing a beta or a bugfix release, you'll
112
 
   have to create a NEWS section for your release in the right
113
 
   place. Most of the time, the new section is at the top of the file
114
 
   (look what have been done for the various 2.0x and 2.1.0bx releases).
115
 
   The rule is to keep the sections sorted by date. You'll need to be
116
 
   cautious when merging back to trunk to respect that.
 
118
       version_info = (2, 0, 1, 'candidate', SERIAL)
 
119
 
 
120
   For stable releases use::
 
121
 
 
122
       version_info = (2, 1, 2, 'final', 0)
 
123
 
 
124
#. Update the ``./NEWS`` section for this release.
 
125
 
 
126
   Fill out the date and a description of the release under the existing
 
127
   header. If there isn't one, follow the above for using the NEWS
 
128
   template.
 
129
 
 
130
   See *2.1.1* or similar for an example of what this looks like.
 
131
 
 
132
#. Add a summary of the release into the "What's New" document.
117
133
 
118
134
#. To check that all bugs mentioned in ``./NEWS`` are actually marked as
119
135
   closed in Launchpad, you can run ``tools/check-newsbugs.py``::
120
136
 
121
137
     ./tools/check-newsbugs.py NEWS
122
138
 
123
 
   (But note there can be some false positives, and this script may be
 
139
   (But note there will be many false positives, and this script may be
124
140
   flaky <https://bugs.edge.launchpad.net/bzr/+bug/354985>.  Don't let
125
141
   this slow you down too much.)
126
142
 
127
 
#. Summarize into one or two paragraphs what's new in this release.
128
 
 
129
143
#. Commit these changes to the release branch, using a command like::
130
144
 
131
145
     bzr commit -m "Release 1.14."
170
184
 
171
185
     bzr tag bzr-1.14
172
186
 
173
 
#. Push those changes to a bzr reposistory that is public and accessible on
 
187
#. Push those changes to a bzr repository that is public and accessible on
174
188
   the Internet. PQM will pull from this repository when it attempts to merge
175
189
   your changes. Then submit those changes to PQM for merge into the
176
190
   appropriate release branch::
178
192
     bzr push
179
193
     bzr pqm-submit -m "(mbp) prepare 1.14"
180
194
 
 
195
   Or with hydrazine::
 
196
 
 
197
     bzr lp-propose -m "Release 1.14" --approve lp:bzr/1.14
 
198
     feed-pqm bzr
 
199
 
181
200
#. When PQM succeeds, pull down the master release branch.
182
201
 
183
202
 
199
218
   disable the faulty plugins one by one until you get no more
200
219
   failures.
201
220
 
 
221
   Remember that PQM has just tested everything too, this step is
 
222
   particularly testing that the pyrex extensions, which are updated
 
223
   by your local pyrex version when you run make dist, are in good
 
224
   shape.
 
225
 
202
226
 
203
227
Publishing the source tarball
204
228
-----------------------------
205
229
 
206
230
#. Go to the relevant milestone page in Launchpad.
207
231
 
208
 
#. Within that release, upload the source tarball and the GPG
209
 
   signature.  Or, if you prefer, use the
210
 
   ``tools/packaging/lp-upload-release`` script to do this.
 
232
#. Create a release of the milestone, and upload the source tarball and
 
233
   the GPG signature.  Or, if you prefer, use the
 
234
   ``tools/packaging/lp-upload-release`` script to do this. Note that
 
235
   this changes what the download widget on the Launchpad bzr home
 
236
   page shows, so don't stop the release process yet, or platform binary
 
237
   installers won't be made and the download list will stay very small!
 
238
   <https://bugs.edge.launchpad.net/launchpad/+bug/586445>
211
239
 
212
240
 
213
241
Announcing the source freeze
219
247
   release.
220
248
 
221
249
 
 
250
Kick off the next cycle
 
251
-----------------------
 
252
 
 
253
#. To let developers work on the next release, do
 
254
   `At the start of a release cycle` now.
 
255
 
 
256
#. Pause for a few days.
 
257
 
 
258
 
222
259
Publishing the release
223
260
----------------------
224
261
 
227
264
we have a releasable product.  The next step is to make it generally
228
265
available to the world.
229
266
 
230
 
go to the release
231
 
 
232
 
#. Within that release, upload the source tarball and zipfile and the GPG
233
 
   signature.  Or, if you prefer, use the
234
 
   ``tools/packaging/lp-upload-release`` script to do this.
235
 
 
236
 
#. Link from http://bazaar-vcs.org/SourceDownloads to the tarball and
237
 
   signature.
238
 
 
239
 
#. Announce on the `Bazaar website <http://bazaar-vcs.org/>`_.
 
267
#. Go to the release web page at <https://launchpad.net/bzr/x.y/x.y.z>
 
268
 
 
269
#. Announce on the `Bazaar website <http://bazaar.canonical.com/>`_.
240
270
   This page is edited via the lp:bzr-website branch. (Changes
241
271
   pushed to this branch are refreshed by a cron job on escudero.)
242
272
 
243
 
#. Announce on the `Bazaar wiki <http://bazaar-vcs.org/Welcome>`_.
244
 
 
245
273
#. Check that the documentation for this release is available in
246
 
   <http://doc.bazaar-vcs.org>.  It should be automatically build when the
 
274
   <http://doc.bazaar.canonical.com>.  It should be automatically build when the
247
275
   branch is created, by a cron script ``update-bzr-docs`` on
248
276
   ``escudero``. As of today (2009-08-27) ``igc`` manually updates the
249
277
   pretty version of it.
270
298
 
271
299
   The announce mail will look something like this::
272
300
 
273
 
      Subject: bzr x.yy released!
 
301
      Subject: bzr x.y.z released!
274
302
 
275
303
      <<Summary paragraph from news>>
276
304
 
282
310
      feedback.
283
311
 
284
312
      Bazaar is now available for download from
285
 
      http://bazaar-vcs.org/Download as a source tarball; packages
 
313
      https://launchpad.net/bzr/2.x/2.x/ as a source tarball; packages
286
314
      for various systems will be available soon.
287
315
 
288
316
      <<NEWS section from this release back to the last major release>>
318
346
Merging the released code back to trunk
319
347
---------------------------------------
320
348
 
 
349
The rule is to keep ``NEWS`` sections sorted by date. You'll need to
 
350
review the merge and make sure that that is respected.
 
351
 
321
352
Merge the release branch back into the trunk.  Check that changes in NEWS
322
353
were merged into the right sections.  If it's not already done, advance
323
354
the version number in ``bzr`` and ``bzrlib/__init__.py``.  Submit this
327
358
created the corresponding milestone to ensure the continuity in bug
328
359
targeting or nominating. Depending on the change, you may even have to
329
360
create a new series (if your change the major or minor release number), in
330
 
that case go to `Starting a cycle` and follow the instructions from there.
 
361
that case go to `At the start of a release cycle` and follow the instructions from there.
331
362
 
332
363
You should also merge (not pull) the release branch into
333
364
``lp:~bzr/bzr/current``, so that branch contains the current released code
341
372
candidate, you're not finished yet. Another beta or candidate or
342
373
hopefully a final release is still to come.
343
374
 
344
 
The process is the same as for the first release. Goto `Starting the
345
 
release phase`_ and follow the instructions again. Some details change
 
375
The process is the same as for the first release. Goto `Doing a
 
376
particular release`_ and follow the instructions again. Some details change
346
377
between beta, candidate and final releases, but they should be
347
378
documented. If the instructions aren't clear enough, please fix them.
348
379