Open Bug 2076540 Opened 1 month ago Updated 11 days ago

Don't validate Glean metrics files against the schema in automation builds

Categories

(Data Platform and Tools :: Glean: SDK, task, P2)

task

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: jcristau, Assigned: jcristau)

References

Details

Attachments

(2 external files)

Generating metrics_yamls.cached validates all the metrics.yaml files against the schema, which is most of the time spent parsing them (2.5s -> 0.7s locally when skipped). In artifact builds, it is the longest job of the pre-export tier. In automation, the glean-parser lint job already validates these files whenever they change (it's always-target with files-changed optimization), so the builds don't need to do it again.

This needs a skip_validation parser option in glean_parser (applied to the vendored copy in the patch, but it needs to go upstream), which run_glean_parser.parse() sets when MOZ_AUTOMATION is set. The parsed output is identical.

This relies on the lint job actually reporting validation errors, which it currently doesn't (bug 2076535).

Status: NEW → ASSIGNED
Component: Telemetry → Glean: SDK
Priority: -- → P2
Product: Toolkit → Data Platform and Tools

Validating all the metrics.yaml files against the schema is most of the
time spent parsing them, and makes metrics_yamls.cached the longest job
of the pre-export tier in artifact builds (5.2s on CI, 2.5s locally
versus 0.7s without validation). In automation, the glean-parser lint
job already validates them whenever they change, so skip it there.

On CI, metrics_yamls.cached now takes 2.8s.

This adds a skip_validation option to glean_parser, which needs to go
upstream.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: