Merge lp:~gary/launchpad/bug578854 into lp:launchpad

Proposed by Gary Poster
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 14649
Proposed branch: lp:~gary/launchpad/bug578854
Merge into: lp:launchpad
Diff against target: 215 lines (+90/-69)
1 file modified
doc/buildout.txt (+90/-69)
To merge this branch: bzr merge lp:~gary/launchpad/bug578854
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code/doc Approve
Review via email: mp+87787@code.launchpad.net

Commit message

Update buildout docs for clarity

Description of the change

This branch is part of an effort to quickly handle the bugs that have been assigned to me for awhile.

It simply updates the buildout document to address concerns Jeroen raised in bug 578854. Along the way I updated other text to try and bring it a bit more up to date.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you for the informative read.

review: Approve (code/doc)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/buildout.txt'
2--- doc/buildout.txt 2011-12-21 18:58:03 +0000
3+++ doc/buildout.txt 2012-01-06 17:44:27 +0000
4@@ -1,16 +1,16 @@
5 Launchpad Buildout
6 ******************
7
8-Launchpad is moving to using the buildout_ (or "zc.buildout") build system. It
9-will gradually replace the sourcecode directory, and hopefully also the
10-Launchpad Makefile.
11+Launchpad uses the buildout_ (or "zc.buildout") build system.
12+Buildout's biggest strength is managing Python packages. That is also
13+our focus for it.
14
15-Buildout's biggest strength is managing Python packages. That will also be our
16-primary focus for it. Meanwhile, apt will continue to manage our Python
17-language installation, as well some or all of our non-Python dependencies, such
18-as PostgreSQL. While Bazaar will continue to be an essential part of our
19-toolchain, we will move away from using it to incorporate source code trees of
20-our dependencies.
21+We have at least two other ways of managing dependencies. Apt
22+manages our Python language installation, as well as many of our
23+non-Python system-level dependencies, such as PostgreSQL. The
24+sourcecode directory is our other way of managing dependencies. It is
25+supposed to only contain dependencies that are not standard Python
26+packages. bzr plugins and Javascript libraries are existing examples.
27
28 If you are not interested in our `Motivations`_ or in an `Introduction to
29 zc.buildout`_, all developers will at least want to read the very brief
30@@ -36,16 +36,18 @@
31 * We want more careful specification of our dependencies across branches.
32 [INTERNAL] [EXTERNAL]
33
34- This is a real concern pertinent both for our "trunks" (devel, stable,
35- db-devel, db-stable) and for our development boxes. For instance, now, in our
36- trunks, when we want to update a dependency, we need to make sure that *all*
37- the current Launchpad trunks work with the dependency initially; then submit
38- a new Launchpad branch that uses the change dependency. A mistake can
39- even potentially break one or both of the db-* trunks, since PQM only tests
40- against one branch (usually devel), and sourcecode changes affect all
41- branches at once. For simplicity, speed, and safety, we want to be able to
42- submit a single branch that incorporates the source dependencies and the
43- associated changes at once.
44+ This is a real concern pertinent both for our "trunks" (devel,
45+ stable, db-devel, db-stable) and for our development boxes. For
46+ instance, before incorporating buildout, in our trunks, when we want
47+ to update a dependency, we needed to make sure that *all* the
48+ current Launchpad trunks work with the dependency initially; then
49+ submit a new Launchpad branch that uses the change dependency. A
50+ mistake can even potentially break one or both of the db-* trunks,
51+ since PQM only tests against one branch (usually devel), and
52+ sourcecode changes affect all branches at once. For simplicity,
53+ speed, and safety, we want to be able to submit a single branch that
54+ incorporates the source dependencies and the associated changes at
55+ once.
56
57 This is also true, if less critical and easier to work around, on developer
58 boxes. Without care, changes to sourcecode when working on dependencies will
59@@ -58,17 +60,18 @@
60 A significant number of projects do not always have a pristine trunk, and
61 many also spend extra effort on polish, bug fixes, and compatibility before a
62 release. If we do not desperately need a new feature on trunk, using a
63- release is generally regarded as a safer, better practice. Our current usage
64+ release is generally regarded as a safer, better practice. Our earlier usage
65 of bzr branches of the development trunks does not encourage this practice.
66
67 * We want to be encouraged to make the effort to interact with upstream
68 projects to have our patches integrated. [EXTERNAL]
69
70- Interacting and negotiating with upstream is undeniably more time-consuming
71- than our current practice of maintaining local bzr branches with our patches,
72- especially short-term. But our current practice is not good open-source
73- community behavior--an ironic characteristic for a project like Launchpad. It
74- also can cause problems down the road, for instance, if the patch becomes
75+ Interacting and negotiating with upstream is undeniably more
76+ time-consuming than our previous practice of maintaining local bzr
77+ branches with our patches, especially short-term. But our previous
78+ use of bzr branches is not good open-source community behavior--an
79+ ironic characteristic for a project like Launchpad. It also can
80+ cause problems down the road, for instance, if the patch becomes
81 stale and we want to migrate to new releases.
82
83 * We want to be protected from changes and differences in our operating system.
84@@ -76,13 +79,14 @@
85
86 This is a concern both over time and across different Launchpad environments.
87
88- First, our operating system, Ubuntu, is driven by many needs and goals.
89- Launchpad is among them, but generally Launchpad serves Ubuntu, not the
90- reverse. For instance, recently Jaunty dropped Launchpad's Python version.
91- The Ubuntu developers had good reason--Python 2.4 has not been supported by
92- the Python developers for some time--but it caused a significant
93- inconvenience to the Launchpad team. Managing our dependencies, particularly
94- the Python library dependencies, can help alleviate these problems.
95+ First, our operating system, Ubuntu, is driven by many needs and
96+ goals. Launchpad is among them, but generally Launchpad serves
97+ Ubuntu, not the reverse. For instance, Jaunty dropped Launchpad's
98+ Python version. The Ubuntu developers had good reason--Python 2.4
99+ has not been supported by the Python developers for some time--but
100+ it caused a significant inconvenience to the Launchpad
101+ team. Managing our dependencies, particularly the Python library
102+ dependencies, can help alleviate these problems.
103
104 Second, Launchpad developers run a significantly different version of the
105 operating system than that run in production. Maintaining our Python library
106@@ -420,55 +424,72 @@
107
108 ./bin/buildout -v buildout:install-from-cache=false | tee out.txt | grep 'Picked'
109
110- The first part (``./bin/buildout -v buildout:install-from-cache=false``)
111- will run buildout, allowing it to download source packages from the
112- Internet to ``download-cache/dist``. The second part (``tee out.txt``) will
113- dump the full output to the ``out.txt`` file in case you need to debug a
114- problem. The last part (``grep 'Picked'``) will filter the output so that
115- only additional packages--dependencies of your dependency--will be listed.
116- Look at the output. You need to see if it means that you have dependencies,
117- some of which may be indirect dependencies. Here's an imaginary example
118- output::
119+ The first part (``./bin/buildout -v
120+ buildout:install-from-cache=false``) will run buildout, allowing
121+ it to download source packages from the Internet to
122+ ``download-cache/dist``. The second part (``tee out.txt``) will
123+ dump the full output to the ``out.txt`` file in case you need to
124+ debug a problem. The last part (``grep 'Picked'``) will filter the
125+ output so that only additional packages--dependencies of your
126+ dependency--will be listed. You need to see if it means that you
127+ have dependencies, some of which may be indirect
128+ dependencies. We'll see how to do this with an example. Here's an
129+ imaginary output::
130
131 Picked: ipython = 0.9.1
132 Picked: lazr.foom = 1.4
133 Picked: zope.bar = 3.6.1
134 Picked: z3c.shazam = 2.0.1
135
136- At this time, note that the output will include at least one, and possibly
137- more, spurious "Picked:" listings. ipython, in particular, shows up
138- repeatedly.
139-
140- In our example, other than the spurious ``ipython`` listing, this means
141- that these packages have also been added to your ``download-cache/dist``
142- directory. You also need to add those versions to the ``versions.cfg``
143- file::
144-
145+ In our example, this means that these packages have been added to
146+ your ``download-cache/dist`` directory. You now need to add those
147+ versions to the ``versions.cfg`` file::
148+
149+ ipython = 0.9.1
150 lazr.foom = 1.4
151 zope.bar = 3.6.1
152 z3c.shazam = 2.0.1
153
154+ Note that the output might include at least one, and possibly
155+ more, spurious "Picked:" listings. ipython, in particular, has
156+ shown up in the past incorrectly--that is, when you try to add the
157+ file to the download-cache/dist directory, you'll discover that it
158+ is already there; and you'll see that versions.cfg already
159+ specifies the version. As long as the test passes (see step 5,
160+ below), you can ignore this.
161+
162 5. Test.
163
164- [TODO] Note that you can tell ec2test to include all uncommitted
165- distributions from the local download-cache in its tests. If you do this,
166- you cannot use the ec2test feature to submit on test success. Also, if you
167- have uncommitted distributions and you do *not* explicitly tell ec2test to
168- include or ignore the uncommitted distributions, it will refuse to start
169- an instance.
170-
171-6. Check old versions in the download-cache. If you are sure that they are
172- not in use any more, *anywhere*, then remove them to save checkout space.
173- More explicitly, check with the LOSAs to see if they are in use in
174- production and send an email to launchpad-dev@lists.launchpad.net before
175- deleting anything if you are unsure.
176-
177-7. Commit the changes (``cd download-cache``, ``bzr up``,
178- ``bzr commit -m 'Add lazr.foom 1.1.2 and depdendencies to the download
179- cache'``) to the shared download cache when you are sure it is what you
180- want.
181-
182-*Never* modify a package in the download-cache.
183+ Note that you can tell ``ec2 test`` to include all uncommitted
184+ distributions from the local download-cache in its tests with the
185+ ``--include-download-cache-changes`` flag (or ``-c``). If you do
186+ this, you cannot use the ec2 test feature to submit on test
187+ success. Also, if you have uncommitted distributions and you do
188+ *not* explicitly tell ec2 test to include or ignore the
189+ uncommitted distributions, it will refuse to start an instance.
190+
191+6. Check old versions in the download-cache. If you are sure that
192+ they are not in use any more, *anywhere*, then remove them to save
193+ checkout space. More explicitly, check with the LOSAs to see if
194+ they are in use in production and send an email to
195+ launchpad-dev@lists.launchpad.net before deleting anything if you
196+ are unsure. A rule of thumb is that it's worth starting this
197+ investigation if the replacement has already been in use by the
198+ Launchpad tree for more than a month. You can approximate this
199+ information by using ``bzr log`` on the newer (replacement)
200+ download-cache/dist file for the particular package.
201+
202+7. Now you need to share your package changes with the rest of the
203+ team. You must do this before submitting your Launchpad branch to
204+ PQM or else your branch will not build properly anywhere else,
205+ including buildbot. Commit the changes (``cd download-cache``,
206+ bzr add the needed files, ``bzr up``, ``bzr commit -m 'Add
207+ lazr.foom 1.1.2 and depdendencies to the download cache'``) to the
208+ shared download cache when you are sure it is what you want.
209+
210+*Never* modify a package in the download-cache. A change in code must mean a
211+change in version number, or else very bad inconsistencies and
212+confusion across build environments will happen.
213
214
215 Upgrade a Package