Closed
Bug 800337
Opened 13 years ago
Closed 13 years ago
Reftest analyser uses client-side assets from the server location when baseURL is set
Categories
(Tree Management Graveyard :: TBPL, defect)
Tree Management Graveyard
TBPL
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(2 files)
|
4.12 KB,
patch
|
Swatinem
:
review+
|
Details | Diff | Splinter Review |
|
8.28 KB,
patch
|
Swatinem
:
review+
|
Details | Diff | Splinter Review |
In Config.js
> Config.absoluteBaseURL = Config.baseURL || document.location.href.replace(/\/[^\/]+$/, '/');
Config.baseURL can be one of three values:
1) "" (default; UI and backend are at the same location)
2) "https://tbpl.mozilla.org/" (if running index.html from local filesystem)
3) "<user set value, eg if hosting just client-side on own domain"
This means that for #2 and #3, absoluteBaseURL is actually really absoluteServerBaseURL, not the location of the UI assets.
However, we then go on to use it for both:
> "reftestLogURL": Config.absoluteBaseURL + "php/getLogExcerpt.php?id=" + run._id + '&type=reftest',
and more critically in UserInterface.js when generating the reftest analyser:
> '<link rel="stylesheet" href="' + Config.absoluteBaseURL + 'css/style.css">'
> '<script src="' + Config.absoluteBaseURL + 'js/jquery.js"></script>'
> '<script src="' + Config.absoluteBaseURL + 'js/NetUtils.js"></script>'
ie: If we were testing just client-side changes from the local filesystem, we'd be using production versions of the above css/js... which might cause a few 'wtf's until one realised what was going on. This issue appears to have been present since the reftest analyser was first introduced.
We should also probably use these variable names to avoid future confusion:
serverBaseURL (instead of baseURL)
clientAbsoluteURL (new)
serverAbsoluteURL (instead of absoluteBaseURL)
| Assignee | ||
Comment 1•13 years ago
|
||
* s/absoluteBaseURL/serverAbsoluteURL/
* Add a new 'clientAbsoluteURL'
* Make reftest analyser use the correct one in each case
Tested from local filesystem, works fine (and for non-local serverAbsoluteURL===clientAbsoluteURL).
| Assignee | ||
Comment 2•13 years ago
|
||
* s/baseURL/serverBaseURL/ to make its intent clearer (and improve my sanity :-))
Attachment #670374 -
Flags: review?(arpad.borsos)
| Assignee | ||
Updated•13 years ago
|
Summary: Reftest analyser uses absoluteBaseURL for both js/css & getLogExcerpt.php, which when baseURL is set → Reftest analyser uses client-side assets from the server location when baseURL is set
Updated•13 years ago
|
Attachment #670372 -
Flags: review?(arpad.borsos) → review+
Updated•13 years ago
|
Attachment #670374 -
Flags: review?(arpad.borsos) → review+
| Assignee | ||
Comment 3•13 years ago
|
||
Thank you :-)
https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/7e2894a77223
https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/8dddcbf51571
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 4•13 years ago
|
||
Followup to fix variable scope (path didn't get hit when I tested locally; I should have used Vagrant too):
https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/bb5a5c976751
Updated•11 years ago
|
Product: Webtools → Tree Management
Updated•10 years ago
|
Product: Tree Management → Tree Management Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•