-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Node selection for @ on dbt test is incomplete #1827
Comments
The repro for this case will be very complicated, but I think the issue is when tests get added in to the final graph.
I'm not sure if we should be excluding the tests whose ancestors aren't in the graph, or doing another pass and adding all the test ancestors in, but one of those choices is the appropriate solution here. |
I think a simple reproduction case should be:
Running:
It's compelling to think that tests should only be run if all of their ancestors are selected in the run, but that will make custom data tests pretty wonky! This is probably the right answer for @tayloramurphy's use case, but probably the wrong answer in the more general case. I do not think that in this case, the selected nodes in So, I think the only other path forward here is to make relationship tests smarter. I think it would be pretty reasonable to special-case schema tests that select from more than one model. We can add functionality to support tests returning with a warning that can be escalated to an error with Curious what y'all think? |
What will be wonky about it? Custom data tests should use |
True, but something about this behavior for custom data tests feels wrong to me. Maybe custom data tests are less of an issue because you can conceivably select them by name/path? Let me think on that some more... it's not quite as jarring as I initially felt it was, but I don't feel great about it still. |
I'm here from the future to say that the
I came here because I've been thinking a lot about:
Particularly with reference to In any case, I'm going to close this issue :) |
@jtcohen6 do you know if this behavior is fixed in 0.18.1 for the |
Describe the bug
Our CI runs
dbt run
followed bydbt test
in a completely clean snowflake warehouse. When using the@
syntax for both, run passes fine, but tests will fail because there are relationship tests on models that aren't built.Steps To Reproduce
In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example model code, etc is all very helpful here.
If you view the graph on https://gitlab-data.gitlab.io/analytics/dbt/snowflake/#!/model/model.gitlab_dw?g_v=1&g_i=@zuora you'll see that the sfdc_executive_business_review model is not built, but on a
dbt test
this relationship test is run https://gitlab.com/gitlab-data/analytics/blob/master/transform%2Fsnowflake-dbt%2Fmodels%2Fsfdc%2Fbase%2Fschema.yml#L66Expected behavior
I would either expect that test to be skipped or the relevant model to be built.
Screenshots and log output
These are the logs for an example failed job with @zuora
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
Mac OS X
The output of
python --version
:3.7.4
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: