Skip to content

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

Merged
badboy merged 1 commit into
mozilla:mainfrom
jcristau:skip_schema_validation
Oct 21, 2026
Merged

badboy merged 1 commit into
mozilla:mainfrom
jcristau:skip_schema_validation

Conversation

@jcristau

@jcristau jcristau commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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

@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
@badboy
badboy enabled auto-merge (rebase) October 19, 2026 13:55
auto-merge was automatically disabled October 19, 2026 13:58

Rebase failed

…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 force-pushed the skip_schema_validation branch from c8bbdc0 to 5a1ada2 Compare October 21, 2026 11:00
@jcristau

Copy link
Copy Markdown
Contributor Author

@badboy fyi I just force-pushed to resolve the CHANGELOG.md merge conflict

@badboy

badboy commented Oct 21, 2026

Copy link
Copy Markdown
Member

@badboy fyi I just force-pushed to resolve the CHANGELOG.md merge conflict

Thanks! This should have landed before but GitHub was broken ... merging now.

@badboy
badboy merged commit 7fa1bf8 into mozilla:main Oct 21, 2026
12 checks passed
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.

2 participants