Merge lp:~pfalcon/linaro-android-frontend/http-downloads into lp:linaro-android-frontend

Proposed by Paul Sokolovsky
Status: Merged
Merged at revision: 235
Proposed branch: lp:~pfalcon/linaro-android-frontend/http-downloads
Merge into: lp:linaro-android-frontend
Diff against target: 37 lines (+5/-3)
2 files modified
android_build/templates/buildDetails.html (+1/-1)
static/buildDetails.js (+4/-2)
To merge this branch: bzr merge lp:~pfalcon/linaro-android-frontend/http-downloads
Reviewer Review Type Date Requested Status
Yongqin Liu (community) Approve
Michael Hudson-Doyle (community) Approve
Review via email: mp+80370@code.launchpad.net

Description of the change

Use HTTP download links for artifacts in frontend, following introduction of HTTP downloads on android-build. Benefits: faster downloads, less system load, shorter links, no need for extra options to wget to workaround SSL cert issues.

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks OK to me, but I haven't tested it at all.

review: Approve
Revision history for this message
Yongqin Liu (liuyq0307) wrote :

Could you also modify post-build-lava.py to make the lava also use http to download?
I guess something like "build_url.replace('https', 'http')" would be ok.

review: Needs Fixing
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

> Looks OK to me, but I haven't tested it at all.

I tested it on a sandbox.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

> Could you also modify post-build-lava.py to make the lava also use http to
> download?
> I guess something like "build_url.replace('https', 'http')" would be ok.

Yes, but that would be a separate patch ;-). Please feel free to provide one, or I will get to that some time later. And well, I wouldn't like to haste with changing all stuff immediately - for risk management, in case some issue with HTTP downloads will arise.

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

OK, I see. Thanks.

for the post-build-lava.py one, i am thinking another modification for that file, maybe i can do that together.:)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'android_build/templates/buildDetails.html'
2--- android_build/templates/buildDetails.html 2011-08-23 03:07:25 +0000
3+++ android_build/templates/buildDetails.html 2011-10-25 18:09:39 +0000
4@@ -76,7 +76,7 @@
5 </p>
6 </dd>
7 <dt id="all-output">
8- <a href="/builds/{{buildName}}/output/">Output</a>
9+ <a href="/builds/{{buildName}}/output/">Downloads</a>
10 <span class="hidden">Output</span>
11 </dt>
12 <dd id="output">
13
14=== modified file 'static/buildDetails.js'
15--- static/buildDetails.js 2011-10-21 04:04:22 +0000
16+++ static/buildDetails.js 2011-10-25 18:09:39 +0000
17@@ -161,8 +161,9 @@
18 },
19 output: function (results) {
20 if (results.artifacts.length) {
21+ var downloadUrl = 'http://' + window.location.hostname + '/builds/' + rawBuildName + '/' + results.number.toString() + '/';
22 Y.one('#all-output a').setAttribute(
23- 'href', results.number.toString() + '/output/');
24+ 'href', downloadUrl);
25 Y.one('#all-output a').removeClass('hidden');
26 Y.one('#all-output span').addClass('hidden');
27 var listNode = Y.Node.create('<ul/>');
28@@ -170,7 +171,8 @@
29 var artifact = results.artifacts[i];
30 var itemNode = Y.Node.create('<li><a/></li>');
31 itemNode.one('a').setContent(artifact.displayPath);
32- itemNode.one('a').setAttribute('href', results.buildUrl + '/artifact/' + artifact.relativePath);
33+ // Strip static '/build/out' from relativePath
34+ itemNode.one('a').setAttribute('href', downloadUrl + artifact.relativePath.substring(10));
35 listNode.appendChild(itemNode);
36 }
37 return listNode;

Subscribers

People subscribed via source and target branches