datnguye / dbterd

Generate the ERD as a code from dbt artifacts
https://dbterd.datnguyen.de/
MIT License
198 stars 28 forks source link

[BUG] pinned version of dbt-artifacts-parser is not compatible with latest dbterd code #98

Closed jacob-ketterer closed 5 months ago

jacob-ketterer commented 5 months ago

Describe the bug If using pip to update dbterd, a previous version of dbt-artifacts-parser may satisfy the pinned version but not have the latest manifest object versions defined (e.g. ManifestV11)

To Reproduce Attempt to pip install --upgrade dbterd with an older version of dbt-artifacts-parser installed (could use v0.4.0 for example). Executing dbterd at this time will raise an error: ModuleNotFoundError: No module named 'dbt_artifacts_parser.parsers.manifest.manifest_v11

Expected behavior required versions in the toml file could be more specific and cause pip to auto-update this dependency as needed when upgrading dbterd

Desktop (please complete the following information):

datnguye commented 5 months ago

Hi @jacob-ketterer thanks for raising it! For a resolution of this issue, I guess we can solve it with requiring the minimum dbt-artifact-parser version in pyproject.toml. Will do it in the next dbterd version and the patch of v1.12.

But even so, we might encounter the same issue as further because it is related to the new manifest definition in newer dbt version. Users are supposed to upgrade dbt-artifact-parser manually if their dbt version was upgraded, I will update the doc to specify this case!

datnguye commented 5 months ago

The latest doc site has been updated here

datnguye commented 5 months ago

Just to recap for the resolution of this from the docs

It's highly recommended to update dbt-artifacts-parser to the latest version in order to support the newer dbt-core version which would cause to have the new manifest / catalog json schema:

pip install dbt-artifacts-parser --upgrade
datnguye commented 5 months ago

I am closing this issue now, but feel free to re-open it for any other suggestions of the resolution. Thank you!