Closed Bug 1507793 Opened 6 years ago Closed 6 years ago

Invalid metrics.yaml formats lead to cryptic messages

Categories

(Toolkit :: Telemetry, enhancement, P3)

enhancement

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.
Priority: -- → P3
Assignee: nobody → mdroettboom
Whiteboard: [telemetry:mobilesdk:m?] → [telemetry:mobilesdk:m3]
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.
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.

Attachment

General

Created:
Updated:
Size: