-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 dbt run
the --profiles-dir
becomes relative to --project-dir
#3133
Comments
@JCZuurmond Nice catch, thanks for opening!
Agreed! I think that it would makes more sense for the For consistency, we could make I'd prefer to find a way to preserve the original working directory. Perhaps by storing and reusing the path value used by Are these code paths you'd be interested in taking a further look down? |
It would be fun to commit to dbt! I had a look at the code to see where this behavior was created, but it was hard for me to follow the code path, though. For example:
Wouldn't an easy solution be to make the |
And could you give any pointers on who we test this? |
I think something more unexpectedly could happen. If you give a I think it is unexpected behavior to not raise an error when there is no Btw, what is the difference between a |
Yes, this feels like a sensible valid approach for
There are extant integration tests for each of
Yeah, I agree, this is confusing and contrary to my expectations. I wonder if this was here explicitly to handle the case where a profile filing is missing in the first pass (before moving to
As I understand it, a It doesn't strike me as a super meaningful distinction, more a vestige of how the codebase has developed. |
Hi @jtcohen6, just want to mention that I am having a go at this. However, it takes some time to get the environment set-up right before I can start running the tests, soooo it is work in progress 🚧 |
@jtcohen6 : Could you maybe help me with the following? If I run
Do you have the same? (If you remove the cached docker file first.) |
Hey @JCZuurmond, I don't encounter that error when I run If you're having trouble getting them to run in Docker, you could try running directly (via If that's proving too difficult, you're also welcome to push changes to a draft PR and (within reason) use CircleCI to run unit and integration tests. |
Hi @jtcohen6, thanks for your response. I was just able to run the tests with the Docker image ✨! The issue was completely on my side. Docker was quite messed up, e.g. the Apparently Apple's Screen Time app was blocking some content 😅, therefore some - not all - Ubuntu registries. After disabling that and struggling some more, I was finally able to run the tests after a reboot of my computer. |
Describe the bug
The
--profiles-dir
flag becomes relative to the--project-dir
flag when runningdbt run
. It does not fordbt debug
.Steps To Reproduce
Let's say we have the
profiles.yml
in the current working directory and our dbt project in a sub-directoryjaffle-shop
. Then the following command runs without a problem (if all is set-up correctly):dbt debug --project-dir jaffle-shop/ --profiles-dir .
However, with
dbt run
this does not work.This is because for
dbt run
the profiles directory argument becomes relative to the project directory. Ergo, the following does work:dbt run --project-dir jaffle-shop/ --profiles-dir .. # works unexpectedly
Expected behavior
The
--profile-dir
flag should behave the same for alldbt
commands.Screenshots and log output
N/A
System information
N/A/
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: