Closed Bug 1950237 Opened 1 year ago Closed 1 year ago

Importing ExperimentManager has side-effects

Categories

(Firefox :: Nimbus Desktop Client, defect, P4)

defect

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: beth, Assigned: beth)

References

Details

Attachments

(17 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Importing ExperimentManager.sys.mjs has side-effects; it will instantiate a global ExperimentManager instance that registers pref listeners. This is really only a problem for unit tests, but it is quite frustrating to deal with.

Assignee: nobody → brennie
Attachment #9485762 - Attachment description: WIP: Bug 1950237 - Annotate crash reports synchronously in ExperimentAPI r?#nimbus-reviewers → Bug 1950237 - Annotate crash reports synchronously in ExperimentAPI r?#nimbus-reviewers
Status: NEW → ASSIGNED
Attachment #9485763 - Attachment description: WIP: Bug 1950237 - Register studies and telemetry pref observers on ExperimentAPI r?#nimbus-reviewers → Bug 1950237 - Register studies and telemetry pref observers on ExperimentAPI r?#nimbus-reviewers!,mstriemer!
Attachment #9485764 - Attachment description: WIP: Bug 1950237 - Expose ExperimentManager as ExperimentAPI.Manager r?#nimbus-reviewers!,#search-reviewers!,#omc-reviewers!,nalexander! → Bug 1950237 - Expose ExperimentManager as ExperimentAPI.Manager r?#nimbus-reviewers!,#search-reviewers!,#omc-reviewers!,nalexander!,mstriemer!
Attachment #9485765 - Attachment description: WIP: Bug 1950237 - Lazily create the ExperimentManager r?#nimbus-reviewers → Bug 1950237 - Lazily create the ExperimentManager r?#nimbus-reviewers
Attachment #9485764 - Attachment description: Bug 1950237 - Expose ExperimentManager as ExperimentAPI.Manager r?#nimbus-reviewers!,#search-reviewers!,#omc-reviewers!,nalexander!,mstriemer! → Bug 1950237 - Expose ExperimentManager as ExperimentAPI.manager r?#nimbus-reviewers!,#search-reviewers!,#omc-reviewers!,nalexander!,mstriemer!
Attachment #9485764 - Attachment description: Bug 1950237 - Expose ExperimentManager as ExperimentAPI.manager r?#nimbus-reviewers!,#search-reviewers!,#omc-reviewers!,nalexander!,mstriemer! → Bug 1950237 - Expose ExperimentManager as ExperimentAPI.manager r?#nimbus-reviewers!,#urlbar-reviewers!,#omc-reviewers!,nalexander!,mstriemer!
Keywords: leave-open
Attachment #9485764 - Attachment description: Bug 1950237 - Expose ExperimentManager as ExperimentAPI.manager r?#nimbus-reviewers!,#urlbar-reviewers!,#omc-reviewers!,nalexander!,mstriemer! → Bug 1950237 - Expose ExperimentManager as ExperimentAPI.manager r?#nimbus-reviewers!

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1ac8526270fe Annotate crash reports synchronously in ExperimentAPI r=nimbus-reviewers,relud
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de62e5a097f3 Register studies and telemetry pref observers on ExperimentAPI r=nimbus-reviewers,settings-reviewers,relud
Pushed by agoloman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/57d0fd242884 Revert "Bug 1950237 - Register studies and telemetry pref observers on ExperimentAPI r=nimbus-reviewers,settings-reviewers,relud" for causing bc failures @browser_experimental_features.js.

Backed out for causing bc failures @browser_experimental_features.js.

Flags: needinfo?(brennie)
Flags: needinfo?(brennie)
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0d55bf3d56e4 Register studies and telemetry pref observers on ExperimentAPI r=nimbus-reviewers,settings-reviewers,relud
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ba4ff2cb25e Expose ExperimentManager as ExperimentAPI.manager r=nimbus-reviewers,relud,nalexander
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0f058d299380 Use ExperimentAPI.manager in browser/components/preferences r=settings-reviewers,Gijs
Attachment #9486132 - Attachment description: Bug 1950237 - Use ExperimentAPI.manager in browser/extensions/newtab r?#home-newtab-reviewers! → Bug 1950237 - Use ExperimentAPI._manager in browser/extensions/newtab r?#home-newtab-reviewers!
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/764e5161e5a2 Use ExperimentAPI._manager in browser/extensions/newtab r=home-newtab-reviewers,mconley
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb10739459f3 Use ExperimentAPI.manager in services/fxaccounts r=markh
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45fad543e24b Use ExperimentAPI.manager in toolkit/components/backgroundtasks r=nalexander
Attachment #9486131 - Attachment description: Bug 1950237 - Use ExperimentAPI.manager in browser/components/urlbar r?#urlbar-reviewers! → WIP: Bug 1950237 - Use ExperimentAPI.manager in browser/components/urlbar r?#urlbar-reviewers!
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68a78f816fdf Use ExperimentAPI.manager in toolkit/components/telemetry r=chutten
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/38d79c19518e Use ExperimentAPI.manager in toolkit/components/messaging-system r=omc-reviewers,emcminn

This is useful in test utilities used across browser tests and xpcshell
tests because in browser tests the ExperimentAPI will be initialized via
category manager (via Normandy.init) and therefore know if we have to
shut down the ExperimentAPI at the end of the test.

Attachment #9486131 - Attachment description: WIP: Bug 1950237 - Use ExperimentAPI.manager in browser/components/urlbar r?#urlbar-reviewers! → Bug 1950237 - Use ExperimentAPI.manager in browser/components/urlbar r?#urlbar-reviewers!
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d1a78697ae15 Revert "Bug 1950237 - Use ExperimentAPI.manager in toolkit/components/telemetry r=chutten" for causing xpc failures @ test_dap.js
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e0d264aef05a Use ExperimentAPI.manager in toolkit/components/telemetry r=chutten
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/870834d81717 Return whether or not the ExperimentAPI was initialized from init() r=nimbus-reviewers,relud
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dcfe2935a4ef Remove ExperimentManager.studiesEnabled r=nimbus-reviewers,relud
Pushed by agoloman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/70accffee05f Revert "Bug 1950237 - Use ExperimentAPI.manager in toolkit/components/telemetry r=chutten" for causing xpc failures @test_TelemetryReportingPolicy.js. This reverts commit c93eb1684f5f4c0083e2c1154dfe6e65cab5efe1.

Backed out for causing xpc failures @test_TelemetryReportingPolicy.js.

Flags: needinfo?(brennie)
Attachment #9486136 - Attachment description: Bug 1950237 - Use ExperimentAPI.manager in toolkit/components/telemetry r?chutten!,mviar → Bug 1950237 - Use NimbusTestUtils.setupTest in toolkit/components/telemetry r?chutten!,mviar
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e473aa82ffe1 Only attempt to remove CrashReporter annotation if ExperimentAPI is initialized r=nimbus-reviewers,relud
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c57a338402cf Use NimbusTestUtils.setupTest in toolkit/components/telemetry r=chutten
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/98562a8b3fdd Use ExperimentAPI.manager in browser/components/urlbar r=urlbar-reviewers,Standard8
Keywords: leave-open
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/126f9257d3e4 Lazily create the ExperimentManager r=nimbus-reviewers,relud
Pushed by nfay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/483375e8ee7a Revert "Bug 1950237 - Lazily create the ExperimentManager r=nimbus-reviewers,relud" for causing ExperimentManager related mochitest failures and xpcshell failures on test_prefFlips.js

Backed out for causing multiple ExperimentManager related mochitest failures and xpcshell failures on test_prefFlips.js

Backout link

Push with failures

Failure logs can be found and opened selecting from the failures seen in above link.

Flags: needinfo?(brennie)
Flags: needinfo?(brennie)
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/644b7e87a953 Lazily create the ExperimentManager r=nimbus-reviewers,relud
Pushed by ctuns@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0655d3e3345d Revert "Bug 1950237 - Lazily create the ExperimentManager r=nimbus-reviewers,relud" for causing bc failures in browser_windowless_troubleshoot_crash.js and browser_interactions_view_time.js

Backed out for causing bc failures

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | devtools/client/styleeditor/test/browser_styleeditor_enabled.js | A promise chain failed to handle a rejection: can't access property "ready", ExperimentManager.store is undefined - stack: normandy@resource://gre/modules/Troubleshoot.sys.mjs:1021:9

Failure log:https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=BrRJZD5lTXa0LwGv1pSDaA.0&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&revision=644b7e87a953d1532f355d5fd0548c62b42679ad
Line: TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/interactions/browser_interactions_view_time.js | A promise chain failed to handle a rejection: can't access property "ready", ExperimentManager.store is undefined - stack: normandy@resource://gre/modules/Troubleshoot.sys.mjs:1021:9
And other from the link "Push with failures"

Flags: needinfo?(brennie)

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

As part of this bug, the global ExperimentManager will no longer be
exported from ExperimentManager.sys.mjs and will only be available as a
property on the ExperimentAPI.

Flags: needinfo?(brennie)
Keywords: leave-open
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/03b79e98a18d Use ExperimentAPI.manager in browser/components/asrouter r=omc-reviewers,emcminn
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c983c77da256 Use ExperimentAPI.manager in toolkit/modules/Troubleshoot.sys.mjs r=mconley
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ae195eb4269 Use ExperimentAPI.manager in toolkit/mozapps/update r=application-update-reviewers,nalexander
Keywords: leave-open
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ecc4f6f627d Lazily create the ExperimentManager r=nimbus-reviewers,relud
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
Regressions: 1967445
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: