dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.93k stars 1.63k forks source link

[Bug] `dbt -v` doesn't know that adapters are decoupled from core #10230

Open joellabes opened 5 months ago

joellabes commented 5 months ago

Is this a new bug in dbt-core?

Current Behavior

I installed dbt-core from the main branch, and ran dbt -v.

I got this output:

(dbt-dev) joel@Joel-Labes dbt-audit-helper % dbt -v
Core:
  - installed: 1.9.0-a1
  - latest:    1.8.1    - Ahead of latest version!

Plugins:
  - snowflake: 1.8.2   - Not compatible!
  - postgres:  1.9.0a1 - Ahead of latest version!

  At least one plugin is out of date or incompatible with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Expected Behavior

As of 1.8, the fact that the Snowflake adapter has a different minor version isn't a problem. dbt run etc works fine, it's just the warnings that are coming from the version checking code.

Steps To Reproduce

Install a version of dbt calling itself 1.9 alongside a 1.8 vintage of an adapter run dbt -v

Relevant log output

No response

Environment

- OS: 
- Python:
- dbt: 1.9.0-a1

Which database adapter are you using with dbt?

No response

Additional Context

No response

dbeatty10 commented 5 months ago

Thanks for reporting this @joellabes 👍

Acceptance criteria

  1. If dbt-core is >= 1.8.0 and the adapter version is >= 1.8.0, then the output should not include "Not compatible!"
  2. If dbt-core is >= 1.8.0 and the adapter version is < 1.8.0, then the output should include "Not compatible!"
  3. If dbt-core is < 1.8.0 and the adapter version is not the same minor version, then the output should include "Not compatible!"
$ dbt --version

Core:
  - installed: 1.9.0
  - latest:    1.9.1

Plugins:
  - snowflake: 1.8.2
dataders commented 3 months ago

Just experienced the same thing

This is due to the plugin.minor != core.minor comparison: https://github.com/dbt-labs/dbt-core/blob/014444dc18dd18ab75b81ad62530256ec09df22a/core/dbt/version.py#L130-L133

ChenyuLInx commented 2 months ago

Talked during estimation, we could just not report incompatible in this case.