[Feature] make `flags:` list strict
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Describe the feature
Today, dbt accepts anything and everything in project level `flags:`. We're just checking for raw yaml https://github.com/dbt-labs/fs/blob/d4190527bdc08f77aa2f2bd30fc7cacff2b0b21f/fs/sa/crates/dbt-schemas/src/schemas/project/dbt_project.rs#L167
If I set a custom flag:
```
flags:
grace: is_cool
```
dbt continues with no warning or error.
This makes it unclear what's "official" dbt-code vs. "my custom thing".
If we wanted to introduce a new dbt flag, we'd risk conflicting with an existing custom flag someone had set in their project.
We should instead make `flags:` a strict list, and warn or error if you set something that dbt doesn't recognize.
We may need to roll this out behind a behavior change flag to avoid breaking folks using custom flags today - start emitting warnings, promote them to errors when behavior change flag is set to `true`.
Contributor guide
Assessment
This issue has not been assessed yet.