glean_parser: Common Prefix lint can lead to unwanted outcome
Categories
(Data Platform and Tools :: Glean: SDK, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: janerik, Assigned: janerik)
References
Details
Attachments
(1 file)
We currently have the common prefix lint.
It checks for a common prefix in all metrics under a certain category.
Unfortunately following that lint can lead to unwanted/unsupported outcomes, see for example https://github.com/mozilla/glam/issues/3526
A metric was changed like this:
- search:
- suggestions_latency:
+ search.suggestions:
+ latency:
This was because they also added another metric, that fit well into the search.suggestions category.
For Glean client-side tooling this was all ok. The full ID is search.suggestions_latency for the old name, and search.suggestions.latency for the new.
However in the database we normalize this: dots (.) become underscores (_), thus turning both into search_suggestions_latency in the database column as well as as the identifier used in URLs like GLAM.
This breaks things.
Unfortunately the best we can do at the moment is to NOT suggest this change.
Notably other case: The lint only triggers when all metrics under a category have the same prefix. So e.g. removing a metric could lead to it triggering for all the other metrics.
Comment 1•2 months ago
|
||
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
badboy merged PR [mozilla/glean_parser]: Bug 2052480 - Disable COMMON_PREFIX lint (#852Edit title) in 01f16d7.
| Assignee | ||
Updated•2 months ago
|
Description
•