Repository hygiene · rule dbt-no-require-version
dbt_project.yml with no require-dbt-version
A Metacenta review checks this under the rule The project declares which dbt version it needs. Everything below applies whether or not you ever commission one.
What this rule checks
This rule flags a dbt_project.yml with no top-level require-dbt-version key. Any value passes, whether one version or a range. A repository with no dbt_project.yml is not judged.
Why it matters
Nothing stops the project being built by a dbt version it was never tested against. A minor upgrade can change materialisation or macro behaviour with no error to mark the moment.
How to fix it
Declare the dbt version the project needs. Add a require-dbt-version range matching what CI and the team run, and widen it when you upgrade.
Before:
name: analytics
version: "1.0.0"
profile: analytics
After:
name: analytics
version: "1.0.0"
profile: analytics
require-dbt-version: [">=1.8.0", "<1.11.0"]
When it is fine to leave
A project whose dbt version is fixed elsewhere, such as in a locked Python environment or a container image, is protected in practice. The key still tells a reader which versions were tested, for one line of YAML.
What we need to check it
dbt_project.yml, fetched by name from the repository with read-only access. If it could not be fetched or read, we decline rather than report.