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
  • Loading branch information
potiuk authored Mar 28, 2020
1 parent 01f9942 commit 88bfd37
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
4 changes: 1 addition & 3 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -929,13 +929,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 @@ -426,7 +425,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 @@ -1196,13 +1195,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 @@ -1345,7 +1342,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 @@ -47,7 +47,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 @@ -59,7 +59,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 @@ -63,7 +63,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/node_modules" ]]; then
echo
echo "Installing node modules as they are not yet installed (Sources mounted from Host)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/in_container/run_test_package_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
. "$( dirname "${BASH_SOURCE[0]}" )/_in_container_script_init.sh"
OUT_FILE=$(mktemp)

if [[ ! ${INSTALL_AIRFLOW_VERSION:="current"} =~ 1.10* ]]; then
if [[ ! ${INSTALL_AIRFLOW_VERSION:=""} =~ 1.10* ]]; then
echo
echo "ERROR! You can only install providers package in 1.10. airflow series."
echo "You have: ${INSTALL_AIRFLOW_VERSION}"
Expand Down

0 comments on commit 88bfd37

Please sign in to comment.