-
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
Feature/defer tests #2706
Feature/defer tests #2706
Conversation
0bea57a
to
4d854cc
Compare
4d854cc
to
280803c
Compare
This works! However, I'm noticing that the model references being tested are always deferred. We need the ability to defer only some of the model references. For instance:
I would expect this to execute my test against the production (deferred) version of
Since I realize #2701 wasn't clear about this and I updated/clarified there. I also get that In any case, we just need some way for the following:
Does that make sense? Is it possible? |
Yeah. This is just how test selection works: Your selector indicates the nodes whose tests should be run, not the nodes that should be actually selected. Previously I suggested making The actual process for the test selector goes like:
So I guess this is more of a "sort of" than a "yeah". |
Ok! It sounds like this is going to be trickier than I initially appreciated. Let's say I have a project with
Then
When I:
I will create When it comes time to test, I can either defer:
This will defer all model references to the production run manifest. The test on Or not defer:
This will fail because it includes the new test N.B. Deferral works seamlessly if I think there are two potential approaches here:
Is such a selection syntax possible today? A good answer here would get us what we need, without needing to make test deferral much more complex. (It still wouldn't solve for Otherwise, I think we should hold off on adding support for |
resolves #2701
Description
Support deferred tests.
I also prevented --defer from doing anything on snapshots/seeds more explicitly. I think the CLI argument will default to not being set regardless of the environment variable, but it's even easier to be sure if we just disable that code path entirely for snapshots and seeds.
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.