Implement profile group ID
Categories
(Toolkit :: Startup and Profile System, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | fixed |
People
(Reporter: mossop, Assigned: mossop)
References
(Depends on 1 open bug)
Details
(Whiteboard: [fidefe-profile-management] )
Attachments
(6 files)
Implement the group ID which will span across selectable profiles. All profiles should be assigned one, initially random. Once we implement profile creation we will assign the same group ID to the newly created profile. We may want to store the group ID in the database to ensure it is kept in sync but it also needs to be accessible from telemetry where we want to include it in all pings that currently include client id.
Updated•6 months ago
|
Assignee | ||
Comment 1•5 months ago
|
||
The current clientId
is implemented in ClientID.sys.mjs
, canonically stored in datareporting/state.json
in the profile and cached for synchronous access in the toolkit.telemetry.cachedClientID
preference. Storing the new group ID similarly makes sense. It probably makes sense to also manage this in the ClientID.sys.mjs
module rather than creating a new module as we can share some aspects of the code. In particular we probably want to make sure we clear the group ID when the client ID is cleared.
At one point it was suggested that the group ID have a different form from a client ID so the two are easily distinguishable. This could be as simple as adding a prefix or using a UUID without the dashes.
Presumably there will need to be some server-side changes for this. I'm not sure what, chutten can you give some direction here?
While this is something that Firefox leadership has signed off on I am assuming we will still need to go through the sensitive data review process here?
Comment 2•5 months ago
•
|
||
(In reply to Dave Townsend [:mossop] from comment #1)
The current
clientId
is implemented inClientID.sys.mjs
, canonically stored indatareporting/state.json
in the profile and cached for synchronous access in thetoolkit.telemetry.cachedClientID
preference. Storing the new group ID similarly makes sense. It probably makes sense to also manage this in theClientID.sys.mjs
module rather than creating a new module as we can share some aspects of the code. In particular we probably want to make sure we clear the group ID when the client ID is cleared.
I concur that there's a lot of shared behaviour we want to reuse for group_id from client_id, but I don't think clearing it is one of those behaviours. To my knowledge the group id remains in force and unchanged on a profile even when data upload is disabled since prefs (including data upload) are per-profile, not per-group.
(( Of course, if the only use of the group id is for data upload then it doesn't matter whether or not it is present since it'll never enter a new ping. ))
Putting it in ClientID.sys.mjs
is where I'd want to put it, too.
At one point it was suggested that the group ID have a different form from a client ID so the two are easily distinguishable. This could be as simple as adding a prefix or using a UUID without the dashes.
This has a good intention, but if we wish to transmit this using Glean it would likely make most sense as a uuid
metric which normalizes its value to the standard hyphenated uuid (but without surrounding {}
) format for storage and transmission. Setting an invalid or misshapen uuid value is not supported.
We could use uuid-valid but not-uuidv4-generatable values (at a higher risk of collision) by e.g. 1337-coding a prefix like 612009 (loosely "GROOP") ((this is what we do for the canary "c0ffeec0-ffee-c0ff-eec0-ffeec0ffeec0"
value )), or we could put it in a string
metric instead.
Presumably there will need to be some server-side changes for this. I'm not sure what, chutten can you give some direction here?
Only when/if there is some behaviour specific to the group id that we want different from all other uuid
metrics.
While this is something that Firefox leadership has signed off on I am assuming we will still need to go through the sensitive data review process here?
Correct. At least as paperwork to show we've gone through our process and haven't cut any corners.
Comment 3•5 months ago
|
||
Q: Does this bug include in its scope the design, impl, testing, and documentation of the instrumentation of the profile group identifier?
Assignee | ||
Comment 4•5 months ago
|
||
(In reply to Chris H-C :chutten from comment #3)
Q: Does this bug include in its scope the design, impl, testing, and documentation of the instrumentation of the profile group identifier?
I think this includes:
- Generating a new group ID when one does not already exist (i.e. for all existing profiles).
- Adding that to existing pings.
- Documenting it.
- Testing all that.
Though listing all that maybe I should separate out item 2 into some separate bugs, let's see how we go.
Is there other work I'm missing? I'm not totally sure I know what you mean by "instrumentation" here.
Comment 5•5 months ago
|
||
"Instrumentation" is pretty much your step 2. I wanted to make sure it included both Legacy and Glean, and it included schema changes for Legacy (because it'll probably be going in either the Environment or Common Ping Data or something equally custom), and it included tests of the instrumentation, and maybe that it included changes to the Glean SDK if we need something from it (like we might need to have it respect include_client_id: false
on pings, or have special behaviour when it's send_if_empty: false
, or if we want to have a specific send_in_pings
value for "included it everywhere the client_id
is included", or what-have-you).
If this is the bug for that, then now it's all written down and that's enough for me for now.
Assignee | ||
Comment 6•5 months ago
|
||
Updated•5 months ago
|
Assignee | ||
Comment 7•5 months ago
|
||
Assignee | ||
Comment 8•5 months ago
|
||
Updated•5 months ago
|
Updated•5 months ago
|
Assignee | ||
Comment 9•5 months ago
|
||
Comment 10•4 months ago
|
||
Comment 11•4 months ago
|
||
Comment 12•4 months ago
•
|
||
Backed out for causing build bustages
Xpcshell failures present as well: https://treeherder.mozilla.org/logviewer?job_id=467991517&repo=autoland&lineNumber=2498
Comment 13•4 months ago
|
||
Assignee | ||
Comment 14•4 months ago
|
||
Comment 15•4 months ago
|
||
Comment 16•4 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8777b143cb18
https://hg.mozilla.org/mozilla-central/rev/fb86ed3484d1
https://hg.mozilla.org/mozilla-central/rev/14cd024dde90
https://hg.mozilla.org/mozilla-central/rev/73d37e644eb9
Assignee | ||
Updated•4 months ago
|
Description
•