Node selection for @ on dbt test is incomplete
See original GitHub issueDescribe the bug
Our CI runs dbt run
followed by dbt 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#L66
Expected 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?
- snowflake
The output of dbt --version
:
Running with dbt=0.14.2
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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
@ags2121 That behavior is not fixed. I saw your comment over on #2132, I agree that we should open a new issue to discuss.
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.