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

With --project-dir set, dbt_modules is not honored #2519

Closed
beckjake opened this issue Jun 9, 2020 · 2 comments
Closed

With --project-dir set, dbt_modules is not honored #2519

beckjake opened this issue Jun 9, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@beckjake
Copy link
Contributor

beckjake commented Jun 9, 2020

Describe the bug

If you use the --project-dir flag, dbt does not look for dependencies in the correct place. The packages.yml/dbt_project.yml/etc is all loaded correctly, but the search for dependencies doesn't appear to honor the project directory.

I assume it's looking in ./dbt_modules instead of ${project_dir}/dbt_modules, though I haven't looked into it too deeply.

Steps To Reproduce

  • Create a dbt project that uses a dependency. dbt_utils is nice.
  • Run dbt deps
  • Try to dbt compile your project from a different directory, using --project-dir.

Expected behavior

Things should work!

Screenshots and log output

Encountered an error:
Runtime Error
  Compilation Error in model blah (models/blah.sql)
    'dbt_utils' is undefined

System information

Which database are you using dbt with?
Any DB

The output of dbt --version:

0.17.0

The operating system you're using:
Any OS

The output of python --version:
Any Python

Additional context

We have a test for this in the CLI invocation tests, it just doesn't actually use any dependencies so it doesn't hit this error!

@beckjake beckjake added bug Something isn't working triage labels Jun 9, 2020
@drewbanin drewbanin removed the triage label Jun 9, 2020
@drewbanin drewbanin added this to the 0.17.1 milestone Jun 9, 2020
@drewbanin
Copy link
Contributor

This appears to be a regression - let's fix this for 0.17.1 (and make sure to add tests)

@beckjake
Copy link
Contributor Author

Fixed in #2534

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

No branches or pull requests

2 participants