Skip to content

Remove deprecated source shims (transformer_klass, validator override)#107

Merged
jirhiker merged 1 commit into
chore/cleanup-3-3from
chore/cleanup-tier4-shims
Jun 30, 2026
Merged

Remove deprecated source shims (transformer_klass, validator override)#107
jirhiker merged 1 commit into
chore/cleanup-3-3from
chore/cleanup-tier4-shims

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Tier 4 "remove deprecated shims" from docs/cleanup-todo.md. Stacked on #105 (base chore/cleanup-3-3). Merge order: #101#102#103#104#105 → this.

Removes three dead back-compat paths in backend/source.py:

Removed Why it's dead
BaseSource.transformer_klass No source overrides it; every connector passes transformer=. The transformer=None fallback now builds BaseTransformer() directly.
_SubclassValidatorShim Default validator only when validator=None. It delegated to _validate_record, which nothing overrides.
BaseParameterSource._validate_record (stub) The override hook the shim targeted — unused.

Verified safe before removing:

  • No connector sets transformer_klass or overrides _validate_record (grep across backend/).
  • Every concrete parameter source gets a real validator (AnalyteRecordValidator/WaterLevelRecordValidator) via BaseAnalyteSource/BaseWaterLevelSource. WQPParameterSource is a mixin (no __init__); WQPAnalyteSource(WQPParameterSource, BaseAnalyteSource) reaches the real validator through MRO.
  • The only validator=None cases (the test fake, the uninstantiated mixin) never validate; _extract_parameter now skips validation when _validator is None, and set_config guards it.

No behavior change. Full suite 311 passed; dg check defs clean; no dangling references to the removed symbols.

🤖 Generated with Claude Code

Three back-compat paths in backend/source.py were dead:

- `BaseSource.transformer_klass` — no source overrides it; every connector
  passes transformer=. The None fallback now constructs BaseTransformer()
  directly.
- `_SubclassValidatorShim` + `BaseParameterSource._validate_record` — the
  "override _validate_record instead of passing validator=" mechanism. Nothing
  overrides _validate_record, and every concrete parameter source receives a
  real validator via BaseAnalyteSource/BaseWaterLevelSource (WQP reaches them
  through its mixin MRO). Removed the shim and the stub; the validator default
  is now plain None and validation is skipped when absent (only the test fake /
  uninstantiated mixin hit that).

No connector relied on either path. Full suite (311) + dg check defs clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
die-orchestration View in Cloud Jun 30, 2026 at 03:38 AM (UTC)

@jirhiker jirhiker merged commit c27e9e1 into chore/cleanup-3-3 Jun 30, 2026
2 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.

1 participant