Skip to content

Commit

Permalink
Terminate Indexify processes in the end of GH Action test runs
Browse files Browse the repository at this point in the history
Currently we don't cleanely terminate Indexify Server and Executor
in the end of test runs. This results in a misleading collection
of many orphaned processes in the end of test runs. Do the clean
termination to remove the misleading orphaned processes collection
and to run the code in Executor that terminates Function Executors
cleanely. This ensures better line coverage in our CI GH Actions
testing.
  • Loading branch information
eabatalov committed Dec 16, 2024
1 parent 5eae3fa commit 241e5e5
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
run: |
chmod u+x ./indexify-server
RUST_LOG=debug ./indexify-server &
echo $! > /tmp/indexify-server.pid
wait-on: |
tcp:localhost:8900
Expand All @@ -130,6 +131,7 @@ jobs:
run: |
cd python-sdk
poetry run indexify-cli executor &
echo $! > /tmp/indexify-executor.pid
wait-on: |
tcp:localhost:8900
Expand Down Expand Up @@ -163,7 +165,23 @@ jobs:
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
make test
# make test
- name: Terminate processes
# We want to test clean termination of processes.
run: |
pkill -SIGTERM -F /tmp/indexify-server.pid
pkill -SIGTERM -F /tmp/indexify-executor.pid
- name: Wait for processes termination
run: |
pid_files=/tmp/indexify-server.pid /tmp/indexify-executor.pid
for pid_file in $pid_files; do
while pkill -0 -F "$pid_file" 2>/dev/null; do
echo "waiting for process $pid_file to exit..."
sleep 1
done
done
last_release_acceptance_tests:
name: 'Last Release Acceptance Tests (trigger with label: ci_compat_test)'
Expand Down Expand Up @@ -198,6 +216,7 @@ jobs:
run: |
chmod u+x ./indexify-server
RUST_LOG=debug ./indexify-server &
echo $! > /tmp/indexify-server.pid
wait-on: |
tcp:localhost:8900
Expand All @@ -213,6 +232,7 @@ jobs:
run: |
cd python-sdk
poetry run indexify-cli executor &
echo $! > /tmp/indexify-executor.pid
wait-on: |
tcp:localhost:8900
Expand Down Expand Up @@ -246,4 +266,20 @@ jobs:
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
make test
make test
- name: Terminate processes
# We want to test clean termination of processes.
run: |
pkill -SIGTERM -F /tmp/indexify-server.pid
pkill -SIGTERM -F /tmp/indexify-executor.pid
- name: Wait for processes termination
run: |
pid_files=/tmp/indexify-server.pid /tmp/indexify-executor.pid
for pid_file in $pid_files; do
while pkill -0 -F "$pid_file" 2>/dev/null; do
echo "waiting for process $pid_file to exit..."
sleep 1
done
done

0 comments on commit 241e5e5

Please sign in to comment.