dbt-labs / dbt-labs/dbt

[CT-3063] [Feature] state:modified doesn't detect changes to macros passed as variables

Open
#8,526 1 comment 0 reactions 0 assignees View on GitHub
engine:v1 state: modified type:feature
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### Is this a new bug in dbt-core?

- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug

### Current Behavior

```
# this is a model
{%- set configs = [
config_macro,
] -%}
{{- caller_macro(configs) -}}
```
_config_macro_ is passed as variable to be called by downstream macro

if _config_macro_ is changed, the state change is not detected by _state:modified_

if _caller_macro_ 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

```markdown
- OS: 13.5 (22G74)
- Python: 3.10.12
- dbt: 1.6.1
```

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.