-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Is this a new bug in dbt-core?
- I believe this is a new bug in dbt-core
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
Fusion has a new configuration named static_analysis: https://docs.getdbt.com/docs/fusion/new-concepts#configuring-static_analysis
This is an Enum value in Fusion, with potential values on | off | unsafe
dbt Core respects this as a top-level configuration, but it doesn't do any more detailed type validation.
There is therefore a distinction between:
models:
- name: my_model
config:
static_analysis: 'off'and:
models:
- name: my_model
config:
static_analysis: offCan you spot the difference?
- The first one will serialize to
manifest.jsonwith"static_analysis": "off" - The second one will serialize to
manifest.jsonwith"static_analysis": false
Why? Because yaml interprets off as falsy:
- https://stackoverflow.com/questions/42283732/are-on-and-off-supposed-to-be-interpreted-as-true-or-false-in-yaml-1-2
- https://yaml.org/type/bool.html
This leads to an error if/when Fusion tries to deserialize a manifest.json (v12) produced by dbt Core, as for deferral / state:modified -
error: dbt1013: YAML error: invalid type: boolean `false`, expected a Value::Tagged enum
--> state/manifest.json
Finished 'compile' with 1 error in 3s 274ms
Expected Behavior
dbt Core serializes static_analysis to manifest.json as a string, not a boolean
Steps To Reproduce
-- models/my_model.sql
select 1 as idmodels:
- name: my_model
config:
static_analysis: offdbt parse → examine manifest.json, or:
% dbt ls -s my_model --output json --output-keys config -q | jq .config.static_analysis
false
Relevant log output
Environment
- OS: macOS 15.6.1
- Python: 3.9.6
- dbt: 1.10.11Which database adapter are you using with dbt?
No response
Additional Context
Users can switch static_analysis: off to static_analysis: 'off' to work around this issue in the meantime