Skip to content

Commit

Permalink
feat: add docker cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
earayu committed Nov 6, 2024
1 parent 9ed44af commit 81b45ca
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/wescale_wesql_performance_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
cd ./examples/wesql-server
./init_single_node_cluster.sh 2>&1 | tee init_script_logs.txt &
- name: Check Vitess Tablets
- name: Print WeScale Logs
if: always()
run: |
# Attempt to connect and execute command, display logs if failed
Expand All @@ -62,6 +62,7 @@ jobs:

- name: Build mysql-tester
run: |
pwd
cd ./mysql-tester && \
mkdir bin && \
make build
Expand All @@ -84,4 +85,33 @@ jobs:
exit 1
else
echo "Testcase is successful"
fi
fi
- name: Install Tmate
if: always()
run: sudo apt-get install tmate

- name: Start Tmate session
if: always()
run: |
tmate -S /tmp/tmate.sock new-session -d
tmate -S /tmp/tmate.sock wait tmate-ready
echo "SSH access: $(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}')"
echo "Web access: $(tmate -S /tmp/tmate.sock display -p '#{tmate_web}')"
TIMEOUT=1800 # 30 minutes
INTERVAL=1 # 1 second
START_TIME=$(date +%s)
while true; do
sleep "$INTERVAL"
CURRENT_TIME=$(date +%s)
ELAPSED_TIME=$((CURRENT_TIME - START_TIME))
# Check if timeout is reached
if [ "$ELAPSED_TIME" -ge "$TIMEOUT" ]; then
echo "Timeout reached while waiting for the container."
break
fi
done
continue-on-error: true

0 comments on commit 81b45ca

Please sign in to comment.