Skip to content

Bug 2076540 - Add a skip_schema_validation option to bypass schema validation - #867

Open
jcristau wants to merge 1 commit into
mozilla:mainfrom
jcristau:skip_schema_validation
Open

jcristau wants to merge 1 commit into
mozilla:mainfrom
jcristau:skip_schema_validation

Conversation

@jcristau

@jcristau jcristau commented Oct 13, 2026 •

Copy link
Copy Markdown

Firefox parses all of its metrics.yaml/pings.yaml files at the start of every build, and validating them against the JSON schema accounts for most of that time (5.2s -> 2.8s in CI, 2.5s -> 0.7s locally when skipped). Firefox already validates these files in a separate lint job (bug 2076535), so builds don't need to do it again.

The new skip_schema_validation parser option skips the jsonschema validation step in _load_file, including the check that $schema is a known schema; the Python-level checks still run. It is only safe when the input has been validated elsewhere, since invalid input may raise exceptions rather than produce errors. The default is unchanged.

Pull Request checklist

  • Quality: This PR builds and tests run cleanly
    • make test runs without emitting any warnings
    • make lint runs without emitting any errors
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to language binding APIs are noted explicitly

…lidation

Firefox parses all of its metrics.yaml/pings.yaml files at the start of
every build, and validating them against the JSON schema accounts for
most of that time (5.2s -> 2.8s in CI, 2.5s -> 0.7s locally when
skipped). Firefox already validates these files in a separate lint job
(bug 2076535), so builds don't need to do it again.

The new `skip_schema_validation` parser option skips the jsonschema
validation step in `_load_file`, including the check that `$schema` is a
known schema; the Python-level checks still run. It is only safe when
the input has been validated elsewhere, since invalid input may raise
exceptions rather than produce errors. The default is unchanged.
@jcristau
jcristau marked this pull request as ready for review October 13, 2026 16:11
@jcristau
jcristau requested a review from a team as a code owner October 13, 2026 16:11
@jcristau
jcristau requested review from badboy and removed request for a team October 13, 2026 16:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant