Skip to content

Commit

Permalink
Enable kubernetes tests for dbt>=1.8 (#1364)
Browse files Browse the repository at this point in the history
closes: #1344

This PR is doing below modification

- Upgrade Python version to Python3.12
- Add `--force-reinstall` flag in pip install command 
- Install dbt-command separately based on suggestion:
dbt-labs/dbt-core#10135 (comment)

Success CI job:
https://github.com/astronomer/astronomer-cosmos/actions/runs/12165978965/job/33931200107?pr=1364
  • Loading branch information
pankajastro authored Dec 6, 2024
1 parent cfb6bf2 commit 3ff70d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11" ]
python-version: [ "3.12" ]
airflow-version: [ "2.10" ]
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 3 additions & 2 deletions dev/Dockerfile.postgres_profile_docker_k8s
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM python:3.11
FROM python:3.12

RUN pip install dbt-postgres==1.8.2 psycopg2==2.9.3 pytz
RUN pip install --force-reinstall 'dbt-postgres>=1.8'
RUN pip install --force-reinstall dbt-adapters

ENV POSTGRES_DATABASE=postgres
ENV POSTGRES_DB=postgres
Expand Down
4 changes: 2 additions & 2 deletions scripts/test/kubernetes-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
set -x
set -e

# TODO: https://github.com/astronomer/astronomer-cosmos/issues/1344
pip install 'dbt-postgres<1.8' 'psycopg2==2.9.3' 'pytz'
pip install --force-reinstall 'dbt-postgres>=1.8'
pip install --force-reinstall dbt-adapters

# Create a Kubernetes secret named 'postgres-secrets' with the specified literals for host and password
kubectl create secret generic postgres-secrets \
Expand Down

0 comments on commit 3ff70d8

Please sign in to comment.