dbt-labs / dbt-athena

The athena adapter plugin for dbt (https://getdbt.com)
https://dbt-athena.github.io
Apache License 2.0
228 stars 100 forks source link

Update release workflow #732

Closed mikealfare closed 1 month ago

mikealfare commented 1 month ago

Description

This PR does multiple things that are all closely related:

Migrate to hatch

Take the existing dbt-athena-community package and rename it dbt-athena.

Create dbt-athena-community shell package

Create a new dbt-athena-community package that is a simple wrapper around dbt-athena to preserve backwards compatibility.

Update release

Standardize workflows

Update docs

Checklist

mikealfare commented 1 month ago

The skipped/failing functional-tests checks are the workflows from main. These don't work with the new setup since files moved and tests are invoked differently now. The same tests are run via Pull request checks / integration-tests / integration-tests (pull_request).

I triggered the Publish workflow via the GH CLI with parameters for test PyPI and this branch:

gh workflow run publish.yml \
  --ref actions/public-pypi-deploy \
  -f deploy-to=test \
  -f branch=actions/public-pypi-deploy

Workflow run: https://github.com/dbt-labs/dbt-athena/actions/runs/11300329526 PyPI dbt-athena: https://test.pypi.org/project/dbt-athena/1.8.5rc1/ PyPI dbt-athena-community: https://test.pypi.org/project/dbt-athena-community/1.8.5rc1/

I can verify that installing dbt-athena-community gives me dbt-athena:

# create a virtual environment with only pip and setuptools installed
python -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools
pip list

Package    Version
---------- -------
pip        24.2
setuptools 75.1.0

# install dbt-athena-community from test PyPI to get the version in this PR
pip install dbt-athena-community==1.8.5rc1 \
  --index https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/

# we get both dbt-athena-community and dbt-athena
pip list | grep dbt-athena

dbt-athena                1.8.5rc1
dbt-athena-community      1.8.5rc1

Since dbt-athena-community used the namespace athena and not athena-community, everything should continue to work the same. The only difference in the packages is an extra, empty athena-community package inside dbt/adapters in the dbt-athena-community package.