diff --git a/README.md b/README.md index 647b765f..57413147 100644 --- a/README.md +++ b/README.md @@ -233,22 +233,16 @@ jobs: test: runs-on: ubuntu-24.04 steps: - - name: Build something else - uses: docker/build-push-action@v6 - with: - tags: localhost/fnndsc/pman:dev - load: true - name: Run ChRIS backend integration tests uses: FNNDSC/ChRIS_ultron_backEnd@master # all inputs are optional with: engine: docker # or podman command: test-integration # or test-unit, ... - # optionally change image used for pman, pfcon, or cube + # optionally change image used for pfcon, or cube env: CUBE_IMAGE: localhost/fnndsc/cube:dev PFCON_IMAGE: localhost/fnndsc/pfcon:dev - PMAN_IMAGE: localhost/fnndsc/pman:dev ``` ## Documentation diff --git a/chris_backend/plugininstances/services/manager.py b/chris_backend/plugininstances/services/manager.py index b7642b5d..985cf292 100644 --- a/chris_backend/plugininstances/services/manager.py +++ b/chris_backend/plugininstances/services/manager.py @@ -369,7 +369,7 @@ def delete_plugin_instance_job_from_remote(self): try: self._delete_job(job_id) except PfconRequestException as e: - if '404' in str(e): + if e.code == 404: logger.error(f'Job {job_id} not found in remote fcon ' f'url -->{self.pfcon_client.url}<--, detail: {str(e)}') if self.c_plugin_inst.error_code == 'CODE12': diff --git a/chris_backend/plugininstances/tests/test_manager.py b/chris_backend/plugininstances/tests/test_manager.py index 82f4f9c1..0f7afb43 100644 --- a/chris_backend/plugininstances/tests/test_manager.py +++ b/chris_backend/plugininstances/tests/test_manager.py @@ -172,7 +172,7 @@ def test_mananger_can_check_plugin_instance_app_exec_status(self): # } # post_mock.assert_called_with(msg) - @tag('integration', 'error-pman') + @tag('integration', 'error-pfcon') def test_integration_mananger_can_run_and_check_plugin_instance_app_exec_status(self): """ Test whether the manager can check a plugin's app execution status. diff --git a/chris_backend/plugininstances/tests/test_views.py b/chris_backend/plugininstances/tests/test_views.py index 3e8e757f..e0d9e341 100644 --- a/chris_backend/plugininstances/tests/test_views.py +++ b/chris_backend/plugininstances/tests/test_views.py @@ -672,7 +672,7 @@ def test_plugin_instance_detail_success(self): # # check that the check_plugin_instance_exec_status task was called with appropriate args # delay_mock.assert_called_with(self.pl_inst.id) - @tag('integration', 'error-pman') + @tag('integration', 'error-pfcon') def test_integration_plugin_instance_detail_success(self): # add an FS plugin to the system diff --git a/docker-compose.yml b/docker-compose.yml index a6ef9060..a7a6923c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -124,46 +124,32 @@ services: pfcon: image: ${PFCON_IMAGE:-ghcr.io/fnndsc/pfcon:latest} environment: - COMPUTE_SERVICE_URL: http://pman:5010/api/v1/ SECRET_KEY: secret PFCON_USER: pfcon PFCON_PASSWORD: pfcon1234 PFCON_INNETWORK: "true" STORAGE_ENV: "fslink" STOREBASE_MOUNT: /var/local/storeBase + CONTAINER_ENV: docker + CONTAINER_USER: "${UID}:${GID}" + ENABLE_HOME_WORKAROUND: "yes" + JOB_LABELS: "org.chrisproject.miniChRIS=plugininstance" + REMOVE_JOBS: "yes" # port is hard-coded in chris_backend/config/settings/local.py command: gunicorn -b 0.0.0.0:30005 -w 8 -t 120 pfcon.wsgi:application ports: - "30005:30005" volumes: - chris_files:/var/local/storeBase - user: ${UID}:${GID} + - "${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock" networks: local: aliases: - pfcon.remote # hard-coded in chris_backend/config/settings/local.py + userns_mode: "host" labels: org.chrisproject.role: "pfcon" - pman: - image: ${PMAN_IMAGE:-ghcr.io/fnndsc/pman:latest} - environment: - CONTAINER_ENV: docker - CONTAINER_USER: "${UID}:${GID}" - ENABLE_HOME_WORKAROUND: "yes" - JOB_LABELS: "org.chrisproject.miniChRIS=plugininstance" - SECRET_KEY: secret - REMOVE_JOBS: "yes" - volumes: - - "${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock" - depends_on: - - pfcon - ports: - - "5010:5010" - networks: - - local - userns_mode: "host" - nats: image: docker.io/library/nats:2.10.20-alpine3.20 ports: diff --git a/justfile b/justfile index 509ffef4..f0f508dd 100644 --- a/justfile +++ b/justfile @@ -81,7 +81,7 @@ nuke: reap-plugin-instances (docker-compose '--profile=cube --profile=tools down # Remove all plugin instance containers. [group('(2) shutdown')] -reap-plugin-instances: (docker-compose 'run --rm pman python -c' ''' +reap-plugin-instances: (docker-compose 'run --rm pfcon python -c' ''' ' import os import docker diff --git a/requirements/base.txt b/requirements/base.txt index 6999750e..bdbb9074 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -9,7 +9,7 @@ django-storage-swift==1.4.0 celery==5.5.2 django-celery-beat==2.8.1 python-chrisstoreclient==1.0.0 -python-pfconclient==3.2.0 +python-pfconclient==3.3.0 django-auth-ldap==5.2.0 PyYAML==6.0.2 whitenoise[brotli]==6.9.0