Merge lp:~jcsackett/launchpad/packaging-portlet-timeouts into lp:launchpad

Proposed by j.c.sackett
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: 11311
Proposed branch: lp:~jcsackett/launchpad/packaging-portlet-timeouts
Merge into: lp:launchpad
Diff against target: 69 lines (+4/-23)
4 files modified
lib/lp/registry/browser/distroseries.py (+3/-1)
lib/lp/registry/browser/tests/test_distroseries_views.py (+1/-4)
lib/lp/registry/stories/distroseries/xx-distroseries-index.txt (+0/-4)
lib/lp/registry/templates/distroseries-portlet-packaging.pt (+0/-14)
To merge this branch: bzr merge lp:~jcsackett/launchpad/packaging-portlet-timeouts
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Robert Collins (community) Approve
Review via email: mp+31878@code.launchpad.net

Commit message

Disables the needs_linking feature and removes its display from the template. Previously users would see the "top ten" packages needing linking, which appeared to be not completely valid data, and was the cause of timeouts.

Description of the change

lp:~jcsackett/launchpad/packaging-portlet-timeouts
    Diff size: 43 lines
    Launchpad bug:
          https://bugs.launchpad.net/bugs/612358
    Test command: ./bin/test -vv \
          -t test_needs_linking
    Pre-implementation: sinzui (Curtis Hovey)
    Target release: 10.08

Disable the "needs linked" feature in the packaging-portlet
--------------------------------------------------------------------

Related to bug 612358, we needed to disable the needs linked portion
of the packaging-portlet. The current presentation isn't really
meeting the need of encouraging participation in linking packages,
and is showing bad data (bad bug count, packages that can't be
linked).

QA
--

Open a project with the packaging-portlet; the needs more
information part should no longer display.

Lint
----

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/browser/distroseries.py
  lib/lp/registry/browser/tests/test_distroseries_views.py
  lib/lp/registry/templates/distroseries-portlet-packaging.pt

Test
----

test_needs_linking in
/lib/lp/registry/browser/tests/test_distroseries.py
was updated to assert that view.needs_linked returns None

Implementation
--------------

In the portlet:
    * Removed the preprocessing so that the data no longer
      displays, turning off the feature
In the view:
    * Updated the needs_linked property to return None

Together, this disables the feature.

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

Please include the test change from Edwin's branch

review: Needs Fixing (code)
Revision history for this message
Brad Crittenden (bac) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/distroseries.py'
2--- lib/lp/registry/browser/distroseries.py 2010-08-02 02:13:52 +0000
3+++ lib/lp/registry/browser/distroseries.py 2010-08-06 12:57:49 +0000
4@@ -332,7 +332,9 @@
5 @cachedproperty
6 def needs_linking(self):
7 """Return a list of 10 packages most in need of upstream linking."""
8- return self.context.getPrioritizedUnlinkedSourcePackages()[:10]
9+ # XXX sinzui 2010-02-26 bug=528648: This method causes a timeout.
10+ # return self.context.getPrioritizedUnlinkedSourcePackages()[:10]
11+ return None
12
13 milestone_can_release = False
14
15
16=== modified file 'lib/lp/registry/browser/tests/test_distroseries_views.py'
17--- lib/lp/registry/browser/tests/test_distroseries_views.py 2010-07-28 14:05:12 +0000
18+++ lib/lp/registry/browser/tests/test_distroseries_views.py 2010-08-06 12:57:49 +0000
19@@ -42,10 +42,7 @@
20 ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
21 distroseries = self.factory.makeDistroSeries(distribution=ubuntu)
22 view = create_initialized_view(distroseries, '+index')
23- self.assertTrue(
24- IResultSet.providedBy(view.needs_linking),
25- '%s should implement IResultSet so that slicing will limit the '
26- 'query' % view.needs_linking)
27+ self.assertEqual(view.needs_linking, None)
28
29
30 def test_suite():
31
32=== modified file 'lib/lp/registry/stories/distroseries/xx-distroseries-index.txt'
33--- lib/lp/registry/stories/distroseries/xx-distroseries-index.txt 2010-07-28 19:08:30 +0000
34+++ lib/lp/registry/stories/distroseries/xx-distroseries-index.txt 2010-08-06 12:57:49 +0000
35@@ -100,9 +100,5 @@
36 evolution linked...
37 mozilla-firefox linked...
38 netapplet linked 2005-07-05
39- Needs more information or linking to upstream:
40- cdrkit
41- iceweasel
42- linux-source-2.6.15
43 Needs upstream links
44 All upstream links
45
46=== modified file 'lib/lp/registry/templates/distroseries-portlet-packaging.pt'
47--- lib/lp/registry/templates/distroseries-portlet-packaging.pt 2010-07-27 20:59:06 +0000
48+++ lib/lp/registry/templates/distroseries-portlet-packaging.pt 2010-08-06 12:57:49 +0000
49@@ -49,20 +49,6 @@
50 </p>
51 </tal:package>
52 </dd>
53-
54- <dt id="needs-linking"
55- tal:condition="view/needs_linking">
56- Needs more information or linking to upstream:
57- </dt>
58- <dd tal:condition="view/needs_linking">
59- <ul class="horizontal">
60- <li tal:repeat="package view/needs_linking">
61- <a class="sprite package-source"
62- tal:attributes="href package/package/fmt:url"
63- tal:content="package/package/name">evolution</a>
64- </li>
65- </ul>
66- </dd>
67 </dl>
68
69 <ul class="horizontal">