Closed Bug 754269 Opened 12 years ago Closed 12 years ago

Send application version info from the front end to lattice

Categories

(Pancake Graveyard :: Front-end, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: oyiptong, Assigned: oyiptong)

Details

      No description provided.
Assignee: nobody → oyiptong
This bug needs a better description. What needs to be sent? And why to Lattice?
I need two version numbers:

One for the ios application
Another for the JS application.

Perhaps it could be concatenated: 1.1.A.A
Where the first two characters are for the iOS app, and the subsequent two characters for the JS app.

We want the version numbers for logging purposes, and to know what people are running.
The iOS app already makes a method available that returns the version number:

https://bugzilla.mozilla.org/show_bug.cgi?id=754268

The frontend can pick that up.

I think my original question was more like: where exactly should this info be submitted. What is the concrete API that requires these version numbers.
Here's a better suggestion: the version numbers can be sent on each lattice calls as query params as follows:

e.g.

device=iPad3,3:5.1.1:1.0&client=1.0

Where device represents device information and client represents the javascript client.

device has multiple colon-separated values which are, in order: hardwareMachine, deviceSystemVersion, applicationVersion

client is just the JS application client version
Assignee: oyiptong → nobody
those values can be obtained from: https://bugzilla.mozilla.org/show_bug.cgi?id=754268
The client version number should be passed to the template layer from the Python app. We should look for the client version number in /etc/pancake/web.json.
https://bitbucket.org/mozillapancake/pancake/changeset/65596f2ec48c has changes to wrap each lattice request and add the client/device info as 'X-' request headers. This mirrors how we do the csrf token, but assign back to me if it turns out we need to add to the querystring. 

For the /views browser client, most fields are "n/a", but I provide { deviceSystemVersion: navigator.oscpu }. If you prefer I could just not include the headers/fields at all?
Assignee: nobody → oyiptong
Also added a X-JsAppVersion header that gets its value from config.appVersion (which is populated in the config.mustache template)
I changed the dev proxy so that the headers go through to lattice
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.