Closed Bug 2064188 Opened 19 days ago Closed 18 days ago

Nimbus 6h periodic timer may not be firing

Categories

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

defect

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox-esr140 --- wontfix
firefox-esr153 --- fixed
firefox154 --- fixed
firefox155 --- fixed
firefox156 --- fixed

People

(Reporter: jlockhart, Assigned: beth)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [nimbus])

Attachments

(4 files, 1 obsolete file)

While investigating issues around enrollment/unenrollment timing, I discovered that we may never be creating our periodic 6h timer.

Here the timer is setup:

https://github.com/mozilla-firefox/firefox/blob/25d7109bf565c299435dec3dd2b9e79a1ce7c15d/toolkit/components/nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs#L312-L322

Here it gates on this._enabled

https://github.com/mozilla-firefox/firefox/blob/25d7109bf565c299435dec3dd2b9e79a1ce7c15d/toolkit/components/nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs#L880-L883

But this._enabled is set true after the call to setup the timer, so does the timer ever enter?

The guard was introduced here:

https://github.com/mozilla-firefox/firefox/commit/7f62c429b15f0c868702776929a5506f37310f67#diff-44fcd7fcbdd6b7d033ec0d931165a35ad75fa2b40bb7b88713a983440f7660dbR504-R507

Which I think corresponds to a drop in the number of 'is_ready' telemetry events from a multiple of the number of sessions down to being approximately equal to the number of sessions:

https://sql.telemetry.mozilla.org/queries/125112/#303126

Please verify if this is actually the case in which case we should repair this, and maybe we can include a 'kind' field in the is_ready telemetry event that shows whether it's in startup, or the timer.

Whiteboard: [nimbus]
Assignee: nobody → brennie
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P1

In bug 1941963, side effects were removed from
RemoteSettingsExperimentLoader.sys.mjs, making it safe to import without
triggering the creation of a global RemoteSettingsExperimentLoader.
However, that patch also gated setting the update timer based on the
RemoteSettingsExperimentLoader's enabled state. Unfortunately,
the timer was registered before the enabled flag was set, which meant
that the timer was never actually registered.

We now ensure that we set the enable state before registering the timer.
This behaviour is tracked by a new test.

Keywords: regression
Regressed by: 1941963

Set release status flags based on info from the regressing bug 1941963

Status: ASSIGNED → RESOLVED
Closed: 18 days ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch

The patch landed in nightly and beta is affected, along with ESR.
:beth, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(brennie)

In bug 1941963, side effects were removed from
RemoteSettingsExperimentLoader.sys.mjs, making it safe to import without
triggering the creation of a global RemoteSettingsExperimentLoader.
However, that patch also gated setting the update timer based on the
RemoteSettingsExperimentLoader's enabled state. Unfortunately,
the timer was registered before the enabled flag was set, which meant
that the timer was never actually registered.

We now ensure that we set the enable state before registering the timer.
This behaviour is tracked by a new test.

Original Revision: https://phabricator.services.mozilla.com/D319282

Attachment #9628391 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Users will not enroll in recipes until they restart their browser, which could impact high profile experiments on newtab etc
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: low
  • Explanation of risk level: Simple patch with tests
  • String changes made/needed?: n/a
  • Is Android affected?: no

In bug 1941963, side effects were removed from
RemoteSettingsExperimentLoader.sys.mjs, making it safe to import without
triggering the creation of a global RemoteSettingsExperimentLoader.
However, that patch also gated setting the update timer based on the
RemoteSettingsExperimentLoader's enabled state. Unfortunately,
the timer was registered before the enabled flag was set, which meant
that the timer was never actually registered.

We now ensure that we set the enable state before registering the timer.
This behaviour is tracked by a new test.

Original Revision: https://phabricator.services.mozilla.com/D319282

Attachment #9628392 - Flags: approval-mozilla-esr153?

firefox-esr153 Uplift Approval Request

  • User impact if declined/Reason for urgency: Users will not enroll in recipes until they restart their browser, which could impact high profile experiments on newtab etc
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: low
  • Explanation of risk level: Simple patch with tests
  • String changes made/needed?: n/a
  • Is Android affected?: no

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: Users will not enroll in recipes until they restart their browser, which could impact high profile experiments on newtab etc
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: low
  • Explanation of risk level: Simple patch with tests
  • String changes made/needed?: n/a
  • Is Android affected?: no
Attachment #9628393 - Flags: approval-mozilla-release?

In bug 1941963, side effects were removed from
RemoteSettingsExperimentLoader.sys.mjs, making it safe to import without
triggering the creation of a global RemoteSettingsExperimentLoader.
However, that patch also gated setting the update timer based on the
RemoteSettingsExperimentLoader's enabled state. Unfortunately,
the timer was registered before the enabled flag was set, which meant
that the timer was never actually registered.

We now ensure that we set the enable state before registering the timer.
This behaviour is tracked by a new test.

Original Revision: https://phabricator.services.mozilla.com/D319282

Flags: needinfo?(brennie)

firefox-esr140 Uplift Approval Request

  • User impact if declined/Reason for urgency: Users will not enroll in recipes until they restart their browser, which could impact high profile experiments on newtab etc
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: n/a
  • Risk associated with taking this patch: low
  • Explanation of risk level: Simple patch with tests
  • String changes made/needed?: n/a
  • Is Android affected?: no
Attachment #9628524 - Flags: approval-mozilla-esr140?

In bug 1941963, side effects were removed from
RemoteSettingsExperimentLoader.sys.mjs, making it safe to import without
triggering the creation of a global RemoteSettingsExperimentLoader.
However, that patch also gated setting the update timer based on the
RemoteSettingsExperimentLoader's enabled state. Unfortunately,
the timer was registered before the enabled flag was set, which meant
that the timer was never actually registered.

We now ensure that we set the enable state before registering the timer.
This behaviour is tracked by a new test.

Original Revision: https://phabricator.services.mozilla.com/D319282

Flags: in-testsuite+
Attachment #9628391 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9628392 - Flags: approval-mozilla-esr153? → approval-mozilla-esr153+
Attachment #9628524 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+

Backed out from ESR140 for test failures. Given that it's nearly EOL anyway, I think we can just leave well enough alone there.
https://treeherder.mozilla.org/logviewer?job_id=586796096&repo=mozilla-esr140&task=PcXVaPnZRVGc3LHN7Z5dWQ.0&lineNumber=4969

Pushed by rvandermeulen@mozilla.com: https://hg.mozilla.org/releases/mozilla-esr140/rev/7cc0ffaa09f8 Revert "Bug 2064188 - Ensure Nimbus update timer is set during init" for xpcshell failures.
Attachment #9628393 - Flags: approval-mozilla-release? → approval-mozilla-release+
QA Whiteboard: [qa-triage-done-c156/b155]
Attachment #9628524 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: