-
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
Support deferred tests #2701
Labels
Milestone
Comments
5 tasks
4 tasks
jtcohen6
removed
more_information_needed
wontfix
Not a bug or out of scope for dbt-core
labels
Dec 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the feature
In general: It may be desirable to test changes to a test without needing to first run the models it selects from:
The resources that
my_new_test
depend on are not selected, and as such, references to those resources will be deferred to the supplied manifest's namespace.For "Slim CI": In order to execute new tests that reference old unchanged models, we'll need to be able to:
If a model has been modified, this should run tests against the new model. If a test is new/modified, but the model it selects from is not, this should run tests against the deferred model.
This is intuitively tricky for
relationships
tests or data tests which depend on multiple models. If one model is included in the node selection criteria, and another model is not included, the test should defer only the latter's reference.The only open question for me is: What should full test do?
Are all model nodes selected here?
If so, this is identical to
dbt test
. The question is, how would you write "run all my tests and defer all their references"? Excluding models in this syntax would also exclude their dependent tests.If not, all references should be deferred. This feels like the right approach, but it's different from the
dbt run
analogue.dbt run --defer --state path/to/artifacts
has identical behavior todbt run
(no deferral).dbt run
selects all models and so defers nothing, whereasdbt test
selects all tests but no models and so defers everything.Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: