Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fastjsonschema instead of jsonschema for validation #10249

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Jun 1, 2024

resolves #10248

Problem

For performance reasons we would like to replace jsonschema validation with fastjsonschema validation.

Solution

The main changes are in dbt_common/dataclass_schema.py. This PR mainly handles changes to various error messages.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@gshank gshank requested a review from a team as a code owner June 1, 2024 18:05
@cla-bot cla-bot bot added the cla:yes label Jun 1, 2024
Copy link

codecov bot commented Jun 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.11%. Comparing base (25c2042) to head (bd394ac).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10249      +/-   ##
==========================================
- Coverage   88.88%   88.11%   -0.78%     
==========================================
  Files         180      180              
  Lines       22704    22720      +16     
==========================================
- Hits        20180    20019     -161     
- Misses       2524     2701     +177     
Flag Coverage Δ
integration 84.62% <75.00%> (-1.58%) ⬇️
unit 62.31% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.31% <100.00%> (+0.07%) ⬆️
Integration Tests 84.62% <75.00%> (-1.58%) ⬇️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace jsonschema with fastjsonschema for validation
1 participant