You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/07/13 10:49:18 UTC

[airflow] branch main updated: Old "Core" SQL database config used in breeze for old airflow versions (#25009)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new e9d19a60a0 Old "Core" SQL database config used in breeze for old airflow versions (#25009)
e9d19a60a0 is described below

commit e9d19a60a017224165e835949f623f106b97e1cb
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Wed Jul 13 12:49:10 2022 +0200

    Old "Core" SQL database config used in breeze for old airflow versions (#25009)
    
    Airflow versions from before Airlfow 2.3 used "CORE" section
    for SQL configuration and they need to add variable
    from the DATABASE one when Airflow version 2.2 and before is
    used in `--use-airflow-version` switch.
---
 Dockerfile.ci                   | 4 ++++
 scripts/docker/entrypoint_ci.sh | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/Dockerfile.ci b/Dockerfile.ci
index 3e866bc6ed..f95a5cedbf 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -727,6 +727,10 @@ if [[ ${SKIP_ENVIRONMENT_INITIALIZATION=} != "true" ]]; then
             echo
             install_released_airflow_version "${USE_AIRFLOW_VERSION}" "${AIRFLOW_CONSTRAINTS_REFERENCE}"
         fi
+        if [[ "${USE_AIRFLOW_VERSION}" =~ ^2\.2\..*|^2\.1\..*|^2\.0\..* && "${AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=}" != "" ]]; then
+            # make sure old variable is used for older airflow versions
+            export AIRFLOW__CORE__SQL_ALCHEMY_CONN="${AIRFLOW__DATABASE__SQL_ALCHEMY_CONN}"
+        fi
     fi
     if [[ ${USE_PACKAGES_FROM_DIST=} == "true" ]]; then
         echo
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index 42dc3f5712..ae4961ea64 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -135,6 +135,10 @@ if [[ ${SKIP_ENVIRONMENT_INITIALIZATION=} != "true" ]]; then
             echo
             install_released_airflow_version "${USE_AIRFLOW_VERSION}" "${AIRFLOW_CONSTRAINTS_REFERENCE}"
         fi
+        if [[ "${USE_AIRFLOW_VERSION}" =~ ^2\.2\..*|^2\.1\..*|^2\.0\..* && "${AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=}" != "" ]]; then
+            # make sure old variable is used for older airflow versions
+            export AIRFLOW__CORE__SQL_ALCHEMY_CONN="${AIRFLOW__DATABASE__SQL_ALCHEMY_CONN}"
+        fi
     fi
     if [[ ${USE_PACKAGES_FROM_DIST=} == "true" ]]; then
         echo