Closed Bug 1005270 Opened 10 years ago Closed 10 years ago

Trigger experiments initialization on opening the addon manager UI

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect)

defect
Not set
normal

Tracking

(firefox30 unaffected, firefox31+ verified, firefox32 verified)

VERIFIED FIXED
Firefox 32
Tracking Status
firefox30 --- unaffected
firefox31 + verified
firefox32 --- verified

People

(Reporter: gfritzsche, Assigned: gfritzsche)

References

Details

(Whiteboard: p=2 s=it-32c-31a-30b.2 [qa!])

Attachments

(1 file, 1 obsolete file)

Currently we delay the experiment manager initialization for 30 seconds after "sessionstore-state-finalized" (unless we have active experiments) to avoid startup performance hits (bug 993084).
This means that you don't get to see the experiments category before those 30 seconds run out if you go straight to the addon manager UI.
Flags: firefox-backlog?
Note that this only applies when you:
* don't have active experiments running
* had experiments running in the past 180 days
* go to the addon manager earlier than 30-60 secs after "sessionstore-state-finalized"
... so i don't think this is too pressing.
To fix this, i guess we can just trigger the experiment manager initialization from the addon manager UI, but that still means async initialization and cache load before the experiments category would show.
Assignee: nobody → georg.fritzsche
Whiteboard: p=2
Flags: needinfo?(juan.becerra)
Whiteboard: p=2 → p=2 s=it-32c-31a-30b.1 [qa?]
Whiteboard: p=2 s=it-32c-31a-30b.1 [qa?] → p=2 s=it-32c-31a-30b.1 [qa+]
Flags: needinfo?(juan.becerra)
Status: NEW → ASSIGNED
Whiteboard: p=2 s=it-32c-31a-30b.1 [qa+] → p=2 s=it-32c-31a-30b.2 [qa+]
* We now observe "EM-loaded" and from there trigger the experiments manager initialization when the addon manager UI is shown early.
* We didn't fire the experiments-changed notification on first cache load with no active experiment - fixed by always firing it on the first experiments evaluation.

https://tbpl.mozilla.org/?tree=Try&rev=c2a3f7baf7a7
Attachment #8421747 - Flags: review?(benjamin)
Try reminds me that i completely forgot to add the required test changes to the patch.

https://tbpl.mozilla.org/?tree=Try&rev=d98b5bb98bde
Attachment #8421747 - Attachment is obsolete: true
Attachment #8421747 - Flags: review?(benjamin)
Attachment #8422336 - Flags: review?(benjamin)
Blocks: telex
Flags: firefox-backlog? → firefox-backlog+
Attachment #8422336 - Flags: review?(benjamin) → review+
Comment on attachment 8422336 [details] [diff] [review]
Fix experiments-changed notification & trigger init on AM UI load

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Telemetry experiments.
User impact if declined: Experiments addon category not visible for some time after session start or if we loaded only inactive/historic experiments.
Testing completed (on m-c, etc.): Awaiting QA verification.
Risk to taking this patch (and alternatives if risky): Low.
String or IDL/UUID changes made by this patch: None.
Attachment #8422336 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/d2ff5ee7413d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
I will wait for the QA verification before uplift to aurora.
QA Contact: andrei.vaida
My understanding is that before this fix, the "Experiments" category was *not* being displayed in the Add-ons Manager earlier than 30-60 seconds after "sessionstore-state-finalized". 

As per Comment 1 and Comment 2, I assume that "sessionstore-state-finalized" should happen sometime after browser startup - please note that I did not find a log stating something similar to "sessionstore-state-finalized" in the experiments logs enabled via pref "experiments.logging.level;0".

My attempt of reproducing the problem in the first place on Nightly 32 2014-05-01 and Nightly 31 2014-04-19 (before the fix landed) was unsuccessful. Nightly 32 2014-05-01 successfully displayed the "Experiments" category from browser startup, while Nightly 31 2014-04-19 did not display the category *at all* after disabling the experiment. Nightly 32.0a1 (2014-05-22) [1] had the same behavior as the one from 2014-05-01, using a profile that currently has one disabled experiment, which was installed recently.

Georg, could you please let me know:
 * how and where can I see that "sessionstore-state-finalized"?
 * is there a better way to simulate the conditions from Comment 1?
 * anything else you think might help me verify this fix.
Flags: needinfo?(georg.fritzsche)
Keywords: qawanted
(In reply to Andrei Vaida, QA [:avaida] from comment #9)
> My understanding is that before this fix, the "Experiments" category was
> *not* being displayed in the Add-ons Manager earlier than 30-60 seconds
> after "sessionstore-state-finalized". 
> 
> As per Comment 1 and Comment 2, I assume that "sessionstore-state-finalized"
> should happen sometime after browser startup - please note that I did not
> find a log stating something similar to "sessionstore-state-finalized" in
> the experiments logs enabled via pref "experiments.logging.level;0".
> 
> My attempt of reproducing the problem in the first place on Nightly 32
> 2014-05-01 and Nightly 31 2014-04-19 (before the fix landed) was
> unsuccessful. Nightly 32 2014-05-01 successfully displayed the "Experiments"
> category from browser startup, while Nightly 31 2014-04-19 did not display
> the category *at all* after disabling the experiment. Nightly 32.0a1
> (2014-05-22) [1] had the same behavior as the one from 2014-05-01, using a
> profile that currently has one disabled experiment, which was installed
> recently.
> 
> Georg, could you please let me know:
>  * how and where can I see that "sessionstore-state-finalized"?
>  * is there a better way to simulate the conditions from Comment 1?
>  * anything else you think might help me verify this fix.

Hi Andrei, Georg is on PTO.  Adding a note for Benjamin to see if he can answer your questions.
Flags: needinfo?(benjamin)
Don't worry about sessionstore-state-finalized, just talk in terms of browser startup.

The conditions in comment 1 were fairly easy to repro for me. After an experiment is disabled or finished, if you start the browser and immediately loaded about:addons the experiment category was not present.
Flags: needinfo?(benjamin)
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #11)
> Don't worry about sessionstore-state-finalized, just talk in terms of
> browser startup.
> 
> The conditions in comment 1 were fairly easy to repro for me. After an
> experiment is disabled or finished, if you start the browser and immediately
> loaded about:addons the experiment category was not present.

Thank you for clarifying this, Benjamin. I can confirm that this issue is verified fixed on Nightly 32.0a1 (2014-05-25) [1].

[1] Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
Status: RESOLVED → VERIFIED
Flags: needinfo?(georg.fritzsche)
Keywords: verifyme
Whiteboard: p=2 s=it-32c-31a-30b.2 [qa+] → p=2 s=it-32c-31a-30b.2 [qa!]
Comment on attachment 8422336 [details] [diff] [review]
Fix experiments-changed notification & trigger init on AM UI load

Thanks. Approving then.
Attachment #8422336 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Reproduced the original issue using the following build:
- http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014-05-25-00-40-02-mozilla-aurora/

- Removed the experiment via about:addons (ensured that it was removed) and than closed FX
- Re-loaded FX and opened about:addons and the "Experiments" container wasn't visible

Once the original problem was reproduced, used the following build for verification:
- http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014-05-29-00-40-03-mozilla-aurora/

- Removed the experiment from the "Experiments" container under about:addons
- Closed/Opened FX and quickly loaded about:addons, ensured that the "Experiments" container is visible and the removed experiment is present
- Removed multiple experiments and ensured that the "Experiments" container quickly appeared once FX was launched
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: