Determine what to do on a Firefox Profile Refresh
Categories
(Data Platform and Tools :: Glean: SDK, task, P1)
Tracking
(Not tracked)
People
(Reporter: chutten|PTO, Assigned: chutten|PTO)
References
(Blocks 1 open bug)
Details
(Whiteboard: [2026-dct-workweek])
Attachments
(1 external file)
Firefox, or at least Firefox Desktop, has the concept of a Profile Refresh: same user, same storage, but applied atop an otherwise-freshly-created profile to clear out any cruft that may have accumulated that could cause problems (resetting most settings to default, clearing most caches, etc).
Its behaviuor wrt Legacy Telemetry, profile group, and usage reporting IDs is to store and restore them. It's the same person using the same Firefox within the same context... they've just done some spring cleaning.
In bug 2039807 :Gijs notes that the Glean SDK's profile identifier is not presently stored and restored. It probably ought to be, considering the intent of Refresh and how the other IDs are handled against which the Glean client_id is often compared.
But what else should we do?
This bug is about figuring out what the Glean SDK wants to do in the face of a Refresh, and implementing it. Some ideas already considered:
- Just the client_id -- we could probably implement this today by cementing
client_id.txt's location, portability, and behaviour. And updating the "restoring client_id" docs to mention the Refresh case. - All
user-lifetime metrics -- the Glean SDK would need some way to export and import them, but if the idea is "this is the same 'user' and the same profile, just cleared out", then this might be more correct. It would also echo the Legacy Telemetry implementation which also stores and restoressession-state.json - All data -- the point of clearing things out is to fix problems that might arise from garbage. Having a chonky datareporting dir isn't really considered a problem by us, now is it? Maybe we should have Firefox preserve our state entirely, optionally calling a function for the SDK to consider some maintenance tasks?
Updated•5 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
In addition to being what feels like the "correct" behaviour, profile resets contribute meaningfully to new-profile measures and so we should preserve the client identifiers through a reset for data quality reasons, too.
| Assignee | ||
Comment 2•1 month ago
|
||
ni?Travis and Jan-Erik
How about Option 1: "just the client_id"? Requires us standardizing on location and some behaviour around client_id.txt, but only as a team-internal "public" interface.
| Assignee | ||
Updated•1 month ago
|
Comment 3•1 month ago
|
||
I think I'd like to see the first_run_date preserved and restored along with the client_id. This field is useful in validating client age and is one of the only things we preserve, even across toggling of collection enabled.
Aside from that, the fewer metrics we need to do this the better, and the rest of the user-lifetime metrics we own should fall out into something representative of the post-restore client/profile.
(In reply to Chris H-C :chutten from comment #0)
This bug is about figuring out what the Glean SDK wants to do in the face of a Refresh, and implementing it. Some ideas already considered:
- Just the client_id -- we could probably implement this today by cementing
client_id.txt's location, portability, and behaviour. And updating the "restoring client_id" docs to mention the Refresh case.
Easy to do today. We already rely on it, so it's merely a documentation update that it's now otherwise used.
- All
user-lifetime metrics -- the Glean SDK would need some way to export and import them, but if the idea is "this is the same 'user' and the same profile, just cleared out", then this might be more correct. It would also echo the Legacy Telemetry implementation which also stores and restoressession-state.json
New API needed to even expose that.
Not having that data is already a thing we implicitly support anyway (if the database is unreadable or the user deleted it, it's the usual "restore" flow)
- All data -- the point of clearing things out is to fix problems that might arise from garbage. Having a chonky datareporting dir isn't really considered a problem by us, now is it? Maybe we should have Firefox preserve our state entirely, optionally calling a function for the SDK to consider some maintenance tasks?
With the recent accumulation bugs ... guess we do kinda care. But that's bugs we need to handle anyway.
Overall I'd be fine with option (1) "just the client ID", mostly for easyness of the implementation.
Comment 5•1 month ago
|
||
(via GitHub webhook, authenticated as shared-secret)
| Assignee | ||
Comment 6•1 month ago
|
||
Docs have been merged, Option 1 it is.
Description
•