[Bug] Selectors in selectors.yml
do not default to --indirect-selection
or DBT_INDIRECT_SELECTION
#7673
Closed
2 tasks done
Labels
Is this a new bug in dbt-core?
Current Behavior
When a YAML selector definition does not include
indirect_selection
, then neither the--indirect-selection
CLI argument nor theDBT_INDIRECT_SELECTION
environment variable have any effect.Instead, these YAML selectors always default to
eager
, no matter what.Expected Behavior
This says:
And this says:
Both of those imply that the intent was that selectors would use
get_flags().INDIRECT_SELECTION
orflags.INDIRECT_SELECTION
whenindirect_selection
is not defined within a selector inselectors.yml
.Steps To Reproduce
Reprex
Project contents
models/_models.yml
models/model_a.sql
models/model_b.sql
models/model_c.sql
selectors.yml
Try it
Compare the output of these commands:
with the output of these:
Expectations
Eager:
Buildable:
Cautious:
Diagram
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
I tried a sampling of versions between dbt v1.0 and v1.5 and none of them took the
--indirect-selection
CLI argument into account for selectors.I didn't include the
empty
mode for indirect selection in the reprex because I already had a diagram without it, and it doesn't affect explaining the bug report one way or the other.buildable
isn't a relevant option prior to v1.4 and could have been left out as well, but it was already in the diagram so it gets to come along for the ride 😃The text was updated successfully, but these errors were encountered: