Skip to content

Fork test: PR #1259 - Migrate Configs and Rules to Pydantic#1272

Closed
mwojtyczka wants to merge 16 commits into
mainfrom
fork-test/pr-1259
Closed

Fork test: PR #1259 - Migrate Configs and Rules to Pydantic#1272
mwojtyczka wants to merge 16 commits into
mainfrom
fork-test/pr-1259

Conversation

@mwojtyczka

Copy link
Copy Markdown
Contributor

Automated sync from fork PR for CI testing.

Original PR: #1259

All tests, including unit and integration tests run on this PR (they are skipped for fork PRs).

fedeflowers and others added 8 commits June 19, 2026 21:07
Migrate storage configs, ChecksValidationStatus and the DQRule family to
Pydantic v2 BaseModel. WorkspaceConfig/RunConfig and their nested config tree
stay as dataclasses because databricks-labs-blueprint's Installation load/save
dispatches on dataclasses.is_dataclass() and __dataclass_fields__.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Revert location/columns type widening that broke mypy (str|None cascaded
  into checks_storage.py; widened columns broke manager.py and get_rules).
  Empty/None location now rejected in @model_validator(mode='before') so the
  DQX-specific InvalidConfigError/InvalidParameterError is still raised before
  Pydantic coercion; None elements in columns rejected the same way.
- Declare _expected_rule_type/_alternative_rules as ClassVar on DQRuleTypeMixin
  so subclass ClassVar overrides no longer trip mypy.
- Use plain mutable field defaults ({}/[]) instead of Field(default_factory=...)
  (Pydantic v2 deep-copies per instance) to clear pylint FieldInfo no-member.
- Use self.__class__ is not X instead of type(self) for exact-type guards.
- Add pydantic to uv.lock via make lock-dependencies (was missing from the
  databricks-labs-dqx dependency block).

make lint (black, ruff, mypy, pylint 10/10) and 1134 unit tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ace, aliased ChecksValidationStatus.errors, model_copy in lakebase test)
…ttable field (extra=forbid) and add validating BaseChecksStorageConfig.replace(); use it in lakebase test instead of validation-skipping model_copy
@mwojtyczka mwojtyczka requested a review from a team as a code owner June 24, 2026 09:48
@mwojtyczka mwojtyczka requested review from pratikk-databricks and removed request for a team June 24, 2026 09:48
@mwojtyczka mwojtyczka added do-not-merge The PR is blocked, e.g. being worked on and not ready. Not using draft to be able to test changes. fork-test labels Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.57143% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.55%. Comparing base (d1d2a9b) to head (b0da202).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/databricks/labs/dqx/config.py 98.27% 1 Missing ⚠️
src/databricks/labs/dqx/rule.py 98.36% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1272      +/-   ##
==========================================
+ Coverage   92.50%   92.55%   +0.04%     
==========================================
  Files         102      102              
  Lines       10102    10217     +115     
==========================================
+ Hits         9345     9456     +111     
- Misses        757      761       +4     
Flag Coverage Δ
anomaly 54.23% <67.85%> (-0.02%) ⬇️
anomaly-serverless 54.23% <67.85%> (-0.03%) ⬇️
integration 50.34% <37.85%> (+2.15%) ⬆️
integration-serverless 50.43% <37.85%> (-0.19%) ⬇️
unit 57.89% <98.57%> (+0.53%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

✅ 776/776 passed, 49 skipped, 7h10m18s total

Running from acceptance #5015

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

✅ 194/194 passed, 2 skipped, 8h48m21s total

Running from anomaly #1129

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

Labels

do-not-merge The PR is blocked, e.g. being worked on and not ready. Not using draft to be able to test changes. fork-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants