mozilla / delivery-console

Normandy recipe editor
Mozilla Public License 2.0
13 stars 22 forks source link

Preference rollout sends all values as strings #1122

Closed jaredlockhart closed 4 years ago

jaredlockhart commented 4 years ago

It looks to me from playing with the delivery console preference rollout UI that regardless of what preference type is selected from the drop down, it sends everything as a string:

mythmon 6:04 PM
i guess we've never launched a rollout with the UI yet
jkerim 6:05 PM
you used edi before?
mythmon 6:05 PM
I was thinking "oh, we've done rollouts before, this can't be broken"
no, I used DC's JSON text field
jkerim 6:05 PM
oh i see
where you would write
{"preferenceName": "thing", "value": true}
or
{"preferenceName": "thing", "value": "true"}
which are different things
which means that if dc is generating "preferences":[{"preferenceName":"browser.newtabpage.activity-stream.enabled","value":"true"}] for the boolean case
that's incorrect
right?
you would expect the dc output to be "preferences":[{"preferenceName":"browser.newtabpage.activity-stream.enabled","value": true}] if the type was boolean
and "preferences":[{"preferenceName":"browser.newtabpage.activity-stream.enabled","value":"true"}] if the type was string?
mythmon 6:30 PM
@jkerim yes, that's all correct
rehandalal commented 4 years ago

there are two issues here:

jaredlockhart commented 4 years ago

I updated the experimenter side to send the correct json type in https://github.com/mozilla/experimenter/commit/6b1e77505261b1083b7dc1998ed4799da6d7a30a

@rehandalal Not sure if you'd also like to do anything on the dc side?