Restrict ping names to be kebab-case (again)
Categories
(Data Platform and Tools :: Glean: SDK, defect, P1)
Tracking
(Not tracked)
People
(Reporter: janerik, Assigned: janerik)
References
Details
(Whiteboard: [telemetry:glean-rs:m11])
klukas informed me that we want to disallow underscores in ping names.
We previously attempted to do just that (https://github.com/mozilla/glean_parser/pull/90), but reverted it because we weren't ready for the impact.
The follow-up wasn't merged (https://github.com/mozilla/glean_parser/pull/94).
Now that we have deletion_request this comes up again and we need to act on it.
The pipeline can handle it.
The probe-scraper might start rejecting older pings if we switch it over.
klukas can help in determining impact and necessary changes on their end.
| Assignee | ||
Comment 1•6 years ago
|
||
From https://github.com/mozilla/glean_parser/pull/90#issuecomment-525773761
Just spoke with Frank and it sounds like we pretty much have a way forward for this:
- Merge this change and deploy a new version of glean_parser
- Update MPS to include both the old snake_case names and the new kebab-case names for sync pings
- Update MSG to convert snake-case ping names from probe info service to kebab-case (to handle the interim before fenix gets the updated names)
- PR android-components to take the new glean_parser and update the sync ping names to kebab-case
- Fenix gets the updated android-components and should otherwise not notice any change
What is MPS?
What is MSG?
| Assignee | ||
Comment 2•6 years ago
|
||
Previous discussion: https://github.com/mozilla-services/mozilla-pipeline-schemas/issues/390
| Assignee | ||
Comment 3•6 years ago
|
||
I still don't fully understand why we need this, especially given the impact this will have, now that we have multiple pings with an underscore.
:klukas, can you expand on why the change is necessary?
| Assignee | ||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
MPS refers to the mozilla-pipeline-schemas repo and MSG refers to the mozilla-schemas-generator repo.
I still don't fully understand why we need this, especially given the impact this will have, now that we have multiple pings with an underscore.
I am currently only aware of two existing ping names with underscores (the two _sync pings) and this new deletion_request ping. Are there others?
I am willing to prioritize working on the changes to MPS and MGS so that we can get this codified and avoid this continuing to cause pain in the future.
:klukas, can you expand on why the change is necessary?
We never properly intended to support pings with an underscore. The telemetry docs have specified for a long time that document namespace and type should be limited to characters [a-z-] [0]. There was some miscommunication that led to us allowing the two _sync ping names with underscores into mozilla-pipeline-schemas.
I would not call this change necessary in that we can technically build and maintain support for ping names with underscores. But it is important for consistency and being able to reason about the system end-to-end. Continuing to support both options will lead to ping authors making stylistic decisions, and thus it becomes difficult for users to predict the casing of ping names. It also leads to more complicated logic in the pipeline that we would need to support long-term and increases the possibility of error when we do operational maintenance like backfilling between sources.
[0] https://docs.telemetry.mozilla.org/cookbooks/new_ping.html#choose-a-namespace-and-doctype
| Assignee | ||
Comment 5•6 years ago
|
||
I had a chat with :klukas about the steps forward.
- Land changes to glean_parser (based on the initial PR): Restrict ping names to 30 alphanumeric + dash characters. Additionally allow:
deletion_request,history_sync,bookmarks_sync.- Release a new version glean_parser.
- Update used glean_parser version in the probe-scraper to the new version
- Ensure the schema generator can handle both dashes and underscores and generates the same table names (e.g.
deletion_requestanddeletion-requestare considered to be the same - Update glean_parser in Glean
- At the same time also rename
deletion_requesttodeletion-requestwhile we're at it
- At the same time also rename
- Rename
history_syncandbookmarks_syncto their dashed versions - Land new Glean and new sync in Fenix (and other applications)
- Double-check documentation on dtmo and the Glean SDK book agree on naming.
| Assignee | ||
Comment 6•6 years ago
|
||
- Changes landed: https://github.com/mozilla/glean_parser/pull/146/ - released in 1.15.1
- a-c was updated as well: https://github.com/mozilla-mobile/android-components/pull/5301
| Assignee | ||
Comment 7•6 years ago
|
||
probe-scraper update: https://github.com/mozilla/probe-scraper/pull/146
| Assignee | ||
Comment 8•6 years ago
|
||
Needed to fix the codegen in glean_parser, but now the above patches should be good and on their way.
| Assignee | ||
Comment 9•6 years ago
|
||
Renames for a-c are up here: https://github.com/mozilla-mobile/android-components/pull/5306
:klukas, just as a safety check, we're good to land this rename?
| Assignee | ||
Comment 10•6 years ago
|
||
one more occurence of an underscore: https://github.com/MozillaReality/FirefoxReality/blob/6ba38814531b423318510daca0911c9da89806f2/app/pings.yaml#L7
| Assignee | ||
Comment 11•6 years ago
|
||
PR up here: https://github.com/MozillaReality/FirefoxReality/pull/2478
Caution: this can't land right now as it requires upgrades to android-components first.
Comment 12•6 years ago
|
||
(In reply to Jan-Erik Rediger [:janerik] from comment #9)
Renames for a-c are up here: https://github.com/mozilla-mobile/android-components/pull/5306
:klukas, just as a safety check, we're good to land this rename?
Yes, we have landed the necessary change in mozilla-schema-generator. So the schema generation and ingestion pipelines are ready for this change.
| Assignee | ||
Comment 13•6 years ago
|
||
filed follow up bugs, so this can be considered done.
Description
•