dbt-core: Duplicate dbt_utils folder when running dbt deps

Describe the bug

When running dbt deps, it creates another dbt-utils folder which results in an error. The only way to be able to fix dbt from breaking, is to manually delete dbt-utils-x.x.x and not run dbt deps. Running dbt deps and the duplicated folder will appear, but after going back and forth with deleting the folder and running the command again, all of a sudden the command would run successfully. Note, I deleted the duplicated folder after each time I got the winerror 32

Steps to reproduce

Simply running the command dbt deps

Expected results

Having dbt deps run successfully and receiving a message Up to date! as a final output

Actual results

When running the command dbt deps, a duplicate folder of dbt_utils will be created but with a specific version of the package. In the dbt_modules folder, there will be two dbt_utils folders (dbt_utils folder and dbt-utils-x.x.x folder)

Screenshots and log output

image image

System information

The contents of your packages.yml file: The content in my packages.yml file is as follows

packages:
  - package: dbt-labs/dbt_utils
    version: [">=0.7.0", "<0.8.0"]

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

installed version: 0.21.0
   latest version: 0.21.0

Up to date!

Plugins:
  - bigquery: 0.21.0
  - postgres: 0.21.0
  - redshift: 0.21.0
  - snowflake: 0.21.0

Additional context

As mentions above, when deleted the duplicated folder and running dbt deps several time, it will eventually execute correctly. In the screenshot below, I run the command everytime and deleted the duplicated folder right after each command until the command executed successfully image

Are you interested in contributing the fix?

``

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 25 (9 by maintainers)

Most upvoted comments

Not sure if this is what other people are seeing but I got past this by temporarily disabling the dbt-poweruser extension. It seems like it’s related to this issue in the dbt-poweruser extension

Not sure if this is what other people are seeing but I got past this by temporarily disabling the dbt-poweruser extension. It seems like it’s related to this issue in the dbt-poweruser extension

That’s interesting. My colleagues and I have been overcoming this issue by closing out of VS Code and running dbt deps in Powershell. It works every time & then we can resume working in VS Code.

I had this problem using dbt-sqlserver 1.3.1 in VS Code on Windows and got it working by pausing my OneDrive sync

@joellabes it was on the CLI! I should’ve mentioned that!

Caught it in the act! https://www.loom.com/share/c1a000b2bb6544f4b74a46a05b21724b (45 second mark)

It looks like it makes a directory called dbt-utils-0.7.4 and then renames it to dbt_utils a fraction of a second later. The other packages don’t behave that way… not sure why!

Edit: We went back to utils 0.7.3 as well, and observed the same behaviour, as well as for hubspot_source. I wonder whether it actually does it for all packages, but those ones are larger? 🤷

I feel reasonably confident that this is actually a Core issue, so will shoot it over there!