From b5cd4fab8ea80731294fddb76804723f94a4c6c3 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 16:35:52 +0100 Subject: [PATCH 01/16] Fix broken CI test Installing openlineage-airflow was leading to AF3 to be installed instead of AF2.8 when running ```bash hatch run tests.py3.11-2.8-1.9:test-integration-setup ``` --- scripts/test/integration-setup.sh | 8 +++++--- scripts/test/integration.sh | 1 + scripts/test/pre-install-airflow.sh | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/test/integration-setup.sh b/scripts/test/integration-setup.sh index 41d655db6a..0c1c453e2f 100644 --- a/scripts/test/integration-setup.sh +++ b/scripts/test/integration-setup.sh @@ -10,10 +10,14 @@ NEXT_MINOR_VERSION=$(echo "$DBT_VERSION" | awk -F. '{print $1"."$2+1}') # we install using the following workaround to overcome installation conflicts, such as: # apache-airflow 2.3.0 and dbt-core [0.13.0 - 1.5.2] and jinja2>=3.0.0 because these package versions have conflicting dependencies pip uninstall -y 'dbt-bigquery' 'dbt-databricks' 'dbt-duckdb' 'dbt-postgres' 'dbt-vertica' 'dbt-core' -rm -rf airflow.* + +rm $AIRFLOW_HOME/airflow.cfg +rm $AIRFLOW_HOME/airflow.db + pip freeze | grep airflow airflow db reset -y + AIRFLOW_VERSION=$(airflow version) AIRFLOW_MAJOR_VERSION=$(echo "$AIRFLOW_VERSION" | cut -d. -f1) if [ "$AIRFLOW_MAJOR_VERSION" -ge 3 ]; then @@ -27,8 +31,6 @@ fi uv pip install -U "dbt-core==$DBT_VERSION" dbt-postgres dbt-bigquery dbt-vertica 'dbt-databricks' pyspark -pip install -U openlineage-airflow - if python3 -c "import sys; print(sys.version_info >= (3, 9))" | grep -q 'True'; then pip install 'dbt-duckdb' 'airflow-provider-duckdb>=0.2.0' fi diff --git a/scripts/test/integration.sh b/scripts/test/integration.sh index 81dc1b8b99..b00cf9631a 100644 --- a/scripts/test/integration.sh +++ b/scripts/test/integration.sh @@ -14,6 +14,7 @@ airflow db check rm -rf dbt/jaffle_shop/dbt_packages; pytest -vv \ + tests/test_example_dags_no_connections.py \ --cov=cosmos \ --cov-report=term-missing \ --cov-report=xml \ diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index dbe0e6effb..0f604c8f93 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -43,12 +43,14 @@ if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFL uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-microsoft-azure" "apache-airflow==$AIRFLOW_VERSION" uv pip install pyopenssl --upgrade + pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" elif [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt uv pip install "pydantic<2.0" + pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -84,8 +86,10 @@ else uv pip install "apache-airflow-providers-microsoft-azure" --constraint /tmp/constraint.txt fi + rm /tmp/constraint.txt +uv pip freeze actual_version=$(airflow version | cut -d. -f1,2) if [ "$actual_version" = $AIRFLOW_VERSION ]; then From 4f43efd6051ef8c86478456d52d0f0dfe85ddf9e Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:20:39 +0100 Subject: [PATCH 02/16] Install apache-airflow-providers-openlineage apache-airflow>2.7 --- scripts/test/pre-install-airflow.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index 0f604c8f93..184b37ee67 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -37,7 +37,8 @@ uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docke # Due to issue https://github.com/fsspec/gcsfs/issues/664 uv pip install "gcsfs<2025.3.0" -if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFLOW_VERSION" = "2.6" ] ; then + +if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] ; then uv pip install "apache-airflow-providers-amazon" "apache-airflow==$AIRFLOW_VERSION" "urllib3<2" uv pip install "apache-airflow-providers-cncf-kubernetes" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" @@ -56,6 +57,7 @@ elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google>10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -67,6 +69,7 @@ elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then # apache-airflow-providers-microsoft-azure==8.5.0. Hence, we are using apache-airflow-providers-microsoft-azure>=8.5.0 # and skipping installation with constraints, as the specified version does not meet our requirements. uv pip install "apache-airflow-providers-microsoft-azure>=8.5.0" "apache-airflow==$AIRFLOW_VERSION" + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -79,11 +82,13 @@ elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then # we are using apache-airflow-providers-google>=10.17.0 and skipping constraints installation, as the specified # version does not meet our requirements. uv pip install "apache-airflow-providers-google>=10.17.0" "apache-airflow==$AIRFLOW_VERSION" + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" else uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-microsoft-azure" --constraint /tmp/constraint.txt + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" fi From 91ce356953e759633c0fbe93b9fc490f99c18744 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:24:21 +0100 Subject: [PATCH 03/16] Do not fail if airflow.db and airflow.cfg do not exist --- scripts/test/integration-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test/integration-setup.sh b/scripts/test/integration-setup.sh index 0c1c453e2f..96aeae2663 100644 --- a/scripts/test/integration-setup.sh +++ b/scripts/test/integration-setup.sh @@ -11,8 +11,8 @@ NEXT_MINOR_VERSION=$(echo "$DBT_VERSION" | awk -F. '{print $1"."$2+1}') # apache-airflow 2.3.0 and dbt-core [0.13.0 - 1.5.2] and jinja2>=3.0.0 because these package versions have conflicting dependencies pip uninstall -y 'dbt-bigquery' 'dbt-databricks' 'dbt-duckdb' 'dbt-postgres' 'dbt-vertica' 'dbt-core' -rm $AIRFLOW_HOME/airflow.cfg -rm $AIRFLOW_HOME/airflow.db +rm -f $AIRFLOW_HOME/airflow.cfg +rm -f $AIRFLOW_HOME/airflow.db pip freeze | grep airflow airflow db reset -y From 4924916573b7d6670dd44c9537ad63331c427835 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:26:54 +0100 Subject: [PATCH 04/16] Do not fail if airflow.db and airflow.cfg do not exist --- scripts/test/pre-install-airflow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index 184b37ee67..3f22bb2685 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -38,7 +38,7 @@ uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docke uv pip install "gcsfs<2025.3.0" -if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] ; then +if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" "apache-airflow==$AIRFLOW_VERSION" "urllib3<2" uv pip install "apache-airflow-providers-cncf-kubernetes" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" From 20eabd61fc80ff7155a30696531debc03596e0b0 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:27:38 +0100 Subject: [PATCH 05/16] Update scripts/test/pre-install-airflow.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- scripts/test/pre-install-airflow.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index 3f22bb2685..25e9b51e90 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -44,14 +44,14 @@ if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFL uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-microsoft-azure" "apache-airflow==$AIRFLOW_VERSION" uv pip install pyopenssl --upgrade - pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" elif [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt uv pip install "pydantic<2.0" - pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt From f0a2b211d73719dc271dcc92a1d91408404dd95a Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:42:06 +0100 Subject: [PATCH 06/16] Try to fix the CI --- scripts/test/pre-install-airflow.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index 25e9b51e90..b51f1cc88d 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -44,20 +44,28 @@ if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFL uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-microsoft-azure" "apache-airflow==$AIRFLOW_VERSION" uv pip install pyopenssl --upgrade +<<<<<<< Updated upstream uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" +======= + pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt +>>>>>>> Stashed changes elif [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt uv pip install "pydantic<2.0" +<<<<<<< Updated upstream uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" +======= + pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt +>>>>>>> Stashed changes elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google>10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -69,7 +77,7 @@ elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then # apache-airflow-providers-microsoft-azure==8.5.0. Hence, we are using apache-airflow-providers-microsoft-azure>=8.5.0 # and skipping installation with constraints, as the specified version does not meet our requirements. uv pip install "apache-airflow-providers-microsoft-azure>=8.5.0" "apache-airflow==$AIRFLOW_VERSION" - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -82,13 +90,13 @@ elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then # we are using apache-airflow-providers-google>=10.17.0 and skipping constraints installation, as the specified # version does not meet our requirements. uv pip install "apache-airflow-providers-google>=10.17.0" "apache-airflow==$AIRFLOW_VERSION" - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt else uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-microsoft-azure" --constraint /tmp/constraint.txt - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" + uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt fi From 50ac10ade13efa18705a4f7c04c57906ab2d0606 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:43:24 +0100 Subject: [PATCH 07/16] Fix CI --- scripts/test/pre-install-airflow.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index b51f1cc88d..2f1ef9e74d 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -44,22 +44,15 @@ if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFL uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-microsoft-azure" "apache-airflow==$AIRFLOW_VERSION" uv pip install pyopenssl --upgrade -<<<<<<< Updated upstream uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" -======= pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt ->>>>>>> Stashed changes elif [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt uv pip install "pydantic<2.0" -<<<<<<< Updated upstream - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" -======= - pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt ->>>>>>> Stashed changes + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt From fc8c26e0e083ef3f8e8787d1ec081e9221cea3d4 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:48:14 +0100 Subject: [PATCH 08/16] Install openlineage-airflow only --- scripts/test/pre-install-airflow.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index 2f1ef9e74d..f16c9a51ca 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -44,21 +44,21 @@ if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFL uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-microsoft-azure" "apache-airflow==$AIRFLOW_VERSION" uv pip install pyopenssl --upgrade - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" - pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt elif [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt - uv pip install "pydantic<2.0" uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + uv pip install "pydantic<2.0" elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google>10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -70,7 +70,9 @@ elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then # apache-airflow-providers-microsoft-azure==8.5.0. Hence, we are using apache-airflow-providers-microsoft-azure>=8.5.0 # and skipping installation with constraints, as the specified version does not meet our requirements. uv pip install "apache-airflow-providers-microsoft-azure>=8.5.0" "apache-airflow==$AIRFLOW_VERSION" - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -83,13 +85,15 @@ elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then # we are using apache-airflow-providers-google>=10.17.0 and skipping constraints installation, as the specified # version does not meet our requirements. uv pip install "apache-airflow-providers-google>=10.17.0" "apache-airflow==$AIRFLOW_VERSION" - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt else uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-microsoft-azure" --constraint /tmp/constraint.txt - uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt + uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt fi From 58016b5b5b51a6afbd624e3582b09e87390d264f Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:56:40 +0100 Subject: [PATCH 09/16] Simplify change to try to break the CI less --- scripts/test/pre-install-airflow.sh | 32 +++-------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index f16c9a51ca..ce43d270c7 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -1,16 +1,4 @@ -#!/bin/bash - -set -v -set -x -set -e - -AIRFLOW_VERSION="$1" -PYTHON_VERSION="$2" - -# Use this to set the appropriate Python environment in Github Actions, -# while also not assuming --system when running locally. -if [ "$GITHUB_ACTIONS" = "true" ] && [ -z "${VIRTUAL_ENV}" ]; then - py_path=$(which python) +ython) virtual_env_dir=$(dirname "$(dirname "$py_path")") export VIRTUAL_ENV="$virtual_env_dir" fi @@ -32,33 +20,28 @@ mv /tmp/constraint.txt.tmp /tmp/constraint.txt pip install uv uv pip install pip --upgrade -uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docker apache-airflow-providers-postgres --constraint /tmp/constraint.txt +uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docker apache-airflow-providers-postgres openlineage-airflow --constraint /tmp/constraint.txt # Due to issue https://github.com/fsspec/gcsfs/issues/664 uv pip install "gcsfs<2025.3.0" - -if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFLOW_VERSION" = "2.6" ] ; then +if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" "apache-airflow==$AIRFLOW_VERSION" "urllib3<2" uv pip install "apache-airflow-providers-cncf-kubernetes" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-google<10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install "apache-airflow-providers-microsoft-azure" "apache-airflow==$AIRFLOW_VERSION" uv pip install pyopenssl --upgrade - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt elif [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt uv pip install "pydantic<2.0" elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then uv pip install "apache-airflow-providers-amazon" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google>10.11" "apache-airflow==$AIRFLOW_VERSION" uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt - #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -70,9 +53,6 @@ elif [ "$AIRFLOW_VERSION" = "2.8" ] ; then # apache-airflow-providers-microsoft-azure==8.5.0. Hence, we are using apache-airflow-providers-microsoft-azure>=8.5.0 # and skipping installation with constraints, as the specified version does not meet our requirements. uv pip install "apache-airflow-providers-microsoft-azure>=8.5.0" "apache-airflow==$AIRFLOW_VERSION" - #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt - elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt @@ -85,21 +65,15 @@ elif [ "$AIRFLOW_VERSION" = "2.9" ] ; then # we are using apache-airflow-providers-google>=10.17.0 and skipping constraints installation, as the specified # version does not meet our requirements. uv pip install "apache-airflow-providers-google>=10.17.0" "apache-airflow==$AIRFLOW_VERSION" - #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt else uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-google" --constraint /tmp/constraint.txt uv pip install "apache-airflow-providers-microsoft-azure" --constraint /tmp/constraint.txt - #uv pip install apache-airflow-providers-openlineage "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt - uv pip install -U openlineage-airflow "apache-airflow==$AIRFLOW_VERSION" --constraint /tmp/constraint.txt fi - rm /tmp/constraint.txt -uv pip freeze actual_version=$(airflow version | cut -d. -f1,2) if [ "$actual_version" = $AIRFLOW_VERSION ]; then From f6f36b17a0e5ac432e98f919e077a0d42d6f2fc6 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 17:58:25 +0100 Subject: [PATCH 10/16] Remove unintentional change --- scripts/test/integration.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/test/integration.sh b/scripts/test/integration.sh index b00cf9631a..81dc1b8b99 100644 --- a/scripts/test/integration.sh +++ b/scripts/test/integration.sh @@ -14,7 +14,6 @@ airflow db check rm -rf dbt/jaffle_shop/dbt_packages; pytest -vv \ - tests/test_example_dags_no_connections.py \ --cov=cosmos \ --cov-report=term-missing \ --cov-report=xml \ From b125896808d2d8b952c35f01e8c191bd07463d91 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 18:04:33 +0100 Subject: [PATCH 11/16] Remove unintentional change --- scripts/test/pre-install-airflow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index ce43d270c7..32fef87e85 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -20,7 +20,7 @@ mv /tmp/constraint.txt.tmp /tmp/constraint.txt pip install uv uv pip install pip --upgrade -uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docker apache-airflow-providers-postgres openlineage-airflow --constraint /tmp/constraint.txt +uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docker apache-airflow-providers-postgres --constraint /tmp/constraint.txt # Due to issue https://github.com/fsspec/gcsfs/issues/664 uv pip install "gcsfs<2025.3.0" From 005ca0dea924e481f24ecc171f66106236bb3997 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 18:05:23 +0100 Subject: [PATCH 12/16] Update scripts/test/pre-install-airflow.sh --- scripts/test/pre-install-airflow.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index 32fef87e85..dbe0e6effb 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -1,4 +1,16 @@ -ython) +#!/bin/bash + +set -v +set -x +set -e + +AIRFLOW_VERSION="$1" +PYTHON_VERSION="$2" + +# Use this to set the appropriate Python environment in Github Actions, +# while also not assuming --system when running locally. +if [ "$GITHUB_ACTIONS" = "true" ] && [ -z "${VIRTUAL_ENV}" ]; then + py_path=$(which python) virtual_env_dir=$(dirname "$(dirname "$py_path")") export VIRTUAL_ENV="$virtual_env_dir" fi From 25bc6c9f728c5870e868fb8893a176fd4695ec45 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 18:07:03 +0100 Subject: [PATCH 13/16] Update scripts/test/integration-setup.sh --- scripts/test/integration-setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/test/integration-setup.sh b/scripts/test/integration-setup.sh index 96aeae2663..a7b41f7a69 100644 --- a/scripts/test/integration-setup.sh +++ b/scripts/test/integration-setup.sh @@ -31,6 +31,8 @@ fi uv pip install -U "dbt-core==$DBT_VERSION" dbt-postgres dbt-bigquery dbt-vertica 'dbt-databricks' pyspark +pip install -U openlineage-airflow + if python3 -c "import sys; print(sys.version_info >= (3, 9))" | grep -q 'True'; then pip install 'dbt-duckdb' 'airflow-provider-duckdb>=0.2.0' fi From 6f8947eaf225e832996207d04089892dc9f8e9bb Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 5 Aug 2025 18:11:51 +0100 Subject: [PATCH 14/16] pin Airflow version while installing OL-af --- scripts/test/integration-setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/test/integration-setup.sh b/scripts/test/integration-setup.sh index a7b41f7a69..17b592bb8d 100644 --- a/scripts/test/integration-setup.sh +++ b/scripts/test/integration-setup.sh @@ -46,4 +46,6 @@ if [ "$AIRFLOW_VERSION" = "2.6.0" ] ; then pip freeze | grep -i pydantic fi +pip install -U openlineage-airflow apache-airflow==$AIRFLOW_VERSION + uv pip freeze From f60cf8166aa327574aec79fb375656eda80fd8d0 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Wed, 6 Aug 2025 09:54:17 +0100 Subject: [PATCH 15/16] Install Airflow DuckDB with other Airflow dependencies, constraining AF version --- scripts/test/integration-setup.sh | 2 +- scripts/test/pre-install-airflow.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/test/integration-setup.sh b/scripts/test/integration-setup.sh index 17b592bb8d..623c5dff4d 100644 --- a/scripts/test/integration-setup.sh +++ b/scripts/test/integration-setup.sh @@ -34,7 +34,7 @@ uv pip install -U "dbt-core==$DBT_VERSION" dbt-postgres dbt-bigquery dbt-vertica pip install -U openlineage-airflow if python3 -c "import sys; print(sys.version_info >= (3, 9))" | grep -q 'True'; then - pip install 'dbt-duckdb' 'airflow-provider-duckdb>=0.2.0' + pip install 'dbt-duckdb' fi # To overcome CI issues when running Py 3.10 and AF 2.6 with dbt-core 1.9 diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index dbe0e6effb..2935dbe623 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -32,11 +32,12 @@ mv /tmp/constraint.txt.tmp /tmp/constraint.txt pip install uv uv pip install pip --upgrade -uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docker apache-airflow-providers-postgres --constraint /tmp/constraint.txt +uv pip install "apache-airflow==$AIRFLOW_VERSION" "airflow-provider-duckdb>=0.2.0" apache-airflow-providers-docker apache-airflow-providers-postgres --constraint /tmp/constraint.txt # Due to issue https://github.com/fsspec/gcsfs/issues/664 uv pip install "gcsfs<2025.3.0" + if [ "$AIRFLOW_VERSION" = "2.4" ] || [ "$AIRFLOW_VERSION" = "2.5" ] || [ "$AIRFLOW_VERSION" = "2.6" ] ; then uv pip install "apache-airflow-providers-amazon" "apache-airflow==$AIRFLOW_VERSION" "urllib3<2" uv pip install "apache-airflow-providers-cncf-kubernetes" "apache-airflow==$AIRFLOW_VERSION" From c65c1aaef54f3a32499147b853261c124a70d28a Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Wed, 6 Aug 2025 10:03:05 +0100 Subject: [PATCH 16/16] new attempt of installing stuff without breaking the CI --- scripts/test/integration-setup.sh | 2 +- scripts/test/pre-install-airflow.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test/integration-setup.sh b/scripts/test/integration-setup.sh index 623c5dff4d..464ae2618a 100644 --- a/scripts/test/integration-setup.sh +++ b/scripts/test/integration-setup.sh @@ -34,7 +34,7 @@ uv pip install -U "dbt-core==$DBT_VERSION" dbt-postgres dbt-bigquery dbt-vertica pip install -U openlineage-airflow if python3 -c "import sys; print(sys.version_info >= (3, 9))" | grep -q 'True'; then - pip install 'dbt-duckdb' + pip install 'dbt-duckdb' "airflow-provider-duckdb>=0.2.0" "apache-airflow==$AIRFLOW_VERSION" fi # To overcome CI issues when running Py 3.10 and AF 2.6 with dbt-core 1.9 diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh index 2935dbe623..3553894594 100755 --- a/scripts/test/pre-install-airflow.sh +++ b/scripts/test/pre-install-airflow.sh @@ -32,7 +32,7 @@ mv /tmp/constraint.txt.tmp /tmp/constraint.txt pip install uv uv pip install pip --upgrade -uv pip install "apache-airflow==$AIRFLOW_VERSION" "airflow-provider-duckdb>=0.2.0" apache-airflow-providers-docker apache-airflow-providers-postgres --constraint /tmp/constraint.txt +uv pip install "apache-airflow==$AIRFLOW_VERSION" apache-airflow-providers-docker apache-airflow-providers-postgres --constraint /tmp/constraint.txt # Due to issue https://github.com/fsspec/gcsfs/issues/664 uv pip install "gcsfs<2025.3.0"