Closed Bug 1440779 Opened 7 years ago Closed 6 years ago

Implement preference-experiment action as an internal action

Categories

(Firefox :: Normandy Client, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: mythmon, Assigned: glasserc)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

This bug covers converting the preference-experiment action [0] an internal action (see bug 1436129). [0]: https://github.com/mozilla/normandy/tree/dfd3ff3edc70ac04f8f043e040f9190854f80021/recipe-server/client/actions/preference-experiment
Summary: Implement show-heartbeat action as an internal action → Implement preference-experiment action as an internal action
Blocks: 1459931
Assignee: nobody → eglassercamp
Having _preExecute be called in the constructor makes it hard to test it, but because it's a lifecycle hook that subclasses are intended to override, testing it is very natural. While we're here, move the initialization of AddonStudyAction from _preExecute to the constructor, since it doesn't really make sense for AddonStudyAction to be constructed without all members initialized.
Reading test logs is a bit baffling because all tests are called "wrappedTestFunction". Try to imitate a Pythonic decorator and make the returned function have the same name as the old one. Function.prototype.name is a readonly property, but MDN says you can set a function's name using Object.defineProperty, so that's what we do. Depends on D13572
Depends on D13573
I think this should have been here before but it wasn't. To make it easier to distinguish recipes generated by preferenceStudyFactory, give them a unique name with the unused _preferenceStudyFactoryId. Depends on D13574
Blocks: 1513646
Depends on D13576
Keywords: checkin-needed
Pushed by rgurzau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ecb4a2b0d498 BaseAction: move _preExecute call out of constructor r=mythmon,Gijs https://hg.mozilla.org/integration/autoland/rev/ece7d0900e93 preserve function name through decoration r=mythmon,Gijs https://hg.mozilla.org/integration/autoland/rev/d89944340ed8 Add PreferenceExperimentAction r=mythmon,Gijs https://hg.mozilla.org/integration/autoland/rev/3b87bd13f013 shut off experiments when the optoutstudies pref is disabled r=mythmon,Gijs https://hg.mozilla.org/integration/autoland/rev/1d864f34b724 hook up in-tree version of PreferenceExperimentAction r=mythmon,Gijs https://hg.mozilla.org/integration/autoland/rev/8dc5062c2711 Refactor unenrollment to use Promise.all r=Gijs
Keywords: checkin-needed
Depends on: 1515922
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: