Skip to content

[Bug] static_analysis: off interpreted as false #12015

@jtcohen6

Description

@jtcohen6

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: off

Can you spot the difference?

  • The first one will serialize to manifest.json with "static_analysis": "off"
  • The second one will serialize to manifest.json with "static_analysis": false

Why? Because yaml interprets off as falsy:

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 id
models:
  - name: my_model
    config:
      static_analysis: off

dbt 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.11

Which 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions