Skip to content

Commit dee1140

Browse files
authored
Update schema to allow for "special" glean_* pings (#301)
* Update schema to allow for "special" glean_* pings See mozilla/glean#1572 * Move special case to `send_in_pings` only
1 parent 6b1de41 commit dee1140

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Raise limit on number of statically-defined lables to 100. ([bug 1702263](https://bugzilla.mozilla.org/show_bug.cgi?id=1702263))
6+
- BUGFIX: Version 2.0.0 of the schema now allows the "special" `glean_.*` ping names for Glean-internal use again.
67

78
## 2.5.0 (2021-02-23)
89

glean_parser/schemas/metrics.2-0-0.schema.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ definitions:
177177
in any ping.)
178178
type: array
179179
items:
180-
$ref: "#/definitions/kebab_case"
180+
anyOf:
181+
- $ref: "#/definitions/kebab_case"
182+
# Allow "special" ping names that start with "glean_" used
183+
# internally by the Glean SDK
184+
- type: string
185+
pattern: "^glean_.*$"
181186
default:
182187
- default
183188

tests/data/core.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ telemetry:
2121
- CHANGE-ME@example.com
2222
send_in_pings:
2323
- core
24+
- glean_client_info
2425
expires: 2100-01-01
2526

2627
core_ping:

tests/test_translate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_getting_line_number():
189189
metrics = load_yaml_or_json(ROOT / "data" / "core.yaml")
190190

191191
assert pings["custom-ping"].defined_in["line"] == 7
192-
assert metrics["core_ping"]["seq"].defined_in["line"] == 27
192+
assert metrics["core_ping"]["seq"].defined_in["line"] == 28
193193

194194

195195
def test_rates(tmpdir):

0 commit comments

Comments
 (0)