-
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
Relationships tests do not run on 0.20.0 when -m model_name
is used.
#3571
Comments
Hey @jaypeedevlin, thanks for opening the issue—this has caused confusion for a few folks. I'll try to explain the decision behind this change. To start, I'm going to copy from my comment from #3496 (very similar):
I've started using the term "indirect selection" to refer to that "jump." It's a powerful feature, since it means that For that reason,
In the first case, the test is selected indirectly because both of its parents are selected. In the other three cases, the test is selected directly by a graph selection method. There are docs for this updated behavior here, including the distinction between "direct" and "indirect" selection: https://docs.getdbt.com/reference/node-selection/test-selection-examples One last piece of context from #3496 (comment):
I'm going to close this issue for the time being, but I'm curious to hear: Does this make sense to you? Do those docs help in clarifying the behavior? |
Hi Jeremy, Thanks as always for the detailed response, and apologies for not checking either the release notes or closed 0.20.0rc issues before opening this one. Turns out this is one of those "feature not a bug" in the wild 😜 I can see the value in this change, particularly where Slim CI runs are concerned. My initial concern on reading it was that it will make individual model development a pain, where you often want to run all tests, but knowing that |
thanks @jtcohen6 that was really helpful! |
Describe the bug
After upgrading to 0.20.0, relationships test don't run when specific models are selected— they act as if they don't exist.
dbt ls --resource-type tests | grep relationships_
shows the testsdbt test
runs all the test including the relationshipsdbt test -m model_with_relationship_tests
runs all tests except relationshipsI've reproduced this in three different projects inclduing a minimal jaffle_shop project. In both cases, downgrading to 0.19.1 had the tests run fine.
Steps To Reproduce
dbt test -m model_name
Expected behavior
All tests to run, including relationships test
Screenshots and log output
System information
Which database are you using dbt with? (tested on more than one)
The output of
dbt --version
:The operating system you're using: Mac
The output of
python --version
: 3.8.10The text was updated successfully, but these errors were encountered: