Decoupling dbt Adapters from dbt Core versions #9171
Replies: 4 comments 7 replies
-
what happens to the following things that currently live in Core?
|
Beta Was this translation helpful? Give feedback.
-
what effect (if any) will there be on adapters that inherit from other adapters? like dbt-redshift, dbt-databricks, and dbt-synapse |
Beta Was this translation helpful? Give feedback.
-
Hi all, what is the anticipated date for |
Beta Was this translation helpful? Give feedback.
-
Update: We've started to release initial alphas of dbt-adapters: https://pypi.org/project/dbt-adapters/ and have opened a discussion in the new repo with a migration guide: dbt-labs/dbt-adapters#87 |
Beta Was this translation helpful? Give feedback.
-
TL;DR
what’s this about
We’re already underway on an initiative to further decouple adapters from dbt Core. The goals of the work are to do the following:
how you can help
This discussion serves to both inform and collect feedback.
Background
(@dataders)
Let’s unpack the “Adapters & Artifacts” section of @jtcohen6 & @graciegoheen's November 2023 roadmap update:
The Problem
The Solution:
dbt-adapter==1.0.0
To make this happen, we will introduce a new Python package published to PyPI,
dbt-adapter
, upon which both dbt-core and adapters depend. The ‘adapter protocol’ must be stable, and versioned separately, so that we can ensure backward/forward compatibility for new versions of dbt-core and adapters.This will decouple adapter maintainers from the regular release cadence of dbt-core. Adapter maintainers can also start implementation work on adapter protocol additions, as soon as the protocol has been updated and released. These changes are opt-in, and a not a prerequisite for ongoing backwards-compatibility.
Impact
For end users
pip install dbt-postgres
pip install dbt-core dbt-redshift
(more below)But how does a user know they are installing the right version of dbt-core?
Thankfully both dbt-core and adapter implementations will have to declare their dependency on dbt-adapter and dbt-common so pip will be able to resolve to a correct version of both or throw an error that they have requested incompatible versions
For external adapter maintainers
Impact to integration testing
In the short term while the source implementations of adapters will no longer require a pinned dependency to a minor version of dbt-core, integration tests will still require an explicit dependency on dbt-core in order to test the combination of the dbt CLI installed and executed with particular adapter. More guidance/detail for adapter maintainers will be forthcoming on if/how testing will be impacted.
In the medium to long term we will be investigating ways to test adapters without relying on dbt-core along with new, easier to use, testing tools.
Timelines & Migration Plan
(@MichelleArk, @colin-rogers-dbt)
decouple & lift adapter protocol out of dbt-core
This work has us untangling some gnarly, deeply-baked technical debt from cyclic dependencies to shared global state across components that should ideally be independent. If that’s your thing and you’d like to follow along, we’re tracking that work in this epic!
Once the refactoring is completed in-place, we will begin lifting the adapter-specific and common components into new repositories/packages, setting up their releases, and documentation.
dbt-adapter 1.0 release, migration guides & tooling
Slated for January 2024, This will give adapter maintainers several months to migrate before the next minor release of dbt-core (1.8, in April 2024), which will require adapters to be compatible with dbt-adapter>=1.0.
The migration itself will require adapter implementations to replace their dependency on
dbt-core==1.*
todbt-adapter>=1.0
and (potentially, depending on their usage)dbt-common>=1.0
. Any import path changes will need to be worked through, meaning nature of this migration will largely be find-and-replace of renamed import paths. For an example, check out the dbt-bigquery migration draftWe’ll also be providing a migration script to track progress and automate the trivial, but tedious parts of this migration.
dbt-core 1.8 release
This will be the first dbt-core release that will require a migration to
dbt-adapter>=1.0.0
for compatibility. This is because this version of dbt-core will not include any of the base adapter interfaces or interfaces that dbt-* adapters have historically depended on.dbt-core 1.8+ releases
These will require no changes from adapter maintainers to ensure forward and backward compatibility between. Any new features that require adapter changes may not be supported, but this will be handled gracefully and existing interfaces will not
dbt-adapter 1.0+ releases
dbt-adapter can release minor versions completely independently from dbt-core. In this world we can start to improve adapter maintainer quality of life and address long-known pain points such as:
What changes would you like to see? Comment below!
Beta Was this translation helpful? Give feedback.
All reactions