Closed Bug 1185196 Opened 9 years ago Closed 9 years ago

Fix trailing comma in ua-update.json

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: miketaylr, Assigned: miketaylr)

Details

Attachments

(1 file, 1 obsolete file)

In Bug 1177298 I left a trailing comma, forgetting that the .json file is ... JSON and not just a JS object.

Since we load overrides from the file locally, the overrides still work--but any future updates won't make it to the server because it does a JSON validity check before syncing: https://github.com/mozilla/dynamicua_update_script/blob/master/update#L96

Sort of an embarassing patch, but here we are. I'll probably start working on a test for this next week (to avoid pulling this in the future)--but for the p11 stuff I thought it would be good to get this in now.
Assignee: nobody → miket
Attachment #8635663 - Flags: review?(margaret.leibovic)
Status: NEW → ASSIGNED
Comment on attachment 8635663 [details] [diff] [review]
1185196.-Remove-trailing-comma-so-we-have-valid-.patch

Review of attachment 8635663 [details] [diff] [review]:
-----------------------------------------------------------------

Rubberstamp.
Attachment #8635663 - Flags: review?(margaret.leibovic) → review+
Thanks Richard!
Updating commit message to reflect r=rnewman, carrying forward r+.
Attachment #8635663 - Attachment is obsolete: true
Attachment #8635726 - Flags: review+
Keywords: checkin-needed
(In reply to Mike Taylor [:miketaylr] from comment #0)
> In Bug 1177298 I left a trailing comma, forgetting that the .json file is
> ... JSON and not just a JS object.
> 
> Since we load overrides from the file locally, the overrides still work--but
> any future updates won't make it to the server because it does a JSON
> validity check before syncing:
> https://github.com/mozilla/dynamicua_update_script/blob/master/update#L96
> 
> Sort of an embarassing patch, but here we are. I'll probably start working
> on a test for this next week (to avoid pulling this in the future)--but for
> the p11 stuff I thought it would be good to get this in now.

I see a relevant-looking test already in the tree:
http://mxr.mozilla.org/mozilla-central/source/netwerk/test/mochitests/test_user_agent_updates.html

Maybe there's a way we can add something simple to that test to catch this bug?
(In reply to :Margaret Leibovic from comment #5)
 > I see a relevant-looking test already in the tree:
> http://mxr.mozilla.org/mozilla-central/source/netwerk/test/mochitests/
> test_user_agent_updates.html
> 
> Maybe there's a way we can add something simple to that test to catch this
> bug?

Yeah, that's a good plan. Right now that test is disabled (See https://bugzilla.mozilla.org/show_bug.cgi?id=1078267#c146), but one of my Q3 goals is to figure out why and (hopefully) get it re-enabled.
https://hg.mozilla.org/mozilla-central/rev/208c6dbcfc99
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: