Closed Bug 1003029 Opened 11 years ago Closed 11 years ago

Desktop client loads additional files for OpenTok SDK from the server

Categories

(Hello (Loop) :: Client, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla33

People

(Reporter: standard8, Unassigned)

References

Details

(Whiteboard: [p=0.5])

Attachments

(2 files, 11 obsolete files)

204.39 KB, application/x-zip-compressed
Details
118.66 KB, patch
abr
: review+
Details | Diff | Splinter Review
Even though the main copy of the sdk is local for desktop, we're getting two files still loaded remotely. These will need packaging up (once we're able to put the references in the public repos): http://static.opentok.com/webrtc/v2.2.4.1/css/ot.min.css http://static.opentok.com/webrtc/v2.2.4.1/js/dynamic_config.min.js
Blocks: 1005175
Priority: -- → P3
Target Milestone: --- → mozilla32
loop-client patch
Attachment #8418056 - Flags: review?(standard8)
desktop client patch
Attachment #8418057 - Flags: review?(standard8)
Comment on attachment 8418057 [details] [review] https://github.com/adamroach/gecko-dev/pull/21 NiKo, sorry for the delay in getting to this. Could you rebase it against loop-service branch and regenerate the pull request please?
Attachment #8418057 - Flags: review?(standard8)
The loop-service branch is broken atm for me (after building); got: - deriveHawkCredentials is not defined client.js:278 - "loop.hawk-session-token pref not found" I don't know if that's expected, or if I should use another branch?
Flags: needinfo?(standard8)
Flags: needinfo?(dmose)
Ayway, gecko-dev PR has been rebased on top of loop-service and pushed. I don't think these changes are the root cause for the two failures mentioned above.
Attachment #8418057 - Flags: review?(standard8)
Attachment #8418057 - Flags: review?(dmose)
Replaces gecko-dev patch since I rebased on top of the loop-service branch.
Attachment #8418057 - Attachment is obsolete: true
Attachment #8418057 - Flags: review?(standard8)
Attachment #8418057 - Flags: review?(dmose)
Attachment #8428669 - Flags: review?(standard8)
Attachment #8428669 - Flags: review?(dmose)
It may be that the loop-service branch currently needs to be used together with loop-client/bug-976109-hawk-spike.
Flags: needinfo?(dmose)
My suspicion is that you were on the hawk credentials spike, and then moved off it, or you had miss-matched branches. Currently loop-service won't work until we get the hawk stuff running anyway, but loop-service is where we're going to be landing from.
Flags: needinfo?(standard8)
Ok lets upgrade the dev server to setup HAWK support tomorrow first thing in the morning then.
(In reply to Dan Mosedale (:dmose) from comment #7) > It may be that the loop-service branch currently needs to be used together > with loop-client/bug-976109-hawk-spike. Turns out this problem happens even in this configuration. I'm currently suspecting something that happened across the rebase from hawk-spike to bug-976109-hawk-spike. (In reply to Rémy Hubscher (:natim) from comment #9) > Ok lets upgrade the dev server to setup HAWK support tomorrow first thing in > the morning then. Given that this will break all cookie builds, and the hawk code isn't really landed on the right branches yet, how does deploying before we've at least got the loop-service branch in the right state help us?
Niko, will happily review, but it will probably not happen until around Weds, I need to finish productionalizing the client-side Hawk stuff first.
Ok then I will wait for your green light :)
The problem is *not* on the server side. It's possible to develop against a local web server, so no need to deploy it now. Also, TEF would need to update their client in case we release hawk on the server, which is not the case yet.
Group: mozilla-employee-confidential
Comment on attachment 8428669 [details] [review] https://github.com/adamroach/gecko-dev/pull/25 I'll be OOO starting tomorrow, but I've talked to Standard8 about this, so it's on his radar.
Attachment #8428669 - Flags: review?(dmose)
Comment on attachment 8418056 [details] [review] https://github.com/mozilla/loop-client/pull/28 I believe Nicolas is going to come up with a new patch based on the new Elm repo for this.
Attachment #8418056 - Flags: review?(standard8)
Attachment #8428669 - Flags: review?(standard8)
Annoyingly, it seems it's actually impossible to set these two asset urls without actually patching the sdk code itself… I'd expect this to be configurable, but it's not: - https://github.com/mozilla/gecko-projects/blob/elm/browser/components/loop/content/shared/libs/sdk.js#L2615-L2634 - https://github.com/mozilla/gecko-projects/blob/elm/browser/components/loop/content/shared/libs/sdk.js#L17659-L17667 I can't see any obvious way to hook from outside of that file to override the values. Thoughts? Should I patch this file? Should we ask TB for a configurable option?
Flags: needinfo?(standard8)
Flags: needinfo?(adam)
The current advice from TB is that we simply need to patch the files locally. I *think* we can simply change cdnURL and cdnURLSSL at the top of the sdk.js file to be "otcdn", and then copy the contents of "webrtc/v2.2.5" tree from the attached zip file into browser/components/loop/content/shared/libs/otcdn. We have explicit clearance from TokBox engineering to change these two variables as necessary to make things work. If we need more extensive modifications, let me know. Longer term, we probably want something more elegant, like a reconfiguration function. I'll ask about that once we know that these minor modifications provide a viable solution.
Flags: needinfo?(standard8)
Flags: needinfo?(adam)
Assignee: nobody → nperriault
Attached patch bug-1003029.patch (obsolete) — Splinter Review
Here's the patch implementing what :abr just described.
Attachment #8418056 - Attachment is obsolete: true
Attachment #8428669 - Attachment is obsolete: true
Attachment #8432504 - Flags: review?(standard8)
Comment on attachment 8432504 [details] [diff] [review] bug-1003029.patch Review of attachment 8432504 [details] [diff] [review]: ----------------------------------------------------------------- General comment: I know we'd normally want to strip trailing WS; but, given that we'll be getting periodic updates of these files, I think we want to leave those as-is.
Attached patch bug-1003029-2.patch (obsolete) — Splinter Review
Following conversation with Standard8 on IRC, using slightly shorter paths for otcdn urls.
Attachment #8432504 - Attachment is obsolete: true
Attachment #8432504 - Flags: review?(standard8)
Attachment #8432591 - Flags: review?(standard8)
Grmbl, missed :abr's comment. Will revert to keep using trailing spaces.
Attached patch bug-1003029-3.patch (obsolete) — Splinter Review
(sorry for bugspamming) Suppressed whitespace changes for sdk.js.
Attachment #8432591 - Attachment is obsolete: true
Attachment #8432591 - Flags: review?(standard8)
Attachment #8432601 - Flags: review?(standard8)
Comment on attachment 8432601 [details] [diff] [review] bug-1003029-3.patch Review of attachment 8432601 [details] [diff] [review]: ----------------------------------------------------------------- I don't see the shortened paths.
Attachment #8432601 - Flags: review?(standard8)
> I don't see the shortened paths. Well I can see them here https://bugzilla.mozilla.org/attachment.cgi?id=8432601&action=diff#a/browser/components/loop/jar.mn_sec2 I didn't manage to achieve something shorter because the sdk expects to load paths like `cdnUrl + "/webrtc/v2.2.5/images/rtc/audioonly-subscriber.png"`… so for this one the shortest meaningful local path I could come with is `content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/audioonly-subscriber.png` (which is admittedly quite long), which is composed from: - `content/browser/` the loop url root - `loop/otcdn` the cdnUrl value modified by this patch - `/webrtc/v2.2.5/images/rtc/audioonly-subscriber.png` the hardcoded path loaded by the sdk I feel like I'm possibly missing obvious, but what?
Flags: needinfo?(standard8)
Ok, I've just tried what I was thinking of on one file: Moved the file on disk to 'browser/components/loop/content/shared/libs/sdk/2.2.5/dynamic_config.min.js' In jar.mn: content/browser/loop/otcdn/webrtc/v2.2.5/js/dynamic_config.min.js (content/shared/libs/sdk/2.2.5/dynamic_config.min.js) This seems to work, and keeps the directory lengths down a bit more (~22 chars)
Flags: needinfo?(standard8)
Ah, a kind of url rewriting. Makes sense, even though I think it might possibly introduce further complexity when mentally mapping the alias to the actual resource, though this is no big issue, and the shorter paths are definitely prettier. Will update the patch, thanks for the feedback :)
Attached patch bug-1003029-4.patch (obsolete) — Splinter Review
Updated patch to shorten sdk url paths as proposed by :standard8.
Attachment #8432601 - Attachment is obsolete: true
Attachment #8433318 - Flags: review?(standard8)
Comment on attachment 8433318 [details] [diff] [review] bug-1003029-4.patch Looks good, I can't see other files being loaded now.
Attachment #8433318 - Flags: review?(standard8) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Backed out due to bc1 & dt test failures: TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/general/browser_parsable_css.js | Got error message for jar:file:///builds/slave/test/build/application/firefox/browser/omni.ja!/chrome/browser/content/browser/loop/otcdn/webrtc/v2.2.5/css/ot.min.css: Unknown property '-moz-border-radius'. Declaration dropped. TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/general/browser_parsable_css.js | Got error message for jar:file:///builds/slave/test/build/application/firefox/browser/omni.ja!/chrome/browser/content/browser/loop/otcdn/webrtc/v2.2.5/css/ot.min.css: Unknown property '-moz-box-shadow'. Declaration dropped. (plus more of the -moz-box-shadow). https://hg.mozilla.org/projects/elm/rev/1631aeaf0d7e
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [p=0.5]
Target Milestone: mozilla32 → mozilla33
Attached patch bug-1003029-5.patch (obsolete) — Splinter Review
Added sdk css file to css test whitelist.
Attachment #8433318 - Attachment is obsolete: true
Attachment #8434111 - Flags: review?(standard8)
Attached patch bug-1003029-6.patch (obsolete) — Splinter Review
Reverted to patch version 3 with whitelist added to fix Try build: https://tbpl.mozilla.org/?tree=Try&rev=18309f428679
Attachment #8434111 - Attachment is obsolete: true
Attachment #8434111 - Flags: review?(standard8)
Attachment #8434940 - Flags: review?(standard8)
Attached patch bug-1003029-7.patch (obsolete) — Splinter Review
Updated with a better whitelist comment, sorry for bugspamming.
Attachment #8434940 - Attachment is obsolete: true
Attachment #8434940 - Flags: review?(standard8)
Attachment #8434942 - Flags: review?
Attached patch bug-1003029-8.patch (obsolete) — Splinter Review
This is not a bad joke, I really suck at exporting patch it seems. Sorry.
Attachment #8434942 - Attachment is obsolete: true
Attachment #8434942 - Flags: review?
Attachment #8434943 - Flags: review?(standard8)
Comment on attachment 8434943 [details] [diff] [review] bug-1003029-8.patch Review of attachment 8434943 [details] [diff] [review]: ----------------------------------------------------------------- I'm happy with this from the loop perspective, but we need sign-off on the browser_parsable_css.js from a browser peer. I think Mike might be able to help us here, as he reviewed the first versions of this test. Mike, there's a try server build with this patch: https://tbpl.mozilla.org/?tree=Try&rev=18309f428679
Attachment #8434943 - Flags: review?(standard8)
Attachment #8434943 - Flags: review?(mconley)
Attachment #8434943 - Flags: review+
Blocks: 994131
Comment on attachment 8434943 [details] [diff] [review] bug-1003029-8.patch Review of attachment 8434943 [details] [diff] [review]: ----------------------------------------------------------------- rs=me for the test update.
Attachment #8434943 - Flags: review?(mconley) → review+
Updated to include license headers for the additional styles from the sdk.
Attachment #8434943 - Attachment is obsolete: true
Attachment #8435020 - Flags: review?(adam)
Comment on attachment 8435020 [details] [diff] [review] Use local versions of OT assets. Review of attachment 8435020 [details] [diff] [review]: ----------------------------------------------------------------- Looks good -- let's get this landed.
Attachment #8435020 - Flags: review?(adam) → review+
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Target Milestone: mozilla33 → mozilla32
Target Milestone: mozilla32 → mozilla33
Does this need automated and/or manual testing?
Flags: needinfo?(standard8)
QA Contact: anthony.s.hughes
(In reply to Anthony Hughes, QA Mentor (:ashughes) from comment #41) > Does this need automated and/or manual testing? This should be able to be manually tested by inspection. I'm not sure of a way to test this automatically, unless we do some sort of inspection of functional tests to look for unexpected network accesses. I guess we might be able to port what mochitest has although, I suspect that involves modifying the browser which we might not be able to do. Dan, any ideas?
Flags: needinfo?(standard8)
@Standard8: At some level, we could do something like this with a trivial HTTP proxy server. Or even hooks into Necko, perhaps.
Untracking for QA. Please needinfo me to request testing.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: