From 57895290a8025ea410c2fdb72e27b05fdd411285 Mon Sep 17 00:00:00 2001 From: xxchan Date: Wed, 1 May 2024 14:12:36 +0800 Subject: [PATCH] fix(risedev): don't kill tmux session unnecessarily (#16518) Signed-off-by: xxchan --- Makefile.toml | 10 +++------- backwards-compat-tests/scripts/utils.sh | 3 --- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index c407350a8d34..910642dc8bea 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -720,10 +720,9 @@ if ! ${TMUX} ls &>/dev/null ; then exit 0 fi -# Kill other components +# Kill other components with Ctrl+C/Ctrl+D ${TMUX} list-windows -F "#{window_name} #{pane_id}" \ -| grep -v 'kafka' \ -| grep -v 'zookeeper' \ +| grep --invert-match --extended-regexp '(kafka|zookeeper)' \ | awk '{ print $2 }' \ | xargs -I {} ${TMUX} send-keys -t {} C-c C-d @@ -734,7 +733,7 @@ if [[ -n ${containers} ]]; then docker stop ${containers} fi -# Kill kafka and zookeeper +# Kill kafka cleanly. Ctrl+C will lose data. if [[ -n $(${TMUX} list-windows | grep kafka) ]]; then echo "kill kafka" @@ -742,9 +741,6 @@ then echo "kill zookeeper" kill_zookeeper || true - - # Kill their ${TMUX} sessions - ${TMUX} list-windows -t risedev -F "#{pane_id}" | xargs -I {} ${TMUX} send-keys -t {} C-c C-d fi ${TMUX} kill-server diff --git a/backwards-compat-tests/scripts/utils.sh b/backwards-compat-tests/scripts/utils.sh index 0fd3e3908ca6..ad4fd7faae9d 100644 --- a/backwards-compat-tests/scripts/utils.sh +++ b/backwards-compat-tests/scripts/utils.sh @@ -89,9 +89,6 @@ kill_cluster() { echo "kill zookeeper" kill_zookeeper - - # Kill their tmux sessions - $TMUX list-windows -t risedev -F "#{pane_id}" | xargs -I {} $TMUX send-keys -t {} C-c C-d fi set -e