Reverse the key/values of BrowserSearchTelemetry.KNOWN_SEARCH_SOURCES and improve related TypeScript information
Categories
(Firefox :: Search, task, P2)
Tracking
()
People
(Reporter: standard8, Assigned: standard8, NeedInfo)
References
Details
(Whiteboard: [sng])
Attachments
(6 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 |
BrowserSearchTelemetry.KNOWN_SEARCH_SOURCES is currently a map of the legacy names for SAP sources to their current names. Some of the legacy names use dashes rather than underscores. and a few are described differently.
We want to swap this around, so that we can start using the current names everywhere, making it easier to obsolete the legacy names when we remove the legacy probes in future. This will also help to avoid adding more references to the legacy names in the code.
Whilst here, I want to improve the TypeScript information around this - by switching to a frozen object, TypeScript will see it as not changing, and allow us to check against the keys or values of it.
Overall this should help with adding more types in future, and ensuring that we have more checking in place to avoid mistakes of submitting the wrong SAP source.
Updated•3 days ago
|
| Assignee | ||
Comment 1•3 days ago
|
||
| Assignee | ||
Comment 2•3 days ago
|
||
This helps with TypeScript support, since now TypeScript will know we do not intend to change the object,
and hence we can check for valid keys.
| Assignee | ||
Comment 3•3 days ago
|
||
This changes it so that the deprecated sources (with '-') are now the values, and the sources that we use for newer
probes (with '_') are the keys. This will make it simpler for when we remove the deprecated telemetry.
| Assignee | ||
Comment 4•3 days ago
|
||
| Assignee | ||
Comment 5•3 days ago
|
||
| Assignee | ||
Comment 6•3 days ago
|
||
Comment 9•20 hours ago
|
||
Backed out for causing documentation failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/66f879e464e6a83ee2e67b62cfe3cedbb757b94e
Comment 10•17 hours ago
|
||
Comment 11•17 hours ago
•
|
||
(In reply to Sandor Molnar[:smolnar] from comment #9)
Backed out for causing documentation failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/66f879e464e6a83ee2e67b62cfe3cedbb757b94e
relanded because some bc glean telemetry failures appeared that didn't pinpoint to anything.
hopefully it's from my revert
LE. it's not from this bug
Comment 12•12 hours ago
|
||
Comment 13•12 hours ago
|
||
(In reply to Sandor Molnar[:smolnar] from comment #9)
Backed out for causing documentation failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/66f879e464e6a83ee2e67b62cfe3cedbb757b94e
Backing out again, we are still having the documentation failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/3dd3959ec9d13bc716782da0944a07d595270d93
Comment 14•10 hours ago
|
||
Comment 15•10 hours ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/f9082c9319910b607e1b028c49b3bd353ab56f5a
Comment 16•10 hours ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/20eff6081322
https://hg.mozilla.org/mozilla-central/rev/efb072447323
https://hg.mozilla.org/mozilla-central/rev/bedefc0bdab1
https://hg.mozilla.org/mozilla-central/rev/c44bcc177787
https://hg.mozilla.org/mozilla-central/rev/5ef6c992bacd
https://hg.mozilla.org/mozilla-central/rev/d57620098852
Comment 17•10 hours ago
|
||
Reopened for the backout in comment 15.
Comment 18•8 hours ago
|
||
Description
•