This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-9-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 349fb568857cae64cb9765e094c2d9ce49ff4a0a Author: Mac <[email protected]> AuthorDate: Thu May 16 02:19:19 2024 +0800 Remove mysql/postgres from extras before determining the installation_command_flags (#39610) (cherry picked from commit b0e3915316d8e36ee28970141b72bd16abd570fe) --- Dockerfile | 20 ++++++++++---------- Dockerfile.ci | 20 ++++++++++---------- scripts/docker/install_airflow.sh | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Dockerfile b/Dockerfile index dcafa5e6f4..4b2c4eb6ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -879,6 +879,16 @@ COPY <<"EOF" /install_airflow.sh . "$( dirname "${BASH_SOURCE[0]}" )/common.sh" function install_airflow() { + # Remove mysql from extras if client is not going to be installed + if [[ ${INSTALL_MYSQL_CLIENT} != "true" ]]; then + AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/mysql,} + echo "${COLOR_YELLOW}MYSQL client installation is disabled. Extra 'mysql' installations were therefore omitted.${COLOR_RESET}" + fi + # Remove postgres from extras if client is not going to be installed + if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then + AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,} + echo "${COLOR_YELLOW}Postgres client installation is disabled. Extra 'postgres' installations were therefore omitted.${COLOR_RESET}" + fi # Determine the installation_command_flags based on AIRFLOW_INSTALLATION_METHOD method local installation_command_flags if [[ ${AIRFLOW_INSTALLATION_METHOD} == "." ]]; then @@ -896,16 +906,6 @@ function install_airflow() { echo exit 1 fi - # Remove mysql from extras if client is not going to be installed - if [[ ${INSTALL_MYSQL_CLIENT} != "true" ]]; then - AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/mysql,} - echo "${COLOR_YELLOW}MYSQL client installation is disabled. Extra 'mysql' installations were therefore omitted.${COLOR_RESET}" - fi - # Remove postgres from extras if client is not going to be installed - if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then - AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,} - echo "${COLOR_YELLOW}Postgres client installation is disabled. Extra 'postgres' installations were therefore omitted.${COLOR_RESET}" - fi if [[ "${UPGRADE_INVALIDATION_STRING=}" != "" ]]; then echo echo "${COLOR_BLUE}Remove airflow and all provider packages installed before potentially${COLOR_RESET}" diff --git a/Dockerfile.ci b/Dockerfile.ci index 81680ebeb1..da6aadb02d 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -678,6 +678,16 @@ COPY <<"EOF" /install_airflow.sh . "$( dirname "${BASH_SOURCE[0]}" )/common.sh" function install_airflow() { + # Remove mysql from extras if client is not going to be installed + if [[ ${INSTALL_MYSQL_CLIENT} != "true" ]]; then + AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/mysql,} + echo "${COLOR_YELLOW}MYSQL client installation is disabled. Extra 'mysql' installations were therefore omitted.${COLOR_RESET}" + fi + # Remove postgres from extras if client is not going to be installed + if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then + AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,} + echo "${COLOR_YELLOW}Postgres client installation is disabled. Extra 'postgres' installations were therefore omitted.${COLOR_RESET}" + fi # Determine the installation_command_flags based on AIRFLOW_INSTALLATION_METHOD method local installation_command_flags if [[ ${AIRFLOW_INSTALLATION_METHOD} == "." ]]; then @@ -695,16 +705,6 @@ function install_airflow() { echo exit 1 fi - # Remove mysql from extras if client is not going to be installed - if [[ ${INSTALL_MYSQL_CLIENT} != "true" ]]; then - AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/mysql,} - echo "${COLOR_YELLOW}MYSQL client installation is disabled. Extra 'mysql' installations were therefore omitted.${COLOR_RESET}" - fi - # Remove postgres from extras if client is not going to be installed - if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then - AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,} - echo "${COLOR_YELLOW}Postgres client installation is disabled. Extra 'postgres' installations were therefore omitted.${COLOR_RESET}" - fi if [[ "${UPGRADE_INVALIDATION_STRING=}" != "" ]]; then echo echo "${COLOR_BLUE}Remove airflow and all provider packages installed before potentially${COLOR_RESET}" diff --git a/scripts/docker/install_airflow.sh b/scripts/docker/install_airflow.sh index dcaa4140da..5db10ad967 100644 --- a/scripts/docker/install_airflow.sh +++ b/scripts/docker/install_airflow.sh @@ -35,6 +35,16 @@ . "$( dirname "${BASH_SOURCE[0]}" )/common.sh" function install_airflow() { + # Remove mysql from extras if client is not going to be installed + if [[ ${INSTALL_MYSQL_CLIENT} != "true" ]]; then + AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/mysql,} + echo "${COLOR_YELLOW}MYSQL client installation is disabled. Extra 'mysql' installations were therefore omitted.${COLOR_RESET}" + fi + # Remove postgres from extras if client is not going to be installed + if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then + AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,} + echo "${COLOR_YELLOW}Postgres client installation is disabled. Extra 'postgres' installations were therefore omitted.${COLOR_RESET}" + fi # Determine the installation_command_flags based on AIRFLOW_INSTALLATION_METHOD method local installation_command_flags if [[ ${AIRFLOW_INSTALLATION_METHOD} == "." ]]; then @@ -52,16 +62,6 @@ function install_airflow() { echo exit 1 fi - # Remove mysql from extras if client is not going to be installed - if [[ ${INSTALL_MYSQL_CLIENT} != "true" ]]; then - AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/mysql,} - echo "${COLOR_YELLOW}MYSQL client installation is disabled. Extra 'mysql' installations were therefore omitted.${COLOR_RESET}" - fi - # Remove postgres from extras if client is not going to be installed - if [[ ${INSTALL_POSTGRES_CLIENT} != "true" ]]; then - AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS/postgres,} - echo "${COLOR_YELLOW}Postgres client installation is disabled. Extra 'postgres' installations were therefore omitted.${COLOR_RESET}" - fi if [[ "${UPGRADE_INVALIDATION_STRING=}" != "" ]]; then echo echo "${COLOR_BLUE}Remove airflow and all provider packages installed before potentially${COLOR_RESET}"
