Skip to content

Commit

Permalink
Install version is not persistent in breeze (apache#7914)
Browse files Browse the repository at this point in the history
(cherry picked from commit 88bfd37)
  • Loading branch information
potiuk authored and kaxil committed Mar 30, 2020
1 parent a68b276 commit 3076f7a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
4 changes: 1 addition & 3 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -899,13 +899,11 @@ This is the current syntax for `./breeze <./breeze>`_:
****************************************************************************************************
-a, --install-airflow-version <INSTALL_AIRFLOW_VERSION>
If different than 'current' removes the source-installed airflow and installs a
If specified, removes the source-installed airflow and installs a
released version of Airflow instead. One of:
current 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2
Default: current.
****************************************************************************************************
Database versions
****************************************************************************************************
Expand Down
10 changes: 3 additions & 7 deletions breeze
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function setup_default_breeze_variables() {

# If install released airflow is set to specified version, then the source version of airflow
# is removed and the specified version of airflow is installed from pypi
export INSTALL_AIRFLOW_VERSION=${INSTALL_AIRFLOW_VERSION:="current"}
export INSTALL_AIRFLOW_VERSION=${INSTALL_AIRFLOW_VERSION:=""}

# Determine version of the Airflow from version.py
AIRFLOW_VERSION=$(grep version "airflow/version.py" | awk '{print $3}' | sed "s/['+]//g")
Expand All @@ -143,7 +143,6 @@ function setup_default_breeze_variables() {
_BREEZE_DEFAULT_BACKEND="sqlite"
_BREEZE_DEFAULT_KUBERNETES_MODE="git_mode"
_BREEZE_DEFAULT_KUBERNETES_VERSION="v1.15.3"
_BREEZE_DEFAULT_INSTALL_AIRFLOW_VERSION="current"
_BREEZE_DEFAULT_POSTGRES_VERSION="9.6"
_BREEZE_DEFAULT_MYSQL_VERSION="5.7"

Expand Down Expand Up @@ -427,7 +426,7 @@ function prepare_command_files() {
COMPOSE_FILE=${COMPOSE_FILE}:${FORWARD_CREDENTIALS_DOCKER_COMPOSE_FILE}
fi

if [[ ${INSTALL_AIRFLOW_VERSION} != "current" ]]; then
if [[ ${INSTALL_AIRFLOW_VERSION} != "" ]]; then
COMPOSE_FILE=${COMPOSE_FILE}:${REMOVE_SOURCES_DOCKER_COMPOSE_FILE}
fi

Expand Down Expand Up @@ -1197,13 +1196,11 @@ $(print_star_line)
$(print_star_line)
-a, --install-airflow-version <INSTALL_AIRFLOW_VERSION>
If different than 'current' removes the source-installed airflow and installs a
If specified, removes the source-installed airflow and installs a
released version of Airflow instead. One of:
${ALLOWED_INSTALL_AIRFLOW_VERSIONS}
Default: ${_BREEZE_DEFAULT_INSTALL_AIRFLOW_VERSION:=}.
$(print_star_line)
Database versions
$(print_star_line)
Expand Down Expand Up @@ -1346,7 +1343,6 @@ function check_and_save_all_params() {
check_and_save_allowed_param "BACKEND" "backend" "--backend"
check_and_save_allowed_param "KUBERNETES_MODE" "Kubernetes mode" "--kubernetes-mode"
check_and_save_allowed_param "KUBERNETES_VERSION" "Kubernetes version" "--kubernetes-version"
check_and_save_allowed_param "INSTALL_AIRFLOW_VERSION" "Install airflow version" "--install-airflow-version"
check_and_save_allowed_param "POSTGRES_VERSION" "Postgres version" "--postgres-version"
check_and_save_allowed_param "MYSQL_VERSION" "Mysql version" "--mysql-version"

Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/ci_run_airflow_testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export VERBOSE_COMMANDS=${VERBOSE_COMMANDS:="false"}
export FORWARD_CREDENTIALS=${FORWARD_CREDENTIALS:="false"}

# Installs different airflow version than current from the sources
export INSTALL_AIRFLOW_VERSION=${INSTALL_AIRFLOW_VERSION:="current"}
export INSTALL_AIRFLOW_VERSION=${INSTALL_AIRFLOW_VERSION:=""}

if [[ ${MOUNT_LOCAL_SOURCES} == "true" ]]; then
DOCKER_COMPOSE_LOCAL=("-f" "${MY_DIR}/docker-compose/local.yml")
Expand All @@ -61,7 +61,7 @@ if [[ ${FORWARD_CREDENTIALS} == "true" ]]; then
DOCKER_COMPOSE_LOCAL+=("-f" "${MY_DIR}/docker-compose/forward-credentials.yml")
fi

if [[ ${INSTALL_AIRFLOW_VERSION} != "current" ]]; then
if [[ ${INSTALL_AIRFLOW_VERSION} != "" ]]; then
DOCKER_COMPOSE_LOCAL+=("-f" "${MY_DIR}/docker-compose/remove-sources.yml")
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/in_container/entrypoint_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ else
export RUN_AIRFLOW_1_10="false"
fi

if [[ ${INSTALL_AIRFLOW_VERSION} == "current" ]]; then
if [[ ${INSTALL_AIRFLOW_VERSION} == "" ]]; then
if [[ ! -d "${AIRFLOW_SOURCES}/airflow/www_rbac/node_modules" ]]; then
echo
echo "Installing node modules as they are not yet installed (Sources mounted from Host)"
Expand Down

0 comments on commit 3076f7a

Please sign in to comment.