airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] mik-laj commented on a change in pull request #7084: [AIRFLOW-6491] improve parameter handling in breeze
Date Tue, 07 Jan 2020 13:53:36 GMT
mik-laj commented on a change in pull request #7084: [AIRFLOW-6491] improve parameter handling
in breeze
URL: https://github.com/apache/airflow/pull/7084#discussion_r363756946
 
 

 ##########
 File path: scripts/ci/_utils.sh
 ##########
 @@ -942,3 +942,38 @@ function build_image_on_ci() {
     unset AIRFLOW_CONTAINER_FORCE_PULL_IMAGES
     unset FORCE_BUILD
 }
+
+function read_from_file {
+    cat "${BUILD_CACHE_DIR}/.$1" 2>/dev/null || true
+}
+
+function save_to_file {
+    # shellcheck disable=SC2005
+    echo "$(eval echo "\$$1")" > "${BUILD_CACHE_DIR}/.$1"
+}
+
+function check_for_allowed_params {
+    _VARIABLE_NAME="${1}"
+    _VARIABLE_DESCRIPTIVE_NAME="${2}"
+    _FLAG="${3}"
+    _ALLOWED_VALUES_ENV_NAME="_BREEZE_ALLOWED_${_VARIABLE_NAME}S"
+    _ALLOWED_VALUES=${!_ALLOWED_VALUES_ENV_NAME}
+    _VALUE=${!_VARIABLE_NAME}
+    if [[ ${_ALLOWED_VALUES:=} != *" ${_VALUE} "* ]]; then
+        echo >&2
+        echo >&2 "ERROR:  Allowed ${_VARIABLE_DESCRIPTIVE_NAME}: [${_ALLOWED_VALUES}].
Is: '${!_VARIABLE_NAME}'."
+        echo >&2
+        echo >&2 "Switch to supported Kubernetes version with ${_FLAG} flag."
 
 Review comment:
   Is this message correct? I think we don't just use this for Kubernetes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message