fix: DbtProcess/DbtColumnProcess extend correct process parent (SHA-887)#923
Merged
Conversation
Same root cause as the DbtMeasure fix in 9.7.0 — Atlas typedefs list ``Dbt`` first in ``superTypes``, the class generator picks ``super_types[0]``, and publish-app's ``issubclass(cls, Process)`` / ``issubclass(cls, ColumnProcess)`` checks (used to identify lineage types that must publish *after* the entities they reference) silently return False. The dbt-process classes then land in Batch 1 alongside their upstream entities and ATLAS-404 on every ``inputs`` / ``outputs`` lookup. Atlas typedefs: - DbtProcess.superTypes = ["Dbt", "Process"] → should be Process - DbtColumnProcess.superTypes = ["Dbt", "ColumnProcess"] → should be ColumnProcess Fix - pyatlan/generator/class_generator.py: extend _SUPERCLASS_OVERRIDES with "DbtProcess": "Process" and "DbtColumnProcess": "ColumnProcess". - pyatlan/model/assets/dbt_process.py: ``class DbtProcess(Process)`` and ``class Attributes(Process.Attributes)``. - pyatlan/model/assets/dbt_column_process.py: same shape against ``ColumnProcess``. The override only applies when the named supertype is actually declared on the entity, so a future typedef change that drops it cleanly errors rather than silently reverting. Tests - tests/unit/model/dbt_process_test.py — 7 cases (issubclass guards, __bases__[0], type_name immutability, dbt_* + Process attribute round-trip on the same instance). - tests/unit/model/dbt_column_process_test.py — same 7 cases for the ColumnProcess parent. Verified - ./qa-checks: ruff format / ruff check / mypy all pass. - 14/14 new tests pass; full unit suite clean. Release notes will land in the next version bump (HISTORY.md is left alone here so 9.7.0's already-shipped section isn't retroactively edited). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same root cause as the
DbtMeasurefix in 9.7.0 (#919) — Atlas typedefs listDbtfirst insuperTypes, the class generator pickssuper_types[0], andatlan-publish-app'sissubclass(cls, Process)/issubclass(cls, ColumnProcess)checks (used to identify lineage types that must publish after the entities they reference) silently returnFalse. The dbt-process classes then land in Batch 1 alongside their upstream entities and ATLAS-404 on everyinputs/outputslookup. ~35 publish failures observed in a live dbt run, plus the same pattern hits SAP BW connectors.Atlas typedefs
superTypes(Atlas)DbtProcess[\"Dbt\", \"Process\"]DbtProcessDbtColumnProcess[\"Dbt\", \"ColumnProcess\"]DbtColumnProcessSibling type
DbtMeasurewas fixed via the same mechanism in 9.7.0 — this PR uses the same_SUPERCLASS_OVERRIDESmap.Changes
pyatlan/generator/class_generator.py— extend_SUPERCLASS_OVERRIDESwith\"DbtProcess\": \"Process\"and\"DbtColumnProcess\": \"ColumnProcess\". The override only applies when the named supertype is actually declared on the entity, so a future typedef change that drops it cleanly errors rather than silently reverting.pyatlan/model/assets/dbt_process.py—class DbtProcess(Process)andclass Attributes(Process.Attributes).pyatlan/model/assets/dbt_column_process.py— same shape againstColumnProcess.Blast radius
Same as the DbtMeasure fix:
isinstance(x, Dbt)on aDbtProcess/DbtColumnProcesswasTrue, is nowFalse. That check was incorrect — Atlas does not modelDbtProcessas aDbtsubtype in a way that's meaningful for ordering. A grep across pyatlan and its tests finds no suchisinstanceusage.type_name, attribute keys) is unchanged — everydbt_*andProcess/ColumnProcessfield is declared inline on the respectiveAttributesclasses, so no fields are lost; only the MRO is corrected.Tests
tests/unit/model/dbt_process_test.py— 7 cases (issubclassguards both directions,__bases__[0],type_nameimmutability,dbt_*andProcessattribute round-trip on the same instance).tests/unit/model/dbt_column_process_test.py— same 7 cases for theColumnProcessparent.Verified
./qa-checks— ruff format / ruff check / mypy all passpytest tests/unit/model/dbt_process_test.py tests/unit/model/dbt_column_process_test.py -q— 14/14 passDbtProcess/DbtColumnProcessmove to a strictly later batch than the entities they referenceNotes
Release notes will land in the next version bump (HISTORY.md is left alone here so 9.7.0's already-shipped section isn't retroactively edited). The
typing.get_type_hintsshim that was bundled into the closed PR #922 has been dropped — the better fix is on the publish-app side (switching to pydantic v1'sModelField.type_/.shape, which are already fully resolved at SDK import time viaupdate_forward_refs). A separate publish-app PR will land that change.🤖 Generated with Claude Code