Skip to content
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

Disclaimer on state modified behavior change #6357

Merged
merged 10 commits into from
Oct 25, 2024
9 changes: 8 additions & 1 deletion website/docs/reference/global-configs/behavior-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,20 @@

### Source definitions for state:modified

:::note
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

The state directory needs to be built with v1.9 or higher [Versionless](/docs/dbt-versions/versionless-cloud) dbt Cloud along with `state_modified_compare_more_unrendered_values: true` within your dbt_project.yml.

Check warning on line 88 in website/docs/reference/global-configs/behavior-changes.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/docs/reference/global-configs/behavior-changes.md#L88

[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'?
Raw output
{"message": "[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'? ", "location": {"path": "website/docs/reference/global-configs/behavior-changes.md", "range": {"start": {"line": 88, "column": 44}}}, "severity": "WARNING"}
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

If the state directory was built with an older version or if the `state_modified_compare_more_unrendered_values` behavior change flag was not set (or set to '`false`), you need to rebuild it to avoid false positives during state comparison with `state:modified`.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

:::

The flag is `False` by default.

Set `state_modified_compare_more_unrendered_values` to `True` to reduce false positives during `state:modified` checks (especially when configs differ by target environment like `prod` vs. `dev`).

Setting the flag to `True` changes the `state:modified` comparison from using rendered values to unrendered values instead. It accomplishes this by persisting `unrendered_config` during model parsing and `unrendered_database` and `unrendered_schema` configs during source parsing.


### Package override for built-in materialization

Setting the `require_explicit_package_overrides_for_builtin_materializations` flag to `True` prevents this automatic override.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@

To reduce false positives during `state:modified` selection due to env-aware logic, you can set the `state_modified_compare_more_unrendered_values` [behavior flag](/reference/global-configs/behavior-changes#behavior-change-flags) to `True`.

The state directory needs to be built with v1.9 or higher [Versionless](/docs/dbt-versions/versionless-cloud) dbt Cloud along with `state_modified_compare_more_unrendered_values: true` within your dbt_project.yml.

Check warning on line 51 in website/docs/reference/node-selection/state-comparison-caveats.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/docs/reference/node-selection/state-comparison-caveats.md#L51

[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'?
Raw output
{"message": "[custom.Typos] Oops there's a typo -- did you really mean 'v1.9'? ", "location": {"path": "website/docs/reference/node-selection/state-comparison-caveats.md", "range": {"start": {"line": 51, "column": 44}}}, "severity": "WARNING"}

If the state directory was built with an older version or if the `state_modified_compare_more_unrendered_values` behavior change flag was not set (or set to '`false`), you need to rebuild it to avoid false positives during state comparison with `state:modified`.

</VersionBlock>

<VersionBlock lastVersion="1.8">
Expand Down
Loading