Skip to content

Commit

Permalink
Merge branch 'master' into squeue-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Aug 20, 2024
2 parents 64bcfd3 + c5ffb08 commit 5034aef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ci/pbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cd -
docker exec pbs_master /bin/bash -c "chmod -R 777 /shared_space"
docker exec pbs_master /bin/bash -c "chown -R pbsuser:pbsuser /home/pbsuser"

docker exec pbs_master /bin/bash -c "yum install -y procps"
docker exec pbs_master /bin/bash -c "cd /dpdispatcher && pip install uv && uv pip install --system .[test] coverage && chown -R pbsuser ."
docker exec -u pbsuser pbs_master /bin/bash -c "cd /dpdispatcher && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
docker exec -u pbsuser --env-file <(env | grep GITHUB) pbs_master /bin/bash -c "cd /dpdispatcher && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov"
1 change: 1 addition & 0 deletions ci/slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ docker compose pull
./start-slurm.sh
cd -

docker exec slurmctld /bin/bash -c "yum install -y procps"
docker exec slurmctld /bin/bash -c "cd dpdispatcher && pip install uv && uv pip install --system .[test] coverage && coverage run --source=./dpdispatcher -m unittest -v && coverage report"
docker exec --env-file <(env | grep -e GITHUB -e CODECOV) slurmctld /bin/bash -c "cd dpdispatcher && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov"
5 changes: 4 additions & 1 deletion dpdispatcher/machines/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ def check_status(self, job):
return JobStatus.unsubmitted

# mark defunct process as terminated
cmd = f"if ps -p {job_id} > /dev/null && ! (ps -o command -p {job_id} | grep defunct >/dev/null) ; then echo 1; fi"
cmd = (
r"""command -v ps >/dev/null 2>&1 || { echo >&2 "I require ps but it's not installed. Aborting."; exit 1; };"""
f"if ps -p {job_id} > /dev/null && ! (ps -o command -p {job_id} | grep defunct >/dev/null) ; then echo 1; fi"
)
ret, stdin, stdout, stderr = self.context.block_call(
cmd
)
Expand Down

0 comments on commit 5034aef

Please sign in to comment.