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/06/09 09:04:41 UTC
[airflow] 28/36: Remove remnant kubernetes stuff from breeze
scripts (#9138)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 4e7c48e4015cb8500c77a0df55d629b780f70886
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Thu Jun 4 15:08:54 2020 +0200
Remove remnant kubernetes stuff from breeze scripts (#9138)
(cherry picked from commit da748d02517d7903e92785e9da15458db35d20de)
---
breeze | 26 ------------------
scripts/ci/ci_run_airflow_testing.sh | 46 +++-----------------------------
scripts/ci/in_container/entrypoint_ci.sh | 5 ----
3 files changed, 3 insertions(+), 74 deletions(-)
diff --git a/breeze b/breeze
index a8e9295..8df8a41 100755
--- a/breeze
+++ b/breeze
@@ -378,17 +378,6 @@ EOF
EOF
fi
-
- if [[ ${INTEGRATIONS[*]} == *"kubernetes"* ]]; then
- cat <<EOF
-
- Kubernetes mode: ${KUBERNETES_MODE}
- Kubernetes version: ${KUBERNETES_VERSION}
-
- Enable KinD cluster: ${ENABLE_KIND_CLUSTER}
- Cluster operation: ${KIND_CLUSTER_OPERATION}
-EOF
- fi
else
if [[ ${PRODUCTION_IMAGE} == "true" ]]; then
cat <<EOF
@@ -422,18 +411,6 @@ EOF
EOF
fi
- set +u
- if [[ ${INTEGRATIONS[*]} == *"kubernetes"* ]]; then
- cat <<EOF
-
- Kubernetes mode: ${KUBERNETES_MODE}
- Kubernetes version: ${KUBERNETES_VERSION}
-
- Enable KinD cluster: ${ENABLE_KIND_CLUSTER}
- Cluster operation: ${KIND_CLUSTER_OPERATION}
-EOF
- fi
- set -u
fi
}
@@ -458,9 +435,6 @@ export DOCKERHUB_REPO=${DOCKERHUB_REPO}
export COMPOSE_FILE="${COMPOSE_FILE}"
export PYTHON_MAJOR_MINOR_VERSION="${PYTHON_MAJOR_MINOR_VERSION}"
export BACKEND="${BACKEND}"
-export ENABLE_KIND_CLUSTER="${ENABLE_KIND_CLUSTER}"
-export KUBERNETES_MODE="${KUBERNETES_MODE}"
-export KUBERNETES_VERSION="${KUBERNETES_VERSION}"
export AIRFLOW_VERSION="${AIRFLOW_VERSION}"
export INSTALL_AIRFLOW_VERSION="${INSTALL_AIRFLOW_VERSION}"
export RUN_TESTS="${TESTS}"
diff --git a/scripts/ci/ci_run_airflow_testing.sh b/scripts/ci/ci_run_airflow_testing.sh
index f8d5e7e..5c707c5 100755
--- a/scripts/ci/ci_run_airflow_testing.sh
+++ b/scripts/ci/ci_run_airflow_testing.sh
@@ -17,25 +17,8 @@
# under the License.
export VERBOSE=${VERBOSE:="false"}
-function run_airflow_testing_in_docker_with_kubernetes() {
- export KUBERNETES_MODE=${KUBERNETES_MODE:="image"}
- export KUBERNETES_VERSION=${KUBERNETES_VERSION:="v1.15.3"}
-
- # shellcheck disable=SC2016
- docker-compose --log-level INFO \
- -f "${MY_DIR}/docker-compose/base.yml" \
- -f "${MY_DIR}/docker-compose/backend-${BACKEND}.yml" \
- -f "${MY_DIR}/docker-compose/runtime-kubernetes.yml" \
- "${INTEGRATIONS[@]}" \
- "${DOCKER_COMPOSE_LOCAL[@]}" \
- run airflow \
- '/opt/airflow/scripts/ci/in_container/entrypoint_ci.sh "${@}"' \
- /opt/airflow/scripts/ci/in_container/entrypoint_ci.sh "${@}"
- # Note the command is there twice (!) because it is passed via bash -c
- # and bash -c starts passing parameters from $0. TODO: fixme
-}
-
function run_airflow_testing_in_docker() {
+ set +u
# shellcheck disable=SC2016
docker-compose --log-level INFO \
-f "${MY_DIR}/docker-compose/base.yml" \
@@ -47,9 +30,9 @@ function run_airflow_testing_in_docker() {
/opt/airflow/scripts/ci/in_container/entrypoint_ci.sh "${@}"
# Note the command is there twice (!) because it is passed via bash -c
# and bash -c starts passing parameters from $0. TODO: fixme
+ set -u
}
-
# shellcheck source=scripts/ci/_script_init.sh
. "$( dirname "${BASH_SOURCE[0]}" )/_script_init.sh"
@@ -131,11 +114,7 @@ MAX_RETRIES=4
while [[ ${MAX_RETRIES} -ge "0" ]]
do
set +e
- if [[ ${RUNTIME:=} == "kubernetes" ]]; then
- run_airflow_testing_in_docker_with_kubernetes "${@}"
- else
- run_airflow_testing_in_docker "${@}"
- fi
+ run_airflow_testing_in_docker "${@}"
EXIT_CODE=$?
set -e
if [[ ${EXIT_CODE} == 254 ]] ; then
@@ -150,26 +129,7 @@ do
fi
exit ${EXIT_CODE}
done
-set -u
-
-#TODO FIXME
-if [[ "${INTEGRATIONS[*]}" == *"kubernetes"* ]]; then
- export KUBERNETES_MODE=${KUBERNETES_MODE:="image"}
- export KUBERNETES_VERSION=${KUBERNETES_VERSION:="v1.15.3"}
- export KIND_CLUSTER_NAME="airflow-python-${PYTHON_MAJOR_MINOR_VERSION}-${KUBERNETES_VERSION}"
- if [[ ${ENABLE_KIND_CLUSTER} == "true" ]]; then
- install_kind_in_host
- "${MY_DIR}/setup_kind_cluster_in_host.sh"
- fi
-
- # adding trap to exiting trap
- HANDLERS="$( trap -p EXIT | cut -f2 -d \' )"
- # shellcheck disable=SC2064
- trap "${HANDLERS}${HANDLERS:+;}send_kubernetes_logs_to_file_io" EXIT
-fi
-
-set +u
# shellcheck disable=SC2016
docker-compose --log-level INFO \
-f "${MY_DIR}/docker-compose/base.yml" \
diff --git a/scripts/ci/in_container/entrypoint_ci.sh b/scripts/ci/in_container/entrypoint_ci.sh
index 111e7ca..60757fa 100755
--- a/scripts/ci/in_container/entrypoint_ci.sh
+++ b/scripts/ci/in_container/entrypoint_ci.sh
@@ -26,9 +26,6 @@ AIRFLOW_SOURCES=$(cd "${MY_DIR}/../../.." || exit 1; pwd)
PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION:=3.6}
BACKEND=${BACKEND:=sqlite}
-KUBERNETES_MODE=${KUBERNETES_MODE:=""}
-KUBERNETES_VERSION=${KUBERNETES_VERSION:=""}
-ENABLE_KIND_CLUSTER=${ENABLE_KIND_CLUSTER:="false"}
export AIRFLOW_HOME=${AIRFLOW_HOME:=${HOME}}
@@ -165,8 +162,6 @@ done
ssh-keyscan -H localhost >> ~/.ssh/known_hosts 2>/dev/null
-export KUBERNETES_VERSION=${KUBERNETES_VERSION:=""}
-
# shellcheck source=scripts/ci/in_container/configure_environment.sh
. "${MY_DIR}/configure_environment.sh"