-
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
Fix issues with inline nodes and selectors #10264
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10264 +/- ##
==========================================
- Coverage 88.72% 88.67% -0.05%
==========================================
Files 180 180
Lines 22463 22482 +19
==========================================
+ Hits 19931 19937 +6
- Misses 2532 2545 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -104,6 +104,12 @@ def _runtime_initialize(self): | |||
) | |||
sql_node = block_parser.parse_remote(self.args.inline, "inline_query") | |||
process_node(self.config, self.manifest, sql_node) | |||
# Special hack to remove disabled, if it's there. This would only happen | |||
# if all models are disabled in dbt_project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if all models are disabled, we effectively re-enable all of them? I think I'm missing something here as to why this would be safe to do, and how we know at this point that all models have been disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way that an inline node would be disabled is if somebody has all models to enabled: false (like in the test case) because there's no place else for enabled: false to come from. This just enables and moves the temporary inline node that was just created. It doesn't affect anything else in the manifest.
resolves #8943
resolves #9269
Problem
The inline node wasn't executing because of interactions with selection mechanisms.
Solution
We shouldn't use selectors at all when inline nodes are running. Add code in "get_selector" to make an exception for inline nodes. Add error message for using --select or --selector with --inline. Add hack to move inline node out of disabled if someone has disabled all model nodes in their project.
Checklist