-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github Action for GlobusComputeExecutor (#3619)
* Support for testing GlobusComputeExecutor in a github action * Adding shared_fs and staging_required tags to tests * Adding GlobusComputeExecutor test config
- Loading branch information
Showing
11 changed files
with
139 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: GlobusComputeExecutor tests | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
jobs: | ||
main-test-suite: | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Collect Job Information | ||
id: job-info | ||
run: | | ||
echo "Python Version: ${{ matrix.python-version }}" >> ci_job_info.txt | ||
echo "CI Triggering Event: ${{ github.event_name }}" >> ci_job_info.txt | ||
echo "Triggering Git Ref: ${{ github.ref }}" >> ci_job_info.txt | ||
echo "Triggering Git SHA: ${{ github.sha }}" >> ci_job_info.txt | ||
echo "Workflow Run: ${{ github.run_number }}" >> ci_job_info.txt | ||
echo "Workflow Attempt: ${{ github.run_attempt }}" >> ci_job_info.txt | ||
as_ascii="$(echo "${{ github.ref_name }}" | perl -pe "s/[^A-z0-9-]+/-/g; s/^-+|-+\$//g; s/--+/-/g;")" | ||
echo "as-ascii=$as_ascii" >> $GITHUB_OUTPUT | ||
- name: Non-requirements based install | ||
run: | | ||
# libpython3.5: make workqueue binary installer happy | ||
# mpich: required by radical executor | ||
sudo apt-get update -q | ||
sudo apt-get install -qy libpython3.5 mpich | ||
- name: setup virtual env | ||
run: | | ||
make virtualenv | ||
source .venv/bin/activate | ||
- name: make deps clean_coverage | ||
run: | | ||
source .venv/bin/activate | ||
make deps | ||
make clean_coverage | ||
# Temporary fix, until changes make it into compute releases | ||
git clone -b configure_tasks_working_dir https://github.com/globus/globus-compute.git | ||
pip3 install globus-compute/compute_sdk globus-compute/compute_endpoint | ||
- name: start globus_compute_endpoint | ||
env: | ||
GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GLOBUS_COMPUTE_CLIENT_ID }} | ||
GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GLOBUS_COMPUTE_SECRET_KEY }} | ||
run: | | ||
source /home/runner/work/parsl/parsl/.venv/bin/activate | ||
globus-compute-endpoint configure default | ||
which globus-compute-endpoint | ||
python3 -c "import globus_compute_sdk; print(globus_compute_sdk.__version__)" | ||
python3 -c "import globus_compute_endpoint; print(globus_compute_endpoint.__version__)" | ||
cat << EOF > /home/runner/.globus_compute/default/config.yaml | ||
engine: | ||
type: ThreadPoolEngine | ||
max_workers: 4 | ||
working_dir: /home/runner/.globus_compute/default/tasks_working_dir | ||
EOF | ||
cat /home/runner/.globus_compute/default/config.yaml | ||
mkdir ~/.globus_compute/default/tasks_working_dir | ||
globus-compute-endpoint start default | ||
globus-compute-endpoint list | ||
- name: make test | ||
env: | ||
GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GLOBUS_COMPUTE_CLIENT_ID }} | ||
GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GLOBUS_COMPUTE_SECRET_KEY }} | ||
run: | | ||
source .venv/bin/activate | ||
export GLOBUS_COMPUTE_ENDPOINT=$(globus-compute-endpoint list | grep default | cut -c 3-38) | ||
echo "GLOBUS_COMPUTE_ENDPOINT = $GLOBUS_COMPUTE_ENDPOINT" | ||
# temporary; until test-matrixification | ||
export PARSL_TEST_PRESERVE_NUM_RUNS=7 | ||
make gce_test | ||
ln -s .pytest/parsltest-current test_runinfo | ||
- name: Archive runinfo logs | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: runinfo-${{ matrix.python-version }}-${{ steps.job-info.outputs.as-ascii }}-${{ github.sha }} | ||
path: | | ||
runinfo/ | ||
.pytest/ | ||
ci_job_info.txt | ||
compression-level: 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
|
||
from parsl.config import Config | ||
from parsl.executors import GlobusComputeExecutor | ||
|
||
|
||
def fresh_config(): | ||
|
||
endpoint_id = os.environ["GLOBUS_COMPUTE_ENDPOINT"] | ||
|
||
return Config( | ||
executors=[ | ||
GlobusComputeExecutor( | ||
label="globus_compute", | ||
endpoint_id=endpoint_id | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters