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/21 14:28:13 UTC

[airflow] 10/22: 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 v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit ca3c851032ce15a48f330a9c8bb146197372af0e
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.
    
    (cherry picked from commit e9d19a60a017224165e835949f623f106b97e1cb)
---
 Dockerfile.ci                   | 4 ++++
 scripts/docker/entrypoint_ci.sh | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/Dockerfile.ci b/Dockerfile.ci
index 782342a3b8..4abaa4ad44 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