The glean-parser linter doesn't report metrics.yaml schema validation errors
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: jcristau, Assigned: jcristau)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
A metrics.yaml with, e.g., an unknown property in a metric passes mach lint -l glean-parser (and the source-test-mozlint-glean-parser job) with "0 problems", while the build fails to parse it.
glean_parser reports schema validation errors as blocks separated by lines of =, while the linter only turns lines starting with WARNING: or ERROR: (the glinter nits) into results, so validation errors are silently dropped.
Reporting those blocks as errors also uncovers that toolkit/crashreporter/crashping/static_metrics.yaml is linted together with generated_metrics.yaml, which contains the same metrics (glean_metrics.py merges them), so it needs to be excluded.
| Assignee | ||
Comment 1•25 days ago
|
||
Per bug 2076540, schema validation is on the critical path in particular for artifact builds, so I'm looking at skipping it there, relying on the linter to catch issues instead.
| Assignee | ||
Comment 2•25 days ago
|
||
glean_parser reports schema validation errors as blocks separated by
lines of "=", not as "WARNING:"/"ERROR:" lines like the glinter nits,
so the linter silently dropped them and passed files that fail
validation. Turn those blocks into lint errors too.
This uncovered that static_metrics.yaml is linted together with
generated_metrics.yaml, which contains the same metrics, so exclude it.
Comment 4•20 days ago
|
||
| bugherder | ||
Description
•