Merge lp:~julian-edwards/launchpad/score-on-build-page-bug-433329 into lp:launchpad

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: not available
Merged at revision: 12086
Proposed branch: lp:~julian-edwards/launchpad/score-on-build-page-bug-433329
Merge into: lp:launchpad
Diff against target: 117 lines (+21/-12)
4 files modified
lib/lp/soyuz/browser/build.py (+1/-1)
lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+2/-1)
lib/lp/soyuz/stories/soyuz/xx-build-record.txt (+10/-4)
lib/lp/soyuz/templates/build-index.pt (+8/-6)
To merge this branch: bzr merge lp:~julian-edwards/launchpad/score-on-build-page-bug-433329
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+43909@code.launchpad.net

Commit message

Fix 2 trivial build-related bugs, 1. Make the build score appear whenever we know it,
2. Make the retry notification text less bizarre

Description of the change

Fix 2 trivial build-related bugs:
1. Make the build score appear whenever we know it
2. Make the retry notification text less bizarre

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/browser/build.py'
2--- lib/lp/soyuz/browser/build.py 2010-11-26 00:29:09 +0000
3+++ lib/lp/soyuz/browser/build.py 2010-12-16 14:50:43 +0000
4@@ -296,7 +296,7 @@
5
6 # Invoke context method to retry the build record.
7 self.context.retry()
8- self.request.response.addInfoNotification('Build record active')
9+ self.request.response.addInfoNotification('Build retried')
10
11 self.request.response.redirect(canonical_url(self.context))
12
13
14=== modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt'
15--- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2010-10-18 22:24:59 +0000
16+++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2010-12-16 14:50:43 +0000
17@@ -301,7 +301,8 @@
18 i386 build of pmount 0.1-1
19 ...
20 Build status Needs building
21- Start (2505) What's this?
22+ Start
23+ Build score:...
24 Build details
25 Source: pmount - 0.1-1
26 Archive: PPA for James Blackwell
27
28=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
29--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2010-08-30 02:07:38 +0000
30+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2010-12-16 14:50:43 +0000
31@@ -66,7 +66,8 @@
32 ...
33 Build status
34 Needs building
35- Start in ... (2505) What's this?
36+ Start in ...
37+ Build score:2505 (What's this?)
38 Build details
39 Source: testing - 1.0
40 Archive: Primary Archive for Ubuntu Test
41@@ -88,6 +89,7 @@
42 ...
43 Build status
44 Needs building
45+ Build score:2505 (What's this?)
46 Build details
47 Source: testing - 1.0
48 Archive: Primary Archive for Ubuntu Test
49@@ -142,7 +144,8 @@
50 >>> print extract_text(find_tag_by_id(admin_browser.contents, 'status'))
51 Build status
52 Needs building
53- Start in ... (0) Rescore build What's this?
54+ Start in ...
55+ Build score:0 Rescore build (What's this?)
56
57 Eventually a pending build record will get started, and while it's
58 building the page will also contain a link to the builder where the
59@@ -165,6 +168,7 @@
60 ... find_tag_by_id(anon_browser.contents, 'status'))
61 Build status
62 Currently building on Bob The Builder
63+ Build score:0 (What's this?)
64 Started ... ago
65
66 >>> print anon_browser.getLink('Bob The Builder').url
67@@ -283,12 +287,13 @@
68 >>> admin_browser.getControl("Retry Build").click()
69 >>> for text in get_feedback_messages(admin_browser.contents):
70 ... print text
71- Build record active
72+ Build retried
73
74 >>> print extract_text(find_tag_by_id(admin_browser.contents, 'status'))
75 Build status
76 Needs building
77- Start in ... (...) Rescore build What's this?
78+ Start in ...
79+ Build score:... Rescore build (What's this?)
80
81 >>> admin_browser.getLink("Retry this build").click()
82 Traceback (most recent call last):
83@@ -463,6 +468,7 @@
84 >>> print extract_text(find_tag_by_id(anon_browser.contents, 'status'))
85 Build status
86 Successfully built on Bob The Builder
87+ Build score:...
88 Started on ...
89 Finished on ... (took 5 minutes, 0.0 seconds)
90 buildlog (6 bytes)
91
92=== modified file 'lib/lp/soyuz/templates/build-index.pt'
93--- lib/lp/soyuz/templates/build-index.pt 2010-11-30 12:53:20 +0000
94+++ lib/lp/soyuz/templates/build-index.pt 2010-12-16 14:50:43 +0000
95@@ -155,14 +155,16 @@
96 <li tal:define="eta context/buildqueue_record/getEstimatedJobStartTime;">
97 Start <tal:eta
98 replace="eta/fmt:approximatedate">in 3 hours</tal:eta>
99- (<span tal:replace="view/buildqueue/lastscore"/>)
100- <tal:rescore define="link context/menu:context/rescore"
101- condition="link/enabled"
102- replace="structure link/fmt:icon" />
103- <a href="https://help.launchpad.net/Packaging/BuildScores"
104- target="_blank">What's this?</a>
105 </li>
106 </tal:pending>
107+ <li tal:condition="view/buildqueue">
108+ Build score:<span tal:replace="view/buildqueue/lastscore"/>
109+ <tal:rescore define="link context/menu:context/rescore"
110+ condition="link/enabled"
111+ replace="structure link/fmt:icon" />
112+ (<a href="https://help.launchpad.net/Packaging/BuildScores"
113+ target="_blank">What's this?</a>)
114+ </li>
115 <tal:building condition="context/status/enumvalue:BUILDING">
116 <li>
117 Started