You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/31 08:51:40 UTC

[GitHub] [airflow] feluelle commented on a change in pull request #10651: Implement better shell conventions for breeze

feluelle commented on a change in pull request #10651:
URL: https://github.com/apache/airflow/pull/10651#discussion_r479947077



##########
File path: breeze-complete
##########
@@ -28,6 +28,25 @@ _BREEZE_ALLOWED_MYSQL_VERSIONS="5.7 8"
 _BREEZE_ALLOWED_POSTGRES_VERSIONS="9.6 10"
 _BREEZE_ALLOWED_KIND_OPERATIONS="start stop restart status deploy test shell"
 
+# Default values for the flags used
+
+# shellcheck disable=SC2034
+_BREEZE_DEFAULT_BACKEND="sqlite"
+# shellcheck disable=SC2034
+_BREEZE_DEFAULT_KUBERNETES_MODE="image"
+# shellcheck disable=SC2034
+_BREEZE_DEFAULT_KUBERNETES_VERSION="v1.18.6"
+# shellcheck disable=SC2034
+_BREEZE_DEFAULT_KIND_VERSION="v0.8.0"
+# shellcheck disable=SC2034
+_BREEZE_DEFAULT_HELM_VERSION="v3.2.4"
+# shellcheck disable=SC2034
+_BREEZE_DEFAULT_POSTGRES_VERSION="9.6"
+# shellcheck disable=SC2034
+_BREEZE_DEFAULT_POSTGRES_VERSION="9.6"

Review comment:
       ```suggestion
   ```
   This is a dupicate (see 2 lines above).

##########
File path: scripts/in_container/_in_container_utils.sh
##########
@@ -16,6 +16,27 @@
 # specific language governing permissions and limitations
 # under the License.
 
+#######################################################################################################
+#
+# Adds trap to the traps already set.
+#
+# Arguments:
+#      trap to set
+#      .... list of signals to handle
+#######################################################################################################
+function add_trap() {
+    trap="${1}"
+    shift
+    for signal in "${@}"
+    do
+        # adding trap to exiting trap
+        local handlers
+        handlers="$( trap -p "${signal}" | cut -f2 -d \' )"
+        # shellcheck disable=SC2064
+        trap "${handlers}${handlers:+;}${trap}" "${signal}"
+    done
+}
+

Review comment:
       You need to duplicate the code from `_traps.sh`? Is there no better way?




----------------------------------------------------------------
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