diff --git a/.github/workflows/monai-deploy-express.yml b/.github/workflows/monai-deploy-express.yml index df63aee..3293635 100644 --- a/.github/workflows/monai-deploy-express.yml +++ b/.github/workflows/monai-deploy-express.yml @@ -12,6 +12,9 @@ on: default: 'monai-deploy-express-v' required: true type: string +# To address error 403 +permissions: + contents: write # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: diff --git a/.github/workflows/test-monai-deploy-express.yml b/.github/workflows/test-monai-deploy-express.yml index 5bedfc5..06949d7 100644 --- a/.github/workflows/test-monai-deploy-express.yml +++ b/.github/workflows/test-monai-deploy-express.yml @@ -1,5 +1,3 @@ -# This is a basic workflow to help you get started with Actions - name: Test MONAI Deploy Express on: push: @@ -9,6 +7,8 @@ on: workflow_dispatch: # Controls when the workflow will run +permissions: + contents: write # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -23,26 +23,43 @@ jobs: - uses: actions/checkout@v3 - name: Start MONAI Deploy Express + continue-on-error: true working-directory: ./deploy/monai-deploy-express run: | ./init.sh docker compose up --wait - name: Informatics Gateway Health Check - continue-on-error: true + continue-on-error: false run: | curl http://localhost:5000/health - name: Workflow Manager Health Check - continue-on-error: true + continue-on-error: false run: | curl http://localhost:5001/health - name: Task Manager Health Check - continue-on-error: true + continue-on-error: false run: | curl http://localhost:5002/health + - name: Get WorkflowID + continue-on-error: false + run: | + curl -X POST http://localhost:8042/instances --data-binary "@deploy/monai-deploy-express/sample-workflows/ci-test-files/IMG0002.dcm" + WORKFLOW_ID=$(curl --request POST --header 'Content-Type: application/json' --data @deploy/monai-deploy-express/sample-workflows/hello-world.json http://localhost:5001/workflows | jq '.workflow_id' ) + SIZE=${#WORKFLOW_ID} + echo "GITHUB_SIZE=$(echo $SIZE)" >> $GITHUB_ENV + if [[ $SIZE < 32 ]]; then + echo "WID=false" >> "$GITHUB_ENV" + echo "No WorkflowID" + exit 1 + else + echo "WID=true" >> "$GITHUB_ENV" + echo "WorkflowID Present" + fi + - name: Collect Logs working-directory: ./deploy/monai-deploy-express continue-on-error: true diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a490b61 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file diff --git a/deploy/monai-deploy-express/.env b/deploy/monai-deploy-express/.env index 5b080ad..da8224d 100644 --- a/deploy/monai-deploy-express/.env +++ b/deploy/monai-deploy-express/.env @@ -1,8 +1,8 @@ # Container Images INFORMATICS_GATEWAY_IMAGE=ghcr.io/project-monai/monai-deploy-informatics-gateway:0.4.1 INFORMATICS_GATEWAY_CONFIG_IMAGE=dwdraju/alpine-curl-jq:latest -WORKFLOW_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-workflow-manager:2023.5.0-beta.238 -TASK_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-task-manager:2023.5.0-beta.238 +WORKFLOW_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-workflow-manager:2023.5.0-beta.332 +TASK_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-task-manager:2023.5.0-beta.332 MINIO_IMAGE=minio/minio:RELEASE.2023-10-16T04-13-43Z MONGODB_IMAGE=mongo:5.0.12 @@ -98,7 +98,7 @@ KIBANA_CFG_IP=172.29.0.104 # Host Data Volume Paths INFORMATICS_GATEWAY_PAYLOADS=.md/mdig/payloads/ INFORMATICS_GATEWAY_DATABASE=.md/mdig/database/ -TASK_MANAGER_DATA=$PWD/.md/mdtm/ +TASK_MANAGER_DATA=${PWD}/.md/mdtm/ MONAI_DEPLOY_PLUGINS=plug-ins/ # disabled by default MINIO_DATA=.md/minio/data/ diff --git a/deploy/monai-deploy-express/configs/task-manager.json b/deploy/monai-deploy-express/configs/task-manager.json index 3a35f56..95666bc 100644 --- a/deploy/monai-deploy-express/configs/task-manager.json +++ b/deploy/monai-deploy-express/configs/task-manager.json @@ -21,19 +21,6 @@ }, }, "messaging": { - "retries": { - "retryDelays": "5" - }, - "topics": { - "workflowRequest": "md.workflow.request", - "exportComplete": "md.export.complete", - "exportRequestPrefix": "md.export.request", - "taskCallback": "md.tasks.callback" - }, - "dicomAgents": { - "dicomWebAgentName": "monaidicomweb", - "scuAgentName": "monaiscu" - }, "publisherServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ", "publisherSettings": { "endpoint": "rabbitmq", @@ -41,9 +28,9 @@ "password": "admin", "virtualHost": "monaideploy", "exchange": "monaideploy", - "deadLetterExchange": "deadLetterExchange", - "deliveryLimit": "5", - "requeueDelay": "0" + "deadLetterExchange": "deadletterExchange", + "deliveryLimit": 3, + "requeueDelay": 0 }, "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ", "subscriberSettings": { @@ -53,10 +40,25 @@ "virtualHost": "monaideploy", "exchange": "monaideploy", "deadLetterExchange": "monaideploy-dead-letter", - "exportRequestQueue": "export_tasks", "deliveryLimit": 3, - "requeueDelay": 30 - } + "requeueDelay": 3, + "exportRequestQueue": "export_tasks", + "prefetchCount": 5 + }, + "retries": { + "retryDelays": "localhost" + }, + "topics": { + "workflowRequest": "md.workflow.request", + "exportComplete": "md.export.complete", + "exportRequestPrefix": "md.export.request", + "taskCallback": "md.tasks.callback", + "exportHl7": "md.export.hl7" + }, + "dicomAgents": { + "dicomWebAgentName": "monaidicomweb", + "scuAgentName": "monaiscu" + }, }, "storage": { "serviceAssemblyName": "Monai.Deploy.Storage.MinIO.MinIoStorageService, Monai.Deploy.Storage.MinIO", @@ -71,52 +73,5 @@ "serviceName": "test" } } - }, - "Logging": { - "LogLevel": { - "Default": "Information", - "System": "Warning", - "Microsoft": "Warning", - "Microsoft.EntityFrameworkCore": "Warning", - "Microsoft.Hosting.Lifetime": "Information", - "Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker": "Error", - "Monai": "Debug" - }, - "Console": { - "FormatterOptions": { - "ColorBehavior": "Enabled", - "IncludeScopes": true, - "SingleLine": false, - "TimestampFormat": " HH:mm:ss ", - "UseUtcTimestamp": true - } - } - }, - "Serilog": { - "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ], - "Properties": { - "enviroment": "Production", - "serviceName": "MTM" - }, - "WriteTo": [ - { - "Name": "File", - "Args": { - "path": "logs/MTM-.log", - "rollingInterval": "Day", - "rollOnFileSizeLimit": true, - "fileSizeLimitBytes": "10485760", - "retainedFileCountLimit": 30, - "formatter": "Serilog.Formatting.Json.JsonFormatter, Serilog" - } - }, - { - "Name": "Http", - "Args": { - "requestUri": "http://logstash:50000", - "queueLimitBytes": null - } - } - ] } } diff --git a/deploy/monai-deploy-express/configs/workflow-manager.json b/deploy/monai-deploy-express/configs/workflow-manager.json index 112de1a..225dabd 100644 --- a/deploy/monai-deploy-express/configs/workflow-manager.json +++ b/deploy/monai-deploy-express/configs/workflow-manager.json @@ -28,7 +28,10 @@ "workflowRequest": "md.workflow.request", "exportComplete": "md.export.complete", "exportRequestPrefix": "md.export.request", - "callbackRequest": "md.tasks.callback" + "callbackRequest": "md.tasks.callback", + "aideClinicalReviewRequest": "aide.clinical_review.request", + "exportHl7": "md.export.hl7", + "exportHl7Complete": "md.export.hl7complete" }, "dicomAgents": { "dicomWebAgentName": "monaidicomweb", @@ -42,7 +45,7 @@ "virtualHost": "monaideploy", "exchange": "monaideploy", "deadLetterExchange": "deadLetterExchange", - "deliveryLimit": "5", + "deliveryLimit": "3", "requeueDelay": "0" }, "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ", @@ -55,7 +58,8 @@ "deadLetterExchange": "monaideploy-dead-letter", "exportRequestQueue": "export_tasks", "deliveryLimit": 3, - "requeueDelay": 30 + "requeueDelay": 3, + "prefetchCount": "5" } }, "storage": { @@ -72,7 +76,8 @@ } }, "dicomTagsDisallowed": "PatientName,PatientID,IssuerOfPatientID,TypeOfPatientID,IssuerOfPatientIDQualifiersSequence,SourcePatientGroupIdentificationSequence,GroupOfPatientsIdentificationSequence,SubjectRelativePositionInImage,PatientBirthDate,PatientBirthTime,PatientBirthDateInAlternativeCalendar,PatientDeathDateInAlternativeCalendar,PatientAlternativeCalendar,PatientSex,PatientInsurancePlanCodeSequence,PatientPrimaryLanguageCodeSequence,PatientPrimaryLanguageModifierCodeSequence,QualityControlSubject,QualityControlSubjectTypeCodeSequence,StrainDescription,StrainNomenclature,StrainStockNumber,StrainSourceRegistryCodeSequence,StrainStockSequence,StrainSource,StrainAdditionalInformation,StrainCodeSequence,GeneticModificationsSequence,GeneticModificationsDescription,GeneticModificationsNomenclature,GeneticModificationsCodeSequence,OtherPatientIDsRETIRED,OtherPatientNames,OtherPatientIDsSequence,PatientBirthName,PatientAge,PatientSize,PatientSizeCodeSequence,PatientBodyMassIndex,MeasuredAPDimension,MeasuredLateralDimension,PatientWeight,PatientAddress,InsurancePlanIdentificationRETIRED,PatientMotherBirthName,MilitaryRank,BranchOfService,MedicalRecordLocatorRETIRED,ReferencedPatientPhotoSequence,MedicalAlerts,Allergies,CountryOfResidence,RegionOfResidence,PatientTelephoneNumbers,PatientTelecomInformation,EthnicGroup,Occupation,SmokingStatus,AdditionalPatientHistory,PregnancyStatus,LastMenstrualDate,PatientReligiousPreference,PatientSpeciesDescription,PatientSpeciesCodeSequence,PatientSexNeutered,AnatomicalOrientationType,PatientBreedDescription,PatientBreedCodeSequence,BreedRegistrationSequence,BreedRegistrationNumber,BreedRegistryCodeSequence,ResponsiblePerson,ResponsiblePersonRole,ResponsibleOrganization,PatientComments,ExaminedBodyThickness", - "migExternalAppPlugins": [ "Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution.DicomDeidentifier, Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution, Version=0.0.0.0" ] + "migExternalAppPlugins": [ "Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution.DicomDeidentifier, Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution, Version=0.0.0.0" ], + "dataRetentionDays": 10 // note. -1 = never delete }, "InformaticsGateway": { "apiHost": "http://informatics-gateway:5000", diff --git a/deploy/monai-deploy-express/sample-workflows/ci-test-files/IMG0001.dcm b/deploy/monai-deploy-express/sample-workflows/ci-test-files/IMG0001.dcm new file mode 100644 index 0000000..a93f45b Binary files /dev/null and b/deploy/monai-deploy-express/sample-workflows/ci-test-files/IMG0001.dcm differ diff --git a/deploy/monai-deploy-express/sample-workflows/ci-test-files/IMG0002.dcm b/deploy/monai-deploy-express/sample-workflows/ci-test-files/IMG0002.dcm new file mode 100644 index 0000000..fb9f8f6 Binary files /dev/null and b/deploy/monai-deploy-express/sample-workflows/ci-test-files/IMG0002.dcm differ