Skip to content

Commit

Permalink
fix(risedev): don't kill tmux session unnecessarily (#16518)
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan authored May 1, 2024
1 parent 5b40139 commit 5789529
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 3 additions & 7 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -734,17 +733,14 @@ 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"
kill_kafka || true
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
Expand Down
3 changes: 0 additions & 3 deletions backwards-compat-tests/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5789529

Please sign in to comment.