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 2020/12/25 20:28:03 UTC

[airflow] branch master updated: Installed providers are initialized in subshell (#13270)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new df09c3f  Installed providers are initialized in subshell (#13270)
df09c3f is described below

commit df09c3f00eae4ae0e27b979b7cf5c6fef51a493b
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Fri Dec 25 21:27:53 2020 +0100

    Installed providers are initialized in subshell (#13270)
    
    In DockerHub when non-release image was built the initialization
    was leaving INSTALLED_PROVIDERS array as empty because the
    values were not appended to the existing array but the variable
    was re-declared inside the function.
    
    This only happened when initialization was run as a subshell.
---
 scripts/ci/libraries/_initialization.sh | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/scripts/ci/libraries/_initialization.sh b/scripts/ci/libraries/_initialization.sh
index 0775706..e5ff6f6 100644
--- a/scripts/ci/libraries/_initialization.sh
+++ b/scripts/ci/libraries/_initialization.sh
@@ -149,7 +149,7 @@ function initialization::initialize_base_variables() {
     INSTALL_PROVIDERS_FROM_SOURCES=${INSTALL_PROVIDERS_FROM_SOURCES:="true"}
     export INSTALL_PROVIDERS_FROM_SOURCES
 
-    export INSTALLED_PROVIDERS=(
+    INSTALLED_PROVIDERS+=(
         "amazon"
         "celery"
         "cncf.kubernetes"
@@ -170,10 +170,8 @@ function initialization::initialize_base_variables() {
         "slack"
         "ssh"
     )
-    readonly INSTALLED_PROVIDERS
-
+    export INSTALLED_PROVIDERS
     export INSTALLED_EXTRAS="async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,imap,google,microsoft.azure,mysql,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv"
-    readonly INSTALLED_EXTRAS
 
     # default version of PIP USED (This has to be < 20.3 until https://github.com/apache/airflow/issues/12838 is solved)
     PIP_VERSION=${PIP_VERSION:="20.2.4"}
@@ -798,6 +796,17 @@ function initialization::make_constants_read_only() {
     readonly LOCAL_IMAGE_BUILD_CACHE_HASH_FILE
     readonly REMOTE_IMAGE_BUILD_CACHE_HASH_FILE
 
+    readonly INSTALLED_EXTRAS
+    readonly INSTALLED_PROVIDERS
+
+    readonly CURRENT_PYTHON_MAJOR_MINOR_VERSIONS
+    readonly CURRENT_KUBERNETES_VERSIONS
+    readonly CURRENT_KUBERNETES_MODES
+    readonly CURRENT_POSTGRES_VERSIONS
+    readonly CURRENT_MYSQL_VERSIONS
+    readonly CURRENT_KIND_VERSIONS
+    readonly CURRENT_HELM_VERSIONS
+    readonly ALL_PYTHON_MAJOR_MINOR_VERSIONS
 }
 
 # converts parameters to json array