Skip to content

Commit

Permalink
Remove dbt-postgres and dbt-tests-adapter from dbt-core (dbt-labs#9492)
Browse files Browse the repository at this point in the history
* delete dbt-tests-adapter and dbt-postgres from dbt-core

* update non-code files to reflect change

* add changie

* update build-dist.sh

* update tox.ini

* fix build-dist.sh

* move adapter tests into /functional dir

* remove adapter unit tests

* update code comments and README.md
  • Loading branch information
colin-rogers-dbt authored Feb 5, 2024
1 parent 7885e87 commit 15dcb9a
Show file tree
Hide file tree
Showing 249 changed files with 133 additions and 4,176 deletions.
8 changes: 0 additions & 8 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,4 @@ first_value = 1

[bumpversion:file:core/dbt/version.py]

[bumpversion:file:plugins/postgres/setup.py]

[bumpversion:file:plugins/postgres/dbt/adapters/postgres/__version__.py]

[bumpversion:file:docker/Dockerfile]

[bumpversion:file:tests/adapter/setup.py]

[bumpversion:file:tests/adapter/dbt/tests/adapter/__version__.py]
2 changes: 1 addition & 1 deletion .changes/header.tpl.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dbt Core Changelog

- This file provides a full account of all changes to `dbt-core` and `dbt-postgres`
- This file provides a full account of all changes to `dbt-core`
- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases.
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry)
6 changes: 6 additions & 0 deletions .changes/unreleased/Breaking Changes-20240130-140550.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Breaking Changes
body: Remove dbt-tests-adapter and dbt-postgres packages from dbt-core
time: 2024-01-30T14:05:50.291291-08:00
custom:
Author: colin-rogers-dbt
Issue: "9455"
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ updates:
schedule:
interval: "daily"
rebase-strategy: "disabled"
- package-ecosystem: "pip"
directory: "/plugins/postgres"
schedule:
interval: "daily"
rebase-strategy: "disabled"

# docker dependencies
- package-ecosystem: "docker"
Expand Down
3 changes: 2 additions & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ This is the docs website code. It comes from the dbt-docs repository, and is gen

## Adapters

dbt uses an adapter-plugin pattern to extend support to different databases, warehouses, query engines, etc. For testing and development purposes, the dbt-postgres plugin lives alongside the dbt-core codebase, in the [`plugins`](plugins) subdirectory. Like other adapter plugins, it is a self-contained codebase and package that builds on top of dbt-core.
dbt uses an adapter-plugin pattern to extend support to different databases, warehouses, query engines, etc.
Note: dbt-postgres used to exist in dbt-core but is now in [its own repo](https://github.com/dbt-labs/dbt-postgres)

Each adapter is a mix of python, Jinja2, and SQL. The adapter code also makes heavy use of Jinja2 to wrap modular chunks of SQL functionality, define default implementations, and allow plugins to override it.

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dbt Core Changelog

- This file provides a full account of all changes to `dbt-core` and `dbt-postgres`
- This file provides a full account of all changes to `dbt-core`
- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases.
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you get stuck, we're happy to help! Drop us a line in the `#dbt-core-developm

### Notes

- **Adapters:** Is your issue or proposed code change related to a specific [database adapter](https://docs.getdbt.com/docs/available-adapters)? If so, please open issues, PRs, and discussions in that adapter's repository instead. The sole exception is Postgres; the `dbt-postgres` plugin lives in this repository (`dbt-core`).
- **Adapters:** Is your issue or proposed code change related to a specific [database adapter](https://docs.getdbt.com/docs/available-adapters)? If so, please open issues, PRs, and discussions in that adapter's repository instead.
- **CLA:** Please note that anyone contributing code to `dbt-core` must sign the [Contributor License Agreement](https://docs.getdbt.com/docs/contributor-license-agreements). If you are unable to sign the CLA, the `dbt-core` maintainers will unfortunately be unable to merge any of your Pull Requests. We welcome you to participate in discussions, open issues, and comment on existing ones.
- **Branches:** All pull requests from community contributors should target the `main` branch (default). If the change is needed as a patch for a minor version of dbt that has already been released (or is already a release candidate), a maintainer will backport the changes in your PR to the relevant "latest" release branch (`1.0.latest`, `1.1.latest`, ...). If an issue fix applies to a release branch, that fix should be first committed to the development branch and then to the release branch (rarely release-branch fixes may not apply to `main`).
- **Releases**: Before releasing a new minor version of Core, we prepare a series of alphas and release candidates to allow users (especially employees of dbt Labs!) to test the new version in live environments. This is an important quality assurance step, as it exposes the new code to a wide variety of complicated deployments and can surface bugs before official release. Releases are accessible via pip, homebrew, and dbt Cloud.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ test: .env ## Runs unit tests with py and code checks against staged changes.
$(DOCKER_CMD) pre-commit run mypy-check --hook-stage manual | grep -v "INFO"

.PHONY: integration
integration: .env ## Runs postgres integration tests with py-integration
integration: .env ## Runs core integration tests using postgres with py-integration
@\
$(CI_FLAGS) $(DOCKER_CMD) tox -e py-integration -- -nauto

.PHONY: integration-fail-fast
integration-fail-fast: .env ## Runs postgres integration tests with py-integration in "fail fast" mode.
integration-fail-fast: .env ## Runs core integration tests using postgres with py-integration in "fail fast" mode.
@\
$(DOCKER_CMD) tox -e py-integration -- -x -nauto

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion core/dbt/tests/fixtures/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def logs_dir(request, prefix):


# This fixture is for customizing tests that need overrides in adapter
# repos. Example in dbt.tests.adapter.basic.test_base.
# repos. Example in tests.functional.adapter.basic.test_base.
@pytest.fixture(scope="class")
def test_config():
return {}
Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
git+https://github.com/dbt-labs/dbt-adapters.git@main
git+https://github.com/dbt-labs/dbt-postgres.git@main
black==23.3.0
bumpversion
ddtrace==2.1.7
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ ARG build_for=linux/amd64
FROM --platform=$build_for python:3.10.7-slim-bullseye as base

# N.B. The refs updated automagically every release via bumpversion
# N.B. dbt-postgres is currently found in the core codebase so a value of dbt-core@<some_version> is correct

ARG [email protected]
ARG dbt_postgres_ref=dbt-core@v1.8.0a1
ARG dbt_postgres_ref=dbt-postgres@v1.8.0a1
ARG [email protected]
ARG [email protected]
ARG [email protected]
Expand Down
1 change: 0 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ docker build --tag my-third-party-dbt \
There are a few special cases worth noting:
* The `dbt-spark` database adapter comes in three different versions named `PyHive`, `ODBC`, and the default `all`. If you wish to overide this you can use the `--build-arg` flag with the value of `dbt_spark_version=<version_name>`. See the [docs](https://docs.getdbt.com/reference/warehouse-profiles/spark-profile) for more information.

* The `dbt-postgres` database adapter is released as part of the `dbt-core` codebase. If you wish to overide the version used, make sure you use the gitref for `dbt-core`:
```
docker build --tag my_dbt \
--target dbt-postgres \
Expand Down
2 changes: 0 additions & 2 deletions editable-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
-e ./core
-e ./plugins/postgres
-e ./tests/adapter
1 change: 0 additions & 1 deletion plugins/postgres/MANIFEST.in

This file was deleted.

36 changes: 0 additions & 36 deletions plugins/postgres/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions plugins/postgres/dbt/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions plugins/postgres/dbt/adapters/__init__.py

This file was deleted.

13 changes: 0 additions & 13 deletions plugins/postgres/dbt/adapters/postgres/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion plugins/postgres/dbt/adapters/postgres/__version__.py

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/postgres/dbt/adapters/postgres/column.py

This file was deleted.

Loading

0 comments on commit 15dcb9a

Please sign in to comment.