elementary-data/dbt-data-reliability

dbt_utils dependency is too strict

joellabes opened this issue · 3 comments

Hi! In reviewing this repo before adding it to the dbt hub, I had a look at your packages.yml and dbt_project.yml files.

Since you're pinning your require-dbt-version to [>= 0.20, < 1.1], your dependency being locked to dbt-utils 0.7.6 is too strict. Earlier 0.7.x versions are compatible with 0.20.x of dbt Core, and v0.8.x are compatible with 1.x

I'd suggest changing your require-dbt-version to [">0.20.0", "<2.0.0"] and dbt_utils version to [">=0.7.0", "<0.9.0"], otherwise some users who install your package may run into dependency issues.

Let me know if you've got any questions 🚀

oravi commented

Hi @joellabes!

Thanks so much for reviewing and merging the PR.
I do actually have one question, the reason why we used a strict version is because of the following scenario -

  • Your dbt core version is 0.20.x
  • let's say that our required dbt_utils range is as follows - [">=0.7.0", "<0.9.0"]
  • Now you run dbt deps
  • You get dbt_utils v0.8.0 (because it's the newest version?)

The problem we had is that dbt_utils v0.8.0 is not compatible with dbt core version 0.20.x.
What would you suggest doing in that case? is there a way to limit the version range based on the dbt-core version?

Thanks a lot for your help!

You're right; I thought that it took require-dbt-version into account when resolving dependencies, but it doesn't 😬

In that case, if it's important to you to provide support to versions prior to 1.0, you might want to release two versions - 0.1.0 can stay as-is, and a separate 0.1.1 release which has require-dbt-version: [">=1.0.0", "<2.0.0"] and relies on dbt-utils [">=0.8.0", "<0.9.0"].

Users on versions prior to 1.0.0 of dbt-core will still run into problems if they have a pinned dependency on 0.7.5 or below, but that's less likely.

oravi commented

Thanks @joellabes! I've just released a new version as you suggested 👍
Closing this issue for now (feel free to comment if any changes are still needed).
Thanks again for all the help and quick replies, really appreciate it!