Closed
Bug 1507793
Opened 6 years ago
Closed 6 years ago
Invalid metrics.yaml formats lead to cryptic messages
Categories
(Toolkit :: Telemetry, enhancement, P3)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox65 | --- | affected |
People
(Reporter: gfritzsche, Assigned: mdroettboom)
References
Details
(Whiteboard: [telemetry:mobilesdk:m3])
Attachments
(1 file)
- Set metrics.yaml contents to e.g.:
> gleantest.foo:
> a: b
- ... the build fails with indescriptive messages, coming down to:
> On instance['gleantest.foo']['a']:
> 'b'
> /Users/gfritzsche/moz/GleanTest/app/metrics.yaml: gleantest.foo.a: string indices must be integers
I'd rather see something descriptive.
| Reporter | ||
Updated•6 years ago
|
Priority: -- → P3
| Assignee | ||
Updated•6 years ago
|
Assignee: nobody → mdroettboom
Whiteboard: [telemetry:mobilesdk:m?] → [telemetry:mobilesdk:m3]
| Assignee | ||
Comment 1•6 years ago
|
||
The last message (string indices must be integers) is redundant and confusing, but the earlier ones I think do a pretty good job of explaining the problem:
```
On instance['gleantest.foo']:
'gleantest.foo'
/home/mdboom/Work/builds/mobile-sdk/glean_parser/tests/data/schema-violation.yaml: 'b' is not of type 'object'
```
The issue is that validation fails against the schema and then, in the interest of giving the user every possible error, that invalid data produces more obscure errors downstream.
I think we should cut things off after the schema validation errors if anything fails at that step, and only present the more specific downstream errors if validation itself passes.
| Assignee | ||
Comment 2•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•