Datavault-UK / automate-dv

A free to use dbt package for creating and loading Data Vault 2.0 compliant Data Warehouses (powered by dbt, an open source data engineering tool, registered trademark of dbt Labs)
https://www.automate-dv.com
Apache License 2.0
492 stars 121 forks source link

[BUG] dbt_utils dependency update to 0.9.2 #160

Closed cons0l3 closed 1 year ago

cons0l3 commented 1 year ago

Thanks for all the work the team is putting into this awesome module! I am currently learning dbt, dbvault, dbt_excpectations, so be patient ;-)

Describe the bug When using dbvault in conjunction with dbt_expectations (0.6.1), a dbt_utils version conflict araises when dbt deps is ran. dbtvault uses dbt_utils 0.8 <= 0.8.6 (installed) <= 0.9, where as dbt_expectations requires dbt_utils to be between >=0.9 and <1.0.0.

Environment

dbt version:

dbtvault version:

~> dbt --version
Core:
  - installed: 1.2.2
  - latest:    1.2.2 - Up to date!`
  - 
Plugins:
  - postgres: 1.2.2 - Up to date!

Database/Platform:

To Reproduce Steps to reproduce the behavior:

  1. add dbt_expectations to package.yml
  2. run dbt deps

Expected behavior dbtvault using the newest version of dbt_utils

Log before adding dbt_expectations to packages.yml

08:06:22  Running with dbt=1.2.2
08:06:22  Installing Datavault-UK/dbtvault
08:06:23    Installed from version 0.9.0
08:06:23    Up to date!
08:06:23  Installing dbt-labs/dbt_utils
08:06:23    Installed from version 0.8.6
08:06:23    Updated version available: 0.9.2
08:06:23
08:06:23  Updates available for packages: ['dbt-labs/dbt_utils']
Update your versions in packages.yml, then run dbt deps

affter adding dbt_expectations to packages.yml

08:17:06  Running with dbt=1.2.2
08:17:08  Encountered an error:
Version error for package dbt-labs/dbt_utils: Could not find a satisfactory version from options: ['>=0.8.0', '<0.9.0', '>=0.9.0', '<1.0.0']
08:17:08  Traceback (most recent call last):
  File "C:\Users\CarstenSteckel\.conda\envs\dbt-play\lib\site-packages\dbt\semver.py", line 381, in reduce_versions
    to_return = to_return.reduce(version_specifier.to_range())
  File "C:\Users\CarstenSteckel\.conda\envs\dbt-play\lib\site-packages\dbt\semver.py", line 294, in reduce
    raise VersionsNotCompatibleException()
dbt.exceptions.VersionsNotCompatibleException
DVAlexHiggs commented 1 year ago

Hi, thanks for the report. dbtvault has currently not been updated to use dbt v1.2.x, and the versions of dbt utils and expectations are the versions needed for 1.2x, hence the issue. This will be coming in a release shortly

cons0l3 commented 1 year ago

I have checked out dbvault 0.9.0 sources locally, patch its packages.yml dependency to use db-utils version [">=0.8.0", "<1.0.0"]. Then I used this dbtvault version in my "test" project as local dependency and ran with dbt 1.2.2. I have not found any problems. Since I am running it against postgres, I have not checked all the macros which are incomaptible with postgres.

Maybe it helps ;-)

DVAlexHiggs commented 1 year ago

I have checked out dbvault 0.9.0 sources locally, patch its packages.yml dependency to use db-utils version [">=0.8.0", "<1.0.0"]. Then I used this dbtvault version in my "test" project as local dependency and ran with dbt 1.2.2. I have not found any problems. Since I am running it against postgres, I have not checked all the macros which are incomaptible with postgres.

Maybe it helps ;-)

Great! Please bear in mind though that this is untested. We recommend moving to dbtvault 0.9.1 as soon as it is available

DVAlexHiggs commented 1 year ago

0.9.1 Released which addresses this issue. Thanks! Please re-open this issue if unresolved.