From b449c51a04bafa087eeba928c089df71aebee1b6 Mon Sep 17 00:00:00 2001 From: pankajastro Date: Wed, 4 Dec 2024 01:26:29 +0530 Subject: [PATCH 1/2] Install dbt-adapters Install dbt-adapters Install dbt-adapters Install dbt-adapters Install dbt-adapters Install without version Install without version Install without version cleanup Pin version --- .github/workflows/test.yml | 4 ++-- dev/Dockerfile.postgres_profile_docker_k8s | 5 +++-- scripts/test/kubernetes-setup.sh | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f9dbd2c4..295f285f8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: test on: push: # Run on pushes to the default branch - branches: [main] + branches: [main, enable-kubernetes-test] pull_request_target: # Also run on pull requests originated from forks branches: [main] @@ -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 diff --git a/dev/Dockerfile.postgres_profile_docker_k8s b/dev/Dockerfile.postgres_profile_docker_k8s index ae81a5b9f..a7f55795f 100644 --- a/dev/Dockerfile.postgres_profile_docker_k8s +++ b/dev/Dockerfile.postgres_profile_docker_k8s @@ -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 diff --git a/scripts/test/kubernetes-setup.sh b/scripts/test/kubernetes-setup.sh index b08f37d1d..485bc3382 100644 --- a/scripts/test/kubernetes-setup.sh +++ b/scripts/test/kubernetes-setup.sh @@ -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 \ From f5db6d1d105f951610ab7302217a417da6dfcf70 Mon Sep 17 00:00:00 2001 From: Pankaj Singh <98807258+pankajastro@users.noreply.github.com> Date: Thu, 5 Dec 2024 00:05:31 +0530 Subject: [PATCH 2/2] Update .github/workflows/test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 295f285f8..a80a62d60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: test on: push: # Run on pushes to the default branch - branches: [main, enable-kubernetes-test] + branches: [main] pull_request_target: # Also run on pull requests originated from forks branches: [main]