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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(2 files)

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)
* 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: nobody → bmo
Status: NEW → ASSIGNED
Attachment #670372 - Flags: review?(arpad.borsos)
* s/baseURL/serverBaseURL/ to make its intent clearer (and improve my sanity :-))
Attachment #670374 - Flags: review?(arpad.borsos)
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
Attachment #670372 - Flags: review?(arpad.borsos) → review+
Attachment #670374 - Flags: review?(arpad.borsos) → review+
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
Depends on: 804021
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: