-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the feature
In the rare occasion that we change the spec of dbt_project.yml, the errors around this can be pretty confusing. We should consider changing the order of validation to make this nicer.
Example
At the moment if you have:
required-dbt-version: ">0.17.1"
config-version: 2
And your run this with 0.16.1, you get back:
Encountered an error while reading the project:
ERROR: Runtime Error
at path []: Additional properties are not allowed ('config-version' was unexpected)
Encountered an error:
Runtime Error
Could not run dbt
I think it would be a very small, but nice touch, if instead we checked the require-dbt-version first, and then the schema, so this is the error you get:
Running with dbt=0.16.1
Encountered an error while reading the project:
ERROR: Runtime Error
This version of dbt is not supported with the 'acme' package.
Installed version of dbt: =0.16.1
Required version of dbt for 'acme': ['>=0.17.1']
Check the requirements for the 'acme' package, or run dbt again with --no-version-check
Encountered an error:
Runtime Error
Could not run dbt
I feel that the second error is way easier to understand. Obviously not everyone will have a require-dbt-version config, but it’s a nice behavior for those that are doing the right thing 🙂
Describe alternatives you've considered
Doing nothing :)
Additional context
I think the config-version error comes from the initial read of dbt_project.yml, which precedes our ability to check the dbt version. So maybe a little gnarlier to do this than expected.
Who will this benefit?
Anyone working on dbt in a team, that needs to keep dbt versions in sync across many computers