Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-2513] [Regression] dbt deps --project-dir $DBT_PROJECT_DIR hangs with dbt=1.5.0 #7491

Closed
2 tasks done
clausherther opened this issue May 3, 2023 · 3 comments · Fixed by #7628
Closed
2 tasks done
Assignees
Labels
bug Something isn't working regression
Milestone

Comments

@clausherther
Copy link
Contributor

clausherther commented May 3, 2023

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

After upgrading dbt-core to 1.5.0, our CI jobs hangs after running the following command from the parent directory of integration_tests:

dbt-expectations git:(main) dbt deps --project-dir integration_tests

Output:

01:29:08  Running with dbt=1.5.0

This will eventually result in a timeout error.

Too long with no output (exceeded 10m0s): context deadline exceeded

This was previously working under dbt version 1.4.1 and is currently blocking CI jobs for dbt-expectations and dbt-date.

If you cd integrations_tests and then run dbt deps, this command succeeds:

integration_tests git:(main) dbt deps
01:37:38  Running with dbt=1.5.0
01:37:39  Installing ../
01:37:39  Installed from <local @ ../>
01:37:39  Installing calogica/dbt_date
01:37:39  Installed from version 0.7.2
01:37:39  Up to date!

Expected Behavior

This was previously working under dbt version 1.4.1 and should simply install the packages defined in integration_tests/packages.yml.

Steps To Reproduce

Using dbt=1.5.0, in a project that contains a subproject, such as dbt-utils or dbt-expectations, run the following from the root folder:

dbt deps --project-dir subproject where subproject is the name of the folder containing the subproject.

After downgrading to dbt=1.4.1, the previous command succeeds:

dbt-expectations git:(main) dbt deps --project-dir integration_tests
01:42:13  Running with dbt=1.4.1
01:42:14  Installing ../
01:42:14    Installed from <local @ ../>
01:42:14  Installing calogica/dbt_date
01:42:14    Installed from version 0.7.2
01:42:14    Up to date!

Relevant log output

No response

Environment

- OS: MacOS 13.3.1
- Python: 3.9
- dbt: 1.5.0

Which database adapter are you using with dbt?

postgres

Additional Context

No response

@clausherther clausherther added bug Something isn't working triage labels May 3, 2023
@github-actions github-actions bot changed the title [Bug] dbt deps --project-dir $DBT_PROJECT_DIR hangs with dbt=1.5.0 [CT-2513] [Bug] dbt deps --project-dir $DBT_PROJECT_DIR hangs with dbt=1.5.0 May 3, 2023
@dbeatty10 dbeatty10 self-assigned this May 3, 2023
@dbeatty10
Copy link
Contributor

Thank you for reporting this @clausherther 🙏

I was able to reproduce what you described between 1.4 (working) and 1.5 (terminating after 10 minutes), and I'm going to label this as a regression.

Reprex

Directory structure:

.
├── dbt_project.yml
├── packages.yml
└── subproject
    ├── dbt_project.yml
    └── packages.yml

dbt_project.yml

name: "my_dbt_project"
version: "1.0.0"
config-version: 2
profile: "sandcastle"

packages.yml

packages:
  - package: calogica/dbt_date
    version: [">=0.7.0", "<0.8.0"]

subproject/dbt_project.yml

name: "my_dbt_subproject"
version: "1.0.0"
config-version: 2
profile: "sandcastle"

subproject/packages.yml

packages:
    - local: ../

Install dependencies:

 dbt deps --project-dir subproject

@dbeatty10 dbeatty10 removed their assignment May 3, 2023
@dbeatty10 dbeatty10 changed the title [CT-2513] [Bug] dbt deps --project-dir $DBT_PROJECT_DIR hangs with dbt=1.5.0 [CT-2513] [Regression] dbt deps --project-dir $DBT_PROJECT_DIR hangs with dbt=1.5.0 May 3, 2023
@dbeatty10
Copy link
Contributor

TLDR

This problem is triggered when both packages.yml and --profiles-dir contain relative paths.

More detail

Some more findings from troubleshooting:

  • Affects both --project-dir and $DBT_PROJECT_DIR
  • Absolute paths work fine for both
  • Only affects relative paths

This works in a zsh shell:

dbt deps --project-dir $(pwd)/subproject

Also, when subproject/packages.yml contains absolute paths, it works regardless if --profiles-dir is relative or not.

@jtcohen6 jtcohen6 added this to the v1.5.x milestone May 3, 2023
@dbeatty10
Copy link
Contributor

@iknox-fa I suspect there is some kind of circular dependency that gets introduced in the scenario outlined above (which maybe introduces an infinite loop 🤷).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants