BackgroundUpdate targeting snapshot call has incorrect arguments
Categories
(Firefox :: Messaging System, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr153 | --- | wontfix |
| firefox161 | --- | wontfix |
| firefox162 | --- | wontfix |
| firefox163 | --- | fix-optional |
People
(Reporter: aminomancer, Assigned: aminomancer)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [OMC_KTLO] [omc])
See code. The first call is correct, one argument with a targets property. The second call's signature is incorrect, it has the targets unfolded into 2 separate arguments. The second argument is discarded, and the first argument lacks the expected targets property. This causes ASRouter's default to be used, but that means it's missing all the Nimbus context. The Nimbus context therefore only gets added to the snapshot at shutdown, when the other call is executed.
I don't know who to report this to, or if I'm still reporting this in the right component. Nick, do you know who's maintaining this code now?
Comment 1•4 days ago
|
||
Set release status flags based on info from the regressing bug 1868676
Comment 2•4 days ago
|
||
| frontend-triage | ||
Confirmed: BackgroundUpdate.sys.mjs passes ASRouterTargeting.Environment positionally, so getEnvironmentSnapshot finds no targets key, falls back to its default and drops the Nimbus context. Every non-shutdown save runs beforeSave first and merges Nimbus back in, so the file only ends up without activeExperiments/activeRollouts when its first write happens during shutdown. That write is the profileBeforeChange finalize, where beforeSave returns early.
Fix: Pass { targets: [lazy.ExperimentAPI.manager.createTargetingContext(), lazy.ASRouterTargeting.Environment] } the same way beforeSave does, and add a check on BackgroundUpdate._snapshot.data.environment.activeExperiments to test_backgroundupdate_glean.js.
Suggested severity: S4. The background update task loses the default profile's experiment context only when Firefox quits within about 1.5 seconds of snapshotting being scheduled, and the next session's snapshot corrects it.
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.
Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.
Updated•4 days ago
|
Updated•3 days ago
|
| Assignee | ||
Comment 3•3 days ago
|
||
I have a patch coming that will consolidate all the snapshotters and reduce the likelihood of this happening again. So I'll just move this to messaging system, since I'm gonna fix them all in one step through Targeting.sys.mjs.
| Assignee | ||
Updated•3 days ago
|
Updated•17 hours ago
|
Updated•17 hours ago
|
Description
•