Open juls858 opened 1 year ago
Thanks for reaching out and providing the link to the relevant code in the "Additional Context" section @juls858 !
See below for a reproducible example ("reprex") of the thing you are reporting.
Basically, it looks like the dbt parser can recognize macros that are called, but not those that are set & passed as variables. Because the parsing phase doesn't assert that model_1
depends_on
calver
, then it isn't included as part of the state:modified
selector. See depends_on
assignments below for a comparison.
Without having confirmed, I'm assuming that parsing un-called macros was intentionally out of scope, so I'm going to recategorize this as as feature request.
Is this a new bug in dbt-core?
Current Behavior
_configmacro is passed as variable to be called by downstream macro
if _configmacro is changed, the state change is not detected by state:modified
if _callermacro is changed, the state IS detected by state:modified
Expected Behavior
state:modified should detect changes to all upstream macros.
Steps To Reproduce
dbt ls --select state:modified
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
https://github.com/FlipsideCrypto/livequery-models/blob/f15f5fc17535f295c772ff7b4af5725da23a659a/models/deploy/marketplace/quicknode/quicknode_utils__quicknode_utils.sql