Skip to content

Commit

Permalink
Merge pull request #419 from nodecross/feat/add-controller-for-remote…
Browse files Browse the repository at this point in the history
…-update

Feat/add controller for remote update
  • Loading branch information
tzskp1 authored Dec 26, 2024
2 parents a299c12 + 8ce2a92 commit 50a7868
Show file tree
Hide file tree
Showing 75 changed files with 6,415 additions and 1,701 deletions.
6 changes: 3 additions & 3 deletions .github/actions/e2e-mac/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ runs:
prism mock -h localhost -p 8020 test_resource/studio.yaml > studio.txt 2>&1 &
sleep 5
${{ inputs.binary-path }} > log.txt 2>&1 &
${{ inputs.binary-path }} controller > log.txt 2>&1 &
sleep 5
cd e2e
cargo test
pgrep -f nodex-agent | xargs kill -SIGINT
pgrep -f "nodex-agent controller" | xargs kill -SIGINT
sleep 5
if !grep -q "SIGINT" log.txt; then
echo "SIGINT not found in log."
exit 1
fi
pids=$(pgrep -f nodex-agent || true)
pids=$(pgrep -f "nodex-agent controller" || true)
# When executing pgrep, if the process does not exist, it exits; therefore, a solution for that is needed.
if [ -z "$pids" ]; then
echo "Process not found, as expected."
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/e2e-with-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
shell: bash
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
pid=$(docker exec $container_id pgrep -f nodex-agent)
pid=$(docker exec $container_id pgrep -f "nodex-agent controller")
docker exec $container_id kill -SIGINT $pid
sleep 3
Expand All @@ -53,7 +53,7 @@ runs:
if: steps.check_logs_for_sigint.outputs.stopped_found == 'true'
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
if ! docker exec $container_id pgrep -f /tmp/nodex-agent; then
if ! docker exec $container_id pgrep -f "/tmp/nodex-agent controller"; then
echo "Process not found, as expected."
else
echo "Process is still running, which is not expected."
Expand All @@ -70,7 +70,7 @@ runs:
shell: bash
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
pid=$(docker exec $container_id pgrep -f nodex-agent)
pid=$(docker exec $container_id pgrep -f "nodex-agent controller")
docker exec $container_id kill -SIGTERM $pid
sleep 3
Expand All @@ -89,7 +89,7 @@ runs:
if: steps.check_logs_for_sigterm.outputs.stopped_found == 'true'
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
if ! docker exec $container_id pgrep -f /tmp/nodex-agent; then
if ! docker exec $container_id pgrep -f "/tmp/nodex-agent controller"; then
echo "Process not found, as expected."
else
echo "Process is still running, which is not expected."
Expand Down
Loading

0 comments on commit 50a7868

Please sign in to comment.