Merge lp:~flacoste/launchpad/bug-129943 into lp:launchpad

Proposed by Francis J. Lacoste
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11192
Proposed branch: lp:~flacoste/launchpad/bug-129943
Merge into: lp:launchpad
Diff against target: 633 lines (+388/-67)
11 files modified
configs/development/launchpad.conf (+1/-1)
configs/testrunner/launchpad-lazr.conf (+3/-0)
lib/canonical/config/schema-lazr.conf (+5/-0)
lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml (+266/-0)
lib/canonical/launchpad/ftests/googlesearches/mapping.txt (+2/-0)
lib/lp/app/browser/root.py (+47/-9)
lib/lp/app/browser/tests/test_launchpadroot.py (+4/-0)
lib/lp/app/stories/launchpad-root/front-pages.txt (+45/-30)
lib/lp/app/templates/root-index.pt (+13/-27)
setup.py (+1/-0)
versions.cfg (+1/-0)
To merge this branch: bzr merge lp:~flacoste/launchpad/bug-129943
Reviewer Review Type Date Requested Status
Matthew Revell (community) acceptance Approve
Robert Collins (community) Approve
Review via email: mp+30158@code.launchpad.net

Commit message

Automatically fetches the recent blog posts list from the blog RSS feed

Description of the change

  = Summary =

This fetches the recent blog posts from the blog site RSS feed.

== Pre-implementation notes ==

 * Discused requirements with mrevell

== Implementation details ==

 * I use urlfetch to retrieve the feed since that urllib2 wrapper supports
   timeout.
 * I use the feedparser module to do the RSS parsing.
 * I use memcached so that we don't fetch / parse the results more than once
   an hour.

Matt told me to use the general feed for now and I used 6 as the number of
posts to display since that's what we are using now.

The description returned by the feed is longer than what we have now on the
front page. I don't know if we can fix this on the blog side.

You can find a screenshot of what it looks like at:
http://people.canonical.com/~flacoste/automatic-recent-blogs.png

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

8 - address 8089
9 + address 8088

seems unrelated?

While you're there -
444 +
445 The homepage looks different when the use is logged in:
..................................................^r

Lastly, python-feedparser is a pretty static dependency, please consider using the launchpad-dependencies for it rather than buildout - its less unchanging stuff to be copied to the appservers on every deployment.

review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :

Tweaking to needsfixing - sorry for the noise. (the port number needs fixing or explaining, the rest is optional-but-preferred :).

review: Needs Fixing
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Thanks for the review.

I've fixed the typo.

The port number was changed because 8089 conflicts with Banshee DAAP locally. Since it might burn other folks too, I decided to commit it.

Even though python-feedparser is a pretty static dependancy, I'd really not want to block on a l-d-d update to land this branch. If you insist, I could add it to the launchpad-dependencies, so that the next deployment of it, would pull it off and use it instead of the one in the download-cache. I would not ask LOSA to go to the trouble of building new buildbot images and deploy these two packages across all app servers for that dependency.

Revision history for this message
Robert Collins (lifeless) wrote :

> Even though python-feedparser is a pretty static dependancy, I'd really not want to block on a l-d-d update to land this branch. If you insist, I could add it to the launchpad-dependencies, so that the next deployment of it, would pull it off and use it instead of the one in the download-cache. I would not ask LOSA to go to the trouble of building new buildbot images and deploy these two packages across all app servers for that dependency.

I'm fine with not blocking.

If we need new buildbot images when a standard packaged item is added
to the deps, thats a bug in our use of buildbot we should just fix. Is
that historical or current experience?

James and Tom have indicated in the past that new deps in the packages
are trivial for them to accomodate when they are of standard packages,
so I wouldn't expect any difficulty in having it deployed promptly.

But again, I'm fine with not blocking, doing the l-prod-d dependency
change and when that has been fully actioned dropping the buildout
stanza.

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Actually, after asking Gary, that might be historical. It seems we do update package dependencies at the beginning of every test run.

Once the package is installed, we don't remove the buildout stanza as this is still a dependency of the system. buildout will use the system-installed version to resolve the dependency automatically instead of building an eggs from the source distribution in the download-cache.

Cheers

Revision history for this message
Robert Collins (lifeless) wrote :

\o/

review: Approve
Revision history for this message
Matthew Revell (matthew.revell) wrote :

As discussed on the phone, I'm happy with using the main blog feed and also with keeping a static story about the open sourcing until we redesign the home page.

review: Approve (acceptance)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configs/development/launchpad.conf'
--- configs/development/launchpad.conf 2010-03-02 07:33:03 +0000
+++ configs/development/launchpad.conf 2010-07-21 18:54:52 +0000
@@ -19,7 +19,7 @@
19# an exception, Zope will drop into pdb at the point of the exception.19# an exception, Zope will drop into pdb at the point of the exception.
20<server>20<server>
21 type PostmortemDebuggingHTTP21 type PostmortemDebuggingHTTP
22 address 808922 address 8088
23</server>23</server>
2424
25<server>25<server>
2626
=== modified file 'configs/testrunner/launchpad-lazr.conf'
--- configs/testrunner/launchpad-lazr.conf 2010-06-08 15:13:20 +0000
+++ configs/testrunner/launchpad-lazr.conf 2010-07-21 18:54:52 +0000
@@ -132,6 +132,9 @@
132max_attachment_size: 1024132max_attachment_size: 1024
133geoip_database: /usr/share/GeoIP/GeoLiteCity.dat133geoip_database: /usr/share/GeoIP/GeoLiteCity.dat
134logparser_max_parsed_lines: 100000134logparser_max_parsed_lines: 100000
135# We use the stub Google Service here which maps URL fragment to
136# to static content
137homepage_recent_posts_feed: http://launchpad.dev:8092/blog-feed
135138
136[launchpad_session]139[launchpad_session]
137cookie: launchpad_tests140cookie: launchpad_tests
138141
=== modified file 'lib/canonical/config/schema-lazr.conf'
--- lib/canonical/config/schema-lazr.conf 2010-07-14 15:37:51 +0000
+++ lib/canonical/config/schema-lazr.conf 2010-07-21 18:54:52 +0000
@@ -1138,6 +1138,11 @@
1138# log parser. The default value of None means there is no maximum.1138# log parser. The default value of None means there is no maximum.
1139logparser_max_parsed_lines: None1139logparser_max_parsed_lines: None
11401140
1141# The URL to the RSS feed that will be displayed on the front page
1142homepage_recent_posts_feed: http://blog.launchpad.net/feed
1143
1144# The number of items to display:
1145homepage_recent_posts_count: 6
11411146
1142[launchpad_session]1147[launchpad_session]
1143# The hostname where the session database is located.1148# The hostname where the session database is located.
11441149
=== added file 'lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml'
--- lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml 1970-01-01 00:00:00 +0000
+++ lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml 2010-07-21 18:54:52 +0000
@@ -0,0 +1,266 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<rss version="2.0"
3 xmlns:content="http://purl.org/rss/1.0/modules/content/"
4 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:atom="http://www.w3.org/2005/Atom"
7 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
8 xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
9 >
10
11<channel>
12 <title>Launchpad blog</title>
13 <atom:link href="http://blog.launchpad.net/feed" rel="self" type="application/rss+xml" />
14 <link>http://blog.launchpad.net</link>
15 <description>Thoughts from the Launchpad team</description>
16 <lastBuildDate>Fri, 16 Jul 2010 13:02:58 +0000</lastBuildDate>
17 <generator>http://wordpress.org/?v=2.8.4</generator>
18 <language>en</language>
19 <sy:updatePeriod>hourly</sy:updatePeriod>
20 <sy:updateFrequency>1</sy:updateFrequency>
21 <item>
22 <title>Launchpad EPIC 2010 photo</title>
23 <link>http://blog.launchpad.net/general/launchpad-epic-2010-photo</link>
24 <comments>http://blog.launchpad.net/general/launchpad-epic-2010-photo#comments</comments>
25 <pubDate>Fri, 16 Jul 2010 13:02:58 +0000</pubDate>
26 <dc:creator>Matthew Revell</dc:creator>
27 <category><![CDATA[General]]></category>
28
29 <guid isPermaLink="false">http://blog.launchpad.net/?p=1631</guid>
30 <description><![CDATA[The Launchpad and Bazaar teams have been in Prague this week. More on what we got done in later posts. For now, here&#8217;s a photo!
31]]></description>
32 <content:encoded><![CDATA[<p>The Launchpad and Bazaar teams have been in Prague this week. More on what we got done in later posts. For now, here&#8217;s a photo!<br />
33<div id="attachment_1632" class="wp-caption alignnone" style="width: 730px"><img src="/wp-content/uploads/2010/07/epic2010-team-photo.JPG" alt="The Launchpad and Bazaar teams in Prague" title="epic2010-team-photo" width="720" height="479" class="size-full wp-image-1632" /><p class="wp-caption-text">The Launchpad and Bazaar teams in Prague</p></div></p>
34]]></content:encoded>
35 <wfw:commentRss>http://blog.launchpad.net/general/launchpad-epic-2010-photo/feed</wfw:commentRss>
36 <slash:comments>0</slash:comments>
37 </item>
38 <item>
39 <title>Three tips for faster launchpadlib api clients</title>
40 <link>http://blog.launchpad.net/api/three-tips-for-faster-launchpadlib-api-clients</link>
41 <comments>http://blog.launchpad.net/api/three-tips-for-faster-launchpadlib-api-clients#comments</comments>
42 <pubDate>Wed, 14 Jul 2010 13:30:04 +0000</pubDate>
43 <dc:creator>Martin Pool</dc:creator>
44 <category><![CDATA[API]]></category>
45 <category><![CDATA[clients]]></category>
46 <category><![CDATA[performance]]></category>
47 <category><![CDATA[tip]]></category>
48
49 <guid isPermaLink="false">http://blog.launchpad.net/?p=1626</guid>
50 <description><![CDATA[Three tips from Leonard&#8217;s lightning talk in Prague about writing faster Launchpadlib API clients:
511. Use the latest launchpadlib. It gets faster from one release to the next. (The versions in the current Ubuntu release should be fine; otherwise run from the branch or the latest tarball.)
522. Profile:
53
54 import httplib2
55 [...]]]></description>
56 <content:encoded><![CDATA[<p>Three tips from <a href="http://launchpad.net/~leonardr">Leonard&#8217;s</a> lightning talk in Prague about writing faster <a href="https://help.launchpad.net/API/launchpadlib#preview">Launchpadlib</a> API clients:</p>
57<p><b>1. Use the latest launchpadlib.</b> It gets faster from one release to the next. (The versions in the current Ubuntu release should be fine; otherwise run from the <a href="https://code.edge.launchpad.net/~lazr-developers/launchpadlib/trunk">branch</a> or the latest <a href="https://launchpad.net/launchpadlib/+download">tarball</a>.)</p>
58<p><b>2. Profile:</b></p>
59<pre>
60 import httplib2
61 httplib2.debuglevel = 1
62</pre>
63<p>will show each http request and response, so that you can see what&#8217;s taking time.</p>
64<p><b>3. Fetch objects only once:</b></p>
65<p>Don&#8217;t do this:</p>
66<pre>
67 if bug.person is not None:
68 print bug.person.name
69</pre>
70<p>instead</p>
71<pre>
72 p = bug.person
73 if p is not None:
74 print p.name
75</pre>
76<p>In the first case, the client may fetch the Person object twice. (We may fix this in future.)</p>
77]]></content:encoded>
78 <wfw:commentRss>http://blog.launchpad.net/api/three-tips-for-faster-launchpadlib-api-clients/feed</wfw:commentRss>
79 <slash:comments>5</slash:comments>
80 </item>
81 <item>
82 <title>New Launchpad Bugs Status: Opinion</title>
83 <link>http://blog.launchpad.net/bug-tracking/new-bugs-status-opinion</link>
84 <comments>http://blog.launchpad.net/bug-tracking/new-bugs-status-opinion#comments</comments>
85 <pubDate>Wed, 07 Jul 2010 08:18:33 +0000</pubDate>
86 <dc:creator>Deryck Hodge</dc:creator>
87 <category><![CDATA[Bug Tracking]]></category>
88
89 <guid isPermaLink="false">http://blog.launchpad.net/?p=1613</guid>
90 <description><![CDATA[Many different types of information are stored in bug reports in Launchpad.
91Some are actual defects, some are feature requests, some are general issues, and so on.  It is not uncommon on Launchpad to have a bug that deals with an issue that a developer cannot resolve.  In Launchpad, we offer a couple of bug [...]]]></description>
92 <content:encoded><![CDATA[<p>Many different types of information are stored in bug reports in Launchpad. </p>
93<p>Some are actual defects, some are feature requests, some are general issues, and so on.  It is not uncommon on Launchpad to have a bug that deals with an issue that a developer cannot resolve.  In Launchpad, we offer a couple of bug statuses that allow a developer to close a bug report without actually doing what is requested in the report: these are <em>Won&#8217;t Fix</em> and <em>Invalid</em>. </p>
94<p>Often, though, there may still be a discussion. <em>Won&#8217;t Fix</em> and <em>Invalid</em> are useful for the developer, and the project, to know that they don&#8217;t need to schedule time for a fix. However, they can sometimes &mdash; rightly or wrongly &mdash; be seen as an attempt to close down to discussion.</p>
95<p>We&#8217;ve just added a new bug status to Launchpad: <em>Opinion</em>. Now, this is a fairly momentous occasion; we hardly ever make changes to bug statuses because they, naturally, have a great impact on how you and others use Launchpad to track bugs. However, we feel it&#8217;s important to find a way to balance a project&#8217;s need for useful work planning with the need for intelligent and open discussion.</p>
96<p><em>Opinion</em> says: there&#8217;s a difference of opinion around this bug and people are free to continue the discussion, but the project or package maintainers need to move to other work and are considering the issue closed.</p>
97<p>Like I said, adding a new bug status to Launchpad is a big deal. So, we&#8217;re treating <em>Opinion</em> as an experiment. We&#8217;ll watch how it is used over the next three months and then we&#8217;ll decide if the status is proving useful and effective at closing bugs while leaving the discussion open.</p>
98<p>I&#8217;d love to hear your views on this new status: leave a comment here, join us on the <a href="https://launchpad.net/~launchpad-users">launchpad-users</a> mailing list or <a href="https://launchpad.net/~deryck/+contactuser">mail me directly</a>.</p>
99]]></content:encoded>
100 <wfw:commentRss>http://blog.launchpad.net/bug-tracking/new-bugs-status-opinion/feed</wfw:commentRss>
101 <slash:comments>4</slash:comments>
102 </item>
103 <item>
104 <title>SFTP uploads to PPAs!</title>
105 <link>http://blog.launchpad.net/cool-new-stuff/sftp-uploads</link>
106 <comments>http://blog.launchpad.net/cool-new-stuff/sftp-uploads#comments</comments>
107 <pubDate>Wed, 07 Jul 2010 08:07:03 +0000</pubDate>
108 <dc:creator>Matthew Revell</dc:creator>
109 <category><![CDATA[Cool new stuff]]></category>
110 <category><![CDATA[PPA]]></category>
111
112 <guid isPermaLink="false">http://blog.launchpad.net/?p=1607</guid>
113 <description><![CDATA[You can now use SFTP to upload source packages to your Personal Package Archive!
114If you&#8217;re already familiar with uploading to a PPA, all you need to do is ensure your dput.cf includes the following:
115
116method = sftp
117login = &#60;your Launchpad account name&#62;
118
119If you&#8217;re new to PPAs, but already know how to create packages for Ubuntu, take [...]]]></description>
120 <content:encoded><![CDATA[<p>You can now use SFTP to upload source packages to your Personal Package Archive!</p>
121<p>If you&#8217;re already familiar with uploading to a PPA, all you need to do is ensure your <code>dput.cf</code> includes the following:</p>
122<p><code><br />
123method = sftp<br />
124login = &lt;your Launchpad account name&gt;<br />
125</code></p>
126<p>If you&#8217;re new to PPAs, but already know how to create packages for Ubuntu, <a href="https://help.launchpad.net/Packaging/PPA">take a look at our guide</a>.</p>
127]]></content:encoded>
128 <wfw:commentRss>http://blog.launchpad.net/cool-new-stuff/sftp-uploads/feed</wfw:commentRss>
129 <slash:comments>4</slash:comments>
130 </item>
131 <item>
132 <title>UPDATED: Launchpad read-only 23.00 UTC 6th July</title>
133 <link>http://blog.launchpad.net/notifications/launchpad-read-only-23-00-utc-1st-july</link>
134 <comments>http://blog.launchpad.net/notifications/launchpad-read-only-23-00-utc-1st-july#comments</comments>
135 <pubDate>Mon, 28 Jun 2010 16:23:37 +0000</pubDate>
136 <dc:creator>Matthew Revell</dc:creator>
137 <category><![CDATA[Notifications]]></category>
138
139 <guid isPermaLink="false">http://blog.launchpad.net/?p=1609</guid>
140 <description><![CDATA[This replaces the previously announced period of unavailability for the 1st of July.
141Launchpad&#8217;s web interface will be read-only, with other aspects offline, for around 90 minutes from 23.00 UTC on the 6th of July 2010.
142This is to allow for the release of the latest Launchpad code.
143Starts: 23.00 UTC 6th July 2010
144Expected back online: 00.30 UTC [...]]]></description>
145 <content:encoded><![CDATA[<p><strong>This replaces the previously announced period of unavailability for the 1st of July.</strong></p>
146<p>Launchpad&#8217;s web interface will be read-only, with other aspects offline, for around 90 minutes from 23.00 UTC on the 6th of July 2010.</p>
147<p>This is to allow for the release of the latest Launchpad code.</p>
148<p><strong>Starts:</strong> 23.00 UTC 6th July 2010<br />
149<strong>Expected back online:</strong> 00.30 UTC 7th July 2010</p>
150]]></content:encoded>
151 <wfw:commentRss>http://blog.launchpad.net/notifications/launchpad-read-only-23-00-utc-1st-july/feed</wfw:commentRss>
152 <slash:comments>0</slash:comments>
153 </item>
154 <item>
155 <title>Take the Launchpad user survey!</title>
156 <link>http://blog.launchpad.net/general/take-the-launchpad-user-survey</link>
157 <comments>http://blog.launchpad.net/general/take-the-launchpad-user-survey#comments</comments>
158 <pubDate>Wed, 23 Jun 2010 12:26:00 +0000</pubDate>
159 <dc:creator>Matthew Revell</dc:creator>
160 <category><![CDATA[General]]></category>
161
162 <guid isPermaLink="false">http://blog.launchpad.net/?p=1604</guid>
163 <description><![CDATA[There are all sorts of different ways in which we in Canonical&#8217;s Launchpad team keep in touch with people who use Launchpad: informal conversations on IRC, attending Ubuntu Developer Summits, formal user research and so on.
164We want to hear from as many people who use Launchpad as possible. To help get there, I&#8217;ve created a [...]]]></description>
165 <content:encoded><![CDATA[<p>There are all sorts of different ways in which we in Canonical&#8217;s Launchpad team keep in touch with people who use Launchpad: informal conversations on IRC, attending Ubuntu Developer Summits, formal user research and so on.</p>
166<p>We want to hear from as many people who use Launchpad as possible. To help get there, I&#8217;ve created a survey with five questions. Tell us what you like about Launchpad, what you don&#8217;t and what sort of work you do in Launchpad:</p>
167<p><big><strong><a href="http://www.surveymonkey.com/s/launchpadsummer2010">Take the Launchpad user survey</a>!</strong></big></p>
168]]></content:encoded>
169 <wfw:commentRss>http://blog.launchpad.net/general/take-the-launchpad-user-survey/feed</wfw:commentRss>
170 <slash:comments>1</slash:comments>
171 </item>
172 <item>
173 <title>Meet Steve Kowalik</title>
174 <link>http://blog.launchpad.net/meet-the-devs/meet-steve-kowalik</link>
175 <comments>http://blog.launchpad.net/meet-the-devs/meet-steve-kowalik#comments</comments>
176 <pubDate>Mon, 21 Jun 2010 16:22:33 +0000</pubDate>
177 <dc:creator>Matthew Revell</dc:creator>
178 <category><![CDATA[Meet the devs]]></category>
179
180 <guid isPermaLink="false">http://blog.launchpad.net/?p=1597</guid>
181 <description><![CDATA[Steve Kowalik recently joined the Soyuz part of the Launchpad team at Canonical, so I asked him the, by now familiar, questions!
182Matthew: What were you doing before you joined the Launchpad team?
183Steve: I worked on the Ubuntu Mobile team for 2.5 years before switching to the Launchpad team to work on Soyuz.
184Matthew: Can we see [...]]]></description>
185 <content:encoded><![CDATA[<p><a href="https://launchpad.net/~stevenk">Steve Kowalik</a> recently joined the Soyuz part of the Launchpad team at Canonical, so I asked him the, by now familiar, questions!</p>
186<p><strong>Matthew: What were you doing before you joined the Launchpad team?</strong></p>
187<p><strong>Steve:</strong> I worked on the Ubuntu Mobile team for 2.5 years before switching to the Launchpad team to work on Soyuz.</p>
188<p><strong>Matthew: Can we see something that you&#8217;ve worked on from that time?</strong></p>
189<p><strong>Steve:</strong> You sure can. The images and large parts of the integration work for Ubuntu Netbook Remix 9.04 and Ubuntu Netbook Edition 9.10 were done by me. I was also responsible for image builds for the three ARM sub-architectures for the 9.10 release.</p>
190<p><strong>Matthew: Where do you work?</strong></p>
191<p><strong>Steve:</strong> I work from my apartment in Sydney, Australia.</p>
192<p><strong>Matthew: What can you see from your office window?</strong></p>
193<p><strong>Steve:</strong> Another apartment block, so not the most glamorous of settings. From the other side of my apartment, I can see the local river. So it depends on the definition of office, if it&#8217;s my &#8220;office&#8221; or the balcony I work from on summer days.</p>
194<p><strong>Matthew: What did you do before working at Canonical?</strong></p>
195<p><strong>Steve:</strong> I worked at a company in Burwood, NSW specializing in satellite communications, and worked on supporting and developing their in-house Debian-derived distribution.</p>
196<p><strong>Matthew: How did you get into free software?</strong></p>
197<p><strong>Steve:</strong> I became interested in Linux when I was in high school, after I came across the term and researched it on the Internet. I started running it in 1999, and switched to Debian from Red Hat in 2000. I became a Debian Developer in 2001, and switched to Ubuntu in mid 2005.</p>
198<p><strong>Matthew: What&#8217;s more important? Principle or pragmatism?</strong></p>
199<p><strong>Steve:</strong> I believe pragmatism is more important, as it allows people to use hard data to define the problem or solution space, and work within its boundaries.</p>
200<p><strong>Matthew: Do you/have you contribute(d) to any free software projects?</strong></p>
201<p><strong>Steve:</strong> I&#8217;ve had a large number of patches and changes in Ubuntu, some in Debian, and I&#8217;ve written a Debian package checker from scratch, called Linda. I&#8217;ve been involved in free software for over ten years now. </p>
202<p><strong>Matthew: Tell us something really cool about Launchpad that not enough people know about.</strong></p>
203<p><strong>Steve:</strong> You can now upload packages to PPAs and Ubuntu via SFTP! As an added bonus, I wrote the support for it in Launchpad.</p>
204<p><strong>Matthew: Is there anything in particular you plan to work on while you&#8217;re with Launchpad?</strong></p>
205<p><strong>Steve:</strong> I plan on helping to make Soyuz more stable, more feature-ful and hopefully, faster.</p>
206<p><strong>Matthew: Okay, <a href="https://launchpad.net/~kiko">Kiko</a>&#8217;s special question! You&#8217;re at your computer, you reach for your wallet: what are you most likely to be doing?</strong></p>
207<p><strong>Steve:</strong> I&#8217;m either paying a bill, or buying something online.</p>
208]]></content:encoded>
209 <wfw:commentRss>http://blog.launchpad.net/meet-the-devs/meet-steve-kowalik/feed</wfw:commentRss>
210 <slash:comments>0</slash:comments>
211 </item>
212 <item>
213 <title>Faster pages</title>
214 <link>http://blog.launchpad.net/general/faster-pages</link>
215 <comments>http://blog.launchpad.net/general/faster-pages#comments</comments>
216 <pubDate>Fri, 11 Jun 2010 15:15:43 +0000</pubDate>
217 <dc:creator>Curtis Hovey</dc:creator>
218 <category><![CDATA[General]]></category>
219
220 <guid isPermaLink="false">http://blog.launchpad.net/?p=1561</guid>
221 <description><![CDATA[I am happy to report that caching rules I put in place on many pages last week are effective. I did not want to announce that pages were faster until I could see read a week of oops reports to verify that the slow pages owned by the Launchpad registry team were no longer listed [...]]]></description>
222 <content:encoded><![CDATA[<p>I am happy to report that caching rules I put in place on many pages last week are effective. I did not want to announce that pages were faster until I could see read a week of oops reports to verify that the slow pages owned by the Launchpad registry team were no longer listed as problems. I am honestly surprised that all the slow pages I changes are not listed. I expected to make a reduction in timeouts between 50% and 80%. This looks like a 100% success. I know it is not 100%, but I think this means that milestone, series, and project pages load quicker and you are seeing fewer timeouts.</p>
223<p>Launchpad pages now have access to memcached to store fragments of pages. Parts of pages that are costly to generate are cached for minutes or hours depending on how often the data can change. In the case of distro series pages, architecture data changes every few months so the cache rules are 6 hours. Milestone pages were a challenge to cache. Active milestones cache bugs for 10 minutes, Inactive milestones cache for 3 hours. The milestone summary of statuses and assignments cache for 1 hour. If you do not know this, you may suspect there is a bug in launchpad, or wonder if you did not update a bug as you thought. We need a mechanism to expire change when data is changed.</p>
224<p>We are now adding cache rules to other pages to improve page load times.</p>
225]]></content:encoded>
226 <wfw:commentRss>http://blog.launchpad.net/general/faster-pages/feed</wfw:commentRss>
227 <slash:comments>4</slash:comments>
228 </item>
229 <item>
230 <title>Change to 2nd June Launchpad read-only/down-time</title>
231 <link>http://blog.launchpad.net/notifications/change-to-2nd-june-launchpad-read-onlydown-time</link>
232 <comments>http://blog.launchpad.net/notifications/change-to-2nd-june-launchpad-read-onlydown-time#comments</comments>
233 <pubDate>Tue, 01 Jun 2010 14:29:55 +0000</pubDate>
234 <dc:creator>Matthew Revell</dc:creator>
235 <category><![CDATA[Notifications]]></category>
236
237 <guid isPermaLink="false">http://blog.launchpad.net/?p=1557</guid>
238 <description><![CDATA[We&#8217;ve had to alter the times between which Launchpad&#8217;s web interface will be read-only, while everything else is offline, for the release of Launchpad 10.05.
239New start time: 11.00 UTC 2nd June 2010
240New end time: 14.00 UTC 2nd June 2010
241]]></description>
242 <content:encoded><![CDATA[<p>We&#8217;ve had to alter the times between which Launchpad&#8217;s web interface will be read-only, while everything else is offline, for the release of Launchpad 10.05.</p>
243<p><strong>New start time:</strong> 11.00 UTC 2nd June 2010<br />
244<strong>New end time:</strong> 14.00 UTC 2nd June 2010</p>
245]]></content:encoded>
246 <wfw:commentRss>http://blog.launchpad.net/notifications/change-to-2nd-june-launchpad-read-onlydown-time/feed</wfw:commentRss>
247 <slash:comments>1</slash:comments>
248 </item>
249 <item>
250 <title>UPDATED: Launchpad read-only 08.00-11.00 UTC 2nd June 2010</title>
251 <link>http://blog.launchpad.net/notifications/launchpad-read-only-08-00-11-00-utc-2nd-june-2010</link>
252 <comments>http://blog.launchpad.net/notifications/launchpad-read-only-08-00-11-00-utc-2nd-june-2010#comments</comments>
253 <pubDate>Mon, 31 May 2010 15:28:13 +0000</pubDate>
254 <dc:creator>Matthew Revell</dc:creator>
255 <category><![CDATA[Notifications]]></category>
256
257 <guid isPermaLink="false">http://blog.launchpad.net/?p=1553</guid>
258 <description><![CDATA[See our new post on this.
259]]></description>
260 <content:encoded><![CDATA[<p><a href="http://blog.launchpad.net/notifications/change-to-2nd-june-launchpad-read-onlydown-time">See our new post on this</a>.</p>
261]]></content:encoded>
262 <wfw:commentRss>http://blog.launchpad.net/notifications/launchpad-read-only-08-00-11-00-utc-2nd-june-2010/feed</wfw:commentRss>
263 <slash:comments>0</slash:comments>
264 </item>
265 </channel>
266</rss>
0267
=== modified file 'lib/canonical/launchpad/ftests/googlesearches/mapping.txt'
--- lib/canonical/launchpad/ftests/googlesearches/mapping.txt 2009-06-16 20:04:54 +0000
+++ lib/canonical/launchpad/ftests/googlesearches/mapping.txt 2010-07-21 18:54:52 +0000
@@ -20,3 +20,5 @@
2020
21/cse?client=google-csbe&cx=ABCDEF2323&ie=utf8&num=20&oe=utf8&output=xml_no_dtd&q=no-meaningful&start=0 googlesearchservice-no-meaningful-results.xml21/cse?client=google-csbe&cx=ABCDEF2323&ie=utf8&num=20&oe=utf8&output=xml_no_dtd&q=no-meaningful&start=0 googlesearchservice-no-meaningful-results.xml
2222
23# This stub service is also used to impersonate the Blog feed
24/blog-feed blog.launchpad.net-feed.xml
2325
=== modified file 'lib/lp/app/browser/root.py'
--- lib/lp/app/browser/root.py 2010-04-19 14:47:49 +0000
+++ lib/lp/app/browser/root.py 2010-07-21 18:54:52 +0000
@@ -1,6 +1,5 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the1# Copyright 2009 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
3
4"""Browser code for the Launchpad root page."""3"""Browser code for the Launchpad root page."""
54
6__metaclass__ = type5__metaclass__ = type
@@ -10,6 +9,7 @@
10 ]9 ]
1110
1211
12import feedparser
13import re13import re
14import sys14import sys
15import time15import time
@@ -21,30 +21,33 @@
2121
2222
23from canonical.cachedproperty import cachedproperty23from canonical.cachedproperty import cachedproperty
24from lp.registry.browser.announcement import HasAnnouncementsView24from canonical.config import config
25from canonical.launchpad.interfaces.launchpadstatistic import (25from canonical.launchpad.interfaces.launchpadstatistic import (
26 ILaunchpadStatisticSet)26 ILaunchpadStatisticSet)
27from canonical.lazr.timeout import urlfetch
27from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities28from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
28from canonical.launchpad.webapp.publisher import canonical_url29from canonical.launchpad.webapp.publisher import canonical_url
29from lp.code.interfaces.branchcollection import IAllBranches
30from lp.bugs.interfaces.bug import IBugSet
31from canonical.launchpad.interfaces.launchpad import ILaunchpadSearch30from canonical.launchpad.interfaces.launchpad import ILaunchpadSearch
32from lp.registry.interfaces.pillar import IPillarNameSet
33from lp.registry.interfaces.person import IPersonSet
34from lp.registry.interfaces.product import IProductSet
35from canonical.launchpad.interfaces.searchservice import (31from canonical.launchpad.interfaces.searchservice import (
36 GoogleResponseError, ISearchService)32 GoogleResponseError, ISearchService)
37from lp.blueprints.interfaces.specification import ISpecificationSet
38from canonical.launchpad.validators.name import sanitize_name33from canonical.launchpad.validators.name import sanitize_name
39from canonical.launchpad.webapp import (34from canonical.launchpad.webapp import (
40 action, LaunchpadFormView, LaunchpadView, safe_action)35 action, LaunchpadFormView, LaunchpadView, safe_action)
41from canonical.launchpad.webapp.authorization import check_permission36from canonical.launchpad.webapp.authorization import check_permission
42from canonical.launchpad.webapp.batching import BatchNavigator37from canonical.launchpad.webapp.batching import BatchNavigator
43from canonical.launchpad.webapp.interfaces import NotFoundError38from canonical.launchpad.webapp.interfaces import NotFoundError
39from canonical.launchpad.webapp.vhosts import allvhosts
40
44from lazr.batchnavigator.z3batching import batch41from lazr.batchnavigator.z3batching import batch
45from canonical.launchpad.webapp.vhosts import allvhosts
4642
47from lp.answers.interfaces.questioncollection import IQuestionSet43from lp.answers.interfaces.questioncollection import IQuestionSet
44from lp.blueprints.interfaces.specification import ISpecificationSet
45from lp.code.interfaces.branchcollection import IAllBranches
46from lp.bugs.interfaces.bug import IBugSet
47from lp.registry.browser.announcement import HasAnnouncementsView
48from lp.registry.interfaces.person import IPersonSet
49from lp.registry.interfaces.pillar import IPillarNameSet
50from lp.registry.interfaces.product import IProductSet
4851
4952
50shipit_faq_url = 'http://www.ubuntu.com/getubuntu/shipit-faq'53shipit_faq_url = 'http://www.ubuntu.com/getubuntu/shipit-faq'
@@ -129,6 +132,41 @@
129 """The total blueprint count in all of Launchpad."""132 """The total blueprint count in all of Launchpad."""
130 return getUtility(ILaunchpadStatisticSet).value('question_count')133 return getUtility(ILaunchpadStatisticSet).value('question_count')
131134
135 def getRecentBlogPosts(self):
136 """Return the parsed feed of the most recent blog posts.
137
138 It returns a list of dict with keys title, description, link and date.
139
140 The date is formatted and the description which may contain HTML is
141 sanitized.
142
143 The number of blog posts to display is controlled through
144 launchpad.homepage_recent_posts_count. The posts are fetched
145 from the feed specified in launchpad.homepage_recent_posts_feed.
146
147 Since the feed is parsed everytime, the template should cache this
148 through memcached.
149
150 FeedParser takes care of sanitizing the HTML contained in the feed.
151 """
152 # Use urlfetch which supports timeout
153 try:
154 data = urlfetch(config.launchpad.homepage_recent_posts_feed)
155 except IOError:
156 return []
157 feed = feedparser.parse(data)
158 posts = []
159 max_count = config.launchpad.homepage_recent_posts_count
160 # FeedParser takes care of HTML sanitisation.
161 for entry in feed.entries[:max_count]:
162 posts.append({
163 'title': entry.title,
164 'description': entry.description,
165 'link': entry.link,
166 'date': time.strftime('%d %b %Y', entry.updated_parsed),
167 })
168 return posts
169
132170
133class LaunchpadSearchFormView(LaunchpadView):171class LaunchpadSearchFormView(LaunchpadView):
134 """A view to display the global search form in any page."""172 """A view to display the global search form in any page."""
135173
=== modified file 'lib/lp/app/browser/tests/test_launchpadroot.py'
--- lib/lp/app/browser/tests/test_launchpadroot.py 2010-07-18 00:23:02 +0000
+++ lib/lp/app/browser/tests/test_launchpadroot.py 2010-07-21 18:54:52 +0000
@@ -5,6 +5,7 @@
55
6__metaclass__ = type6__metaclass__ = type
77
8
8from BeautifulSoup import BeautifulSoup, SoupStrainer9from BeautifulSoup import BeautifulSoup, SoupStrainer
910
10from zope.component import getUtility11from zope.component import getUtility
@@ -66,6 +67,9 @@
66 self.setUpRegistryExpert()67 self.setUpRegistryExpert()
67 view = create_initialized_view(68 view = create_initialized_view(
68 self.root, 'index.html', principal=self.expert)69 self.root, 'index.html', principal=self.expert)
70 # Stub out the getRecentBlogPosts which fetches a blog feed using
71 # urlfetch.
72 view.getRecentBlogPosts = lambda: []
69 content = BeautifulSoup(view(), parseOnlyThese=SoupStrainer('a'))73 content = BeautifulSoup(view(), parseOnlyThese=SoupStrainer('a'))
70 self.failUnless(74 self.failUnless(
71 content.find('a', href='+featuredprojects'),75 content.find('a', href='+featuredprojects'),
7276
=== modified file 'lib/lp/app/stories/launchpad-root/front-pages.txt'
--- lib/lp/app/stories/launchpad-root/front-pages.txt 2010-05-19 05:47:50 +0000
+++ lib/lp/app/stories/launchpad-root/front-pages.txt 2010-07-21 18:54:52 +0000
@@ -1,59 +1,74 @@
1= Launchpad front pages =1Launchpad front pages
2---------------------
23
3Visit our home page:4Visit our home page:
45
5 >>> browser.open('http://launchpad.dev/')6 >>> browser.open('http://launchpad.dev/')
6 >>> browser.url7 >>> browser.url
7 'http://launchpad.dev/'8 'http://launchpad.dev/'
89
9It contains a string which our IS uses to determine whether or not10It contains a string which our IS uses to determine whether or not
10Launchpad is alive:11Launchpad is alive:
1112
12 >>> print browser.contents13 >>> print browser.contents
13 <!DOCTYPE...14 <!DOCTYPE...
14 ...15 ...
15 <!-- Is your project registered yet? -->16 <!-- Is your project registered yet? -->
16 ...17 ...
1718
18And links to the important applications and facets:19And links to the important applications and facets:
1920
20 >>> code_link = browser.getLink(url='code')21 >>> code_link = browser.getLink(url='code')
21 >>> code_link.url22 >>> code_link.url
22 'http://code.launchpad.dev/'23 'http://code.launchpad.dev/'
2324
24It also includes a search form...25It also includes a search form...
2526
26 >>> print browser.getControl('Search Launchpad').value27 >>> print browser.getControl('Search Launchpad').value
27 Search Launchpad28 Search Launchpad
2829
29...and lists of featured projects and marketing material.30...and lists of featured projects and marketing material.
3031
31 >>> featured = find_tag_by_id(browser.contents, 'homepage-featured')32 >>> featured = find_tag_by_id(browser.contents, 'homepage-featured')
32 >>> print extract_text(featured.renderContents())33 >>> print extract_text(featured.renderContents())
33 Featured projects34 Featured projects
34 ...35 ...
35 Ubuntu36 Ubuntu
36 ...37 ...
3738
38The footer doesn't contain the links that are already present on the page.39The footer doesn't contain the links that are already present on the page.
3940
40 >>> print find_tags_by_class(browser.contents, 'lp-arcana')41 >>> print find_tags_by_class(browser.contents, 'lp-arcana')
41 []42 []
4243
43The homepage looks different when the use is logged in:44The front page also lists the recent blog posts published on the Launchpad
4445blog:
45 >>> user_browser = setupBrowser(auth="Basic test@canonical.com:test")46
46 >>> user_browser.open('http://launchpad.dev/')47 >>> print extract_text(
48 ... find_tag_by_id(browser.contents, 'homepage-blogposts'))
49 Recent Launchpad blog posts
50 Launchpad EPIC 2010 photo
51 &ndash; 16 Jul 2010
52 The Launchpad and Bazaar teams have been in Prague this week...
53 Three tips for faster launchpadlib api clients
54 &ndash; 14 Jul 2010
55 Three tips from Leonard...
56 New Launchpad Bugs Status: Opinion...
57
58The homepage looks different when the user is logged in:
59
60 >>> user_browser = setupBrowser(auth="Basic test@canonical.com:test")
61 >>> user_browser.open('http://launchpad.dev/')
4762
48Now there are links to create projects and teams:63Now there are links to create projects and teams:
4964
50 >>> project_link = user_browser.getLink(url='/projects')65 >>> project_link = user_browser.getLink(url='/projects')
51 >>> project_link.url66 >>> project_link.url
52 'http://launchpad.dev/projects/+new'67 'http://launchpad.dev/projects/+new'
5368
54 >>> people_link = user_browser.getLink(url='/people')69 >>> people_link = user_browser.getLink(url='/people')
55 >>> people_link.url70 >>> people_link.url
56 'http://launchpad.dev/people/+newteam'71 'http://launchpad.dev/people/+newteam'
5772
5873
59The front pages for the other applications, however, do have74The front pages for the other applications, however, do have
6075
=== modified file 'lib/lp/app/templates/root-index.pt'
--- lib/lp/app/templates/root-index.pt 2010-06-25 16:31:46 +0000
+++ lib/lp/app/templates/root-index.pt 2010-07-21 18:54:52 +0000
@@ -128,34 +128,20 @@
128 </div>128 </div>
129 </div>129 </div>
130130
131 <div id="homepage-blogposts" class="homepage-portlet">131 <div id="homepage-blogposts" class="homepage-portlet"
132 tal:content="cache:public, 1 hour">
132 <h2>Recent Launchpad blog posts</h2>133 <h2>Recent Launchpad blog posts</h2>
133 <ul>134 <ul tal:define="posts view/getRecentBlogPosts">
134 <li class="news">135 <li class="news"
135 <a href="http://www.surveymonkey.com/s/launchpadsummer2010">136 tal:repeat="post posts">
136 Take the Launchpad survey</a><span class="registered"> &ndash; 01 July 2010</span><br />137 <a href="" tal:attributes="href post/link"
137 Tell us a little about how you use Launchpad by answering our short survey.138 tal:content="post/title">
138 </li>139 Take the Launchpad survey</a><span class="registered">
139 <li class="news">140 &ndash; <tal:date content="post/date">01 July 2010</tal:date></span><br />
140 <a href="http://blog.launchpad.net?p=1607">141 <tal:description content="structure post/description">
141 SFTP uploads</a><span class="registered"> &ndash; 01 July 2010</span><br />142 Tell us a little about how you use Launchpad by answering
142 Upload source packages to your Personal Package Archive using SFTP.143 our short survey.
143 </li>144 </tal:description>
144 <li class="news">
145 <a href="http://blog.launchpad.net?p=1513">
146 2GiB PPAs for everyone!</a><span class="registered"> &ndash; 04 May 2010</span><br />
147 We've doubled the standard Personal Package Archive size to 2 GiB.
148 </li>
149 <li class="news">
150 <a href="http://blog.launchpad.net?p=1491">
151 Automatic translation template generation</a><span class="registered"> &ndash; 04 May 2010</span><br />
152 Opening a project for translation is now easier with automatic template generation direct from the
153 project's Bazaar branch.
154 </li>
155 <li class="news">
156 <a href="http://blog.launchpad.net?p=1503">
157 Link projects to Ubuntu packages</a><span class="registered"> &ndash; 04 May 2010</span><br />
158 Launchpad now helps you specify which Ubuntu package is associated with any project in Launchpad.
159 </li>145 </li>
160 <li class="news">146 <li class="news">
161 <a href="http://blog.launchpad.net/general/launchpad-is-now-open-source">147 <a href="http://blog.launchpad.net/general/launchpad-is-now-open-source">
162148
=== modified file 'setup.py'
--- setup.py 2010-07-16 13:26:11 +0000
+++ setup.py 2010-07-21 18:54:52 +0000
@@ -31,6 +31,7 @@
31 'cssutils',31 'cssutils',
32 # Required for pydkim32 # Required for pydkim
33 'dnspython',33 'dnspython',
34 'FeedParser',
34 'feedvalidator',35 'feedvalidator',
35 'funkload',36 'funkload',
36 'launchpadlib',37 'launchpadlib',
3738
=== modified file 'versions.cfg'
--- versions.cfg 2010-07-16 13:26:11 +0000
+++ versions.cfg 2010-07-21 18:54:52 +0000
@@ -17,6 +17,7 @@
17dnspython = 1.7.117dnspython = 1.7.1
18elementtree = 1.2.6-2005031618elementtree = 1.2.6-20050316
19epydoc = 3.0.119epydoc = 3.0.1
20FeedParser = 4.1
20feedvalidator = 0.0.0DEV-r104921feedvalidator = 0.0.0DEV-r1049
21functest = 0.8.722functest = 0.8.7
22funkload = 1.10.023funkload = 1.10.0