From 84061ceff2caa924ad81c9dc1f0c6a0e8dc3ff09 Mon Sep 17 00:00:00 2001 From: Neil South Date: Wed, 1 Nov 2023 17:15:58 +0000 Subject: [PATCH 01/10] enhancing current export to fill in new message type Signed-off-by: Neil South --- ...orkflowManager.Common.Configuration.csproj | 5 +- src/Common/Configuration/packages.lock.json | 21 ++++----- src/Common/Miscellaneous/packages.lock.json | 22 ++++----- src/Monai.Deploy.WorkflowManager.sln | 12 +++++ ...loy.WorkflowManager.TaskManager.API.csproj | 6 ++- src/TaskManager/API/packages.lock.json | 21 ++++----- src/TaskManager/Database/packages.lock.json | 22 ++++----- .../AideClinicalReview/packages.lock.json | 24 +++++----- .../Plug-ins/Argo/packages.lock.json | 24 +++++----- ....Deploy.WorkflowManager.TaskManager.csproj | 4 +- .../TaskManager/packages.lock.json | 24 +++++----- ...ai.Deploy.WorkflowManager.Contracts.csproj | 5 +- .../Repositories/ArtifactsRepository.cs | 3 +- .../Database/packages.lock.json | 22 ++++----- .../Logging/packages.lock.json | 22 ++++----- .../PayloadListener/packages.lock.json | 26 +++++------ .../Services/packages.lock.json | 24 +++++----- .../Storage/packages.lock.json | 22 ++++----- .../WorkflowExecuter/Common/EventMapper.cs | 3 +- .../WorkflowExecuter/packages.lock.json | 24 +++++----- .../Monai.Deploy.WorkflowManager.csproj | 4 +- .../WorkflowManager/packages.lock.json | 45 ++++++++---------- ...anager.TaskManager.IntegrationTests.csproj | 4 +- ...r.WorkflowExecutor.IntegrationTests.csproj | 7 ++- .../Services/WorkflowExecuterServiceTests.cs | 5 ++ .../WorkflowManager.Tests/packages.lock.json | 46 +++++++++---------- 26 files changed, 217 insertions(+), 230 deletions(-) diff --git a/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj b/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj index 60bcb55a2..7106c58c9 100644 --- a/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj +++ b/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj @@ -31,7 +31,6 @@ - @@ -45,6 +44,10 @@ + + + + true true diff --git a/src/Common/Configuration/packages.lock.json b/src/Common/Configuration/packages.lock.json index 185e07f7a..77e5c324d 100644 --- a/src/Common/Configuration/packages.lock.json +++ b/src/Common/Configuration/packages.lock.json @@ -2,18 +2,6 @@ "version": 1, "dependencies": { "net6.0": { - "Monai.Deploy.Messaging": { - "type": "Direct", - "requested": "[1.0.4, )", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Direct", "requested": "[0.2.18, )", @@ -136,6 +124,15 @@ "type": "Transitive", "resolved": "6.0.0", "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } } } } diff --git a/src/Common/Miscellaneous/packages.lock.json b/src/Common/Miscellaneous/packages.lock.json index 533255609..7237cb1fa 100644 --- a/src/Common/Miscellaneous/packages.lock.json +++ b/src/Common/Miscellaneous/packages.lock.json @@ -144,17 +144,6 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -233,10 +222,19 @@ "resolved": "6.0.0", "contentHash": "TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } } diff --git a/src/Monai.Deploy.WorkflowManager.sln b/src/Monai.Deploy.WorkflowManager.sln index fbc226aa9..c64642007 100644 --- a/src/Monai.Deploy.WorkflowManager.sln +++ b/src/Monai.Deploy.WorkflowManager.sln @@ -90,6 +90,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.WorkflowManage EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.WorkflowManager.Services", "WorkflowManager\Services\Monai.Deploy.WorkflowManager.Services.csproj", "{76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.Messaging", "..\..\monai-deploy-messaging\src\Messaging\Monai.Deploy.Messaging.csproj", "{03923799-9ACE-4527-8DDA-EB18978EFE96}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.Messaging.RabbitMQ", "..\..\monai-deploy-messaging\src\Plugins\RabbitMQ\Monai.Deploy.Messaging.RabbitMQ.csproj", "{B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -252,6 +256,14 @@ Global {76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}.Debug|Any CPU.Build.0 = Debug|Any CPU {76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}.Release|Any CPU.ActiveCfg = Release|Any CPU {76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}.Release|Any CPU.Build.0 = Release|Any CPU + {03923799-9ACE-4527-8DDA-EB18978EFE96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03923799-9ACE-4527-8DDA-EB18978EFE96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03923799-9ACE-4527-8DDA-EB18978EFE96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03923799-9ACE-4527-8DDA-EB18978EFE96}.Release|Any CPU.Build.0 = Release|Any CPU + {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj b/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj index 8c3ba19cd..d66166cae 100644 --- a/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj +++ b/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj @@ -39,9 +39,11 @@ - - + + + + diff --git a/src/TaskManager/API/packages.lock.json b/src/TaskManager/API/packages.lock.json index 616240540..0031bc500 100755 --- a/src/TaskManager/API/packages.lock.json +++ b/src/TaskManager/API/packages.lock.json @@ -2,18 +2,6 @@ "version": 1, "dependencies": { "net6.0": { - "Monai.Deploy.Messaging": { - "type": "Direct", - "requested": "[1.0.4, )", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Mongo.Migration": { "type": "Direct", "requested": "[3.1.4, )", @@ -640,6 +628,15 @@ "type": "Transitive", "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" + }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } } } } diff --git a/src/TaskManager/Database/packages.lock.json b/src/TaskManager/Database/packages.lock.json index d2b62f9dc..146ad8458 100755 --- a/src/TaskManager/Database/packages.lock.json +++ b/src/TaskManager/Database/packages.lock.json @@ -245,17 +245,6 @@ "System.Security.Principal.Windows": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Mongo.Migration": { "type": "Transitive", "resolved": "3.1.4", @@ -681,10 +670,19 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json b/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json index 38d3aec6f..e316db0c3 100644 --- a/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json +++ b/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json @@ -256,17 +256,6 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -730,10 +719,19 @@ "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -747,7 +745,7 @@ "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/TaskManager/Plug-ins/Argo/packages.lock.json b/src/TaskManager/Plug-ins/Argo/packages.lock.json index caa66d3de..b6dfa2240 100644 --- a/src/TaskManager/Plug-ins/Argo/packages.lock.json +++ b/src/TaskManager/Plug-ins/Argo/packages.lock.json @@ -366,17 +366,6 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -868,10 +857,19 @@ "resolved": "13.3.1", "contentHash": "Q2dqDsb0xAlr092grgHk8/vTXI2snIiYM5ND3IXkgJDFIdPnqDYwYnlk+gwzSeRByDLhiSzTog8uT7xFwH68Zg==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -885,7 +883,7 @@ "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj b/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj index bb3074898..aacf775d5 100644 --- a/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj +++ b/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj @@ -61,9 +61,6 @@ true - - true - true @@ -88,6 +85,7 @@ + true diff --git a/src/TaskManager/TaskManager/packages.lock.json b/src/TaskManager/TaskManager/packages.lock.json index 4682facfe..a99adaa9b 100644 --- a/src/TaskManager/TaskManager/packages.lock.json +++ b/src/TaskManager/TaskManager/packages.lock.json @@ -535,17 +535,6 @@ "System.Reactive.Linq": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -1135,10 +1124,19 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -1160,7 +1158,7 @@ "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj b/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj index a988250e4..2f41d39e0 100644 --- a/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj +++ b/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj @@ -38,8 +38,11 @@ - + + + + diff --git a/src/WorkflowManager/Database/Repositories/ArtifactsRepository.cs b/src/WorkflowManager/Database/Repositories/ArtifactsRepository.cs index ea2bd57ea..956e8b656 100644 --- a/src/WorkflowManager/Database/Repositories/ArtifactsRepository.cs +++ b/src/WorkflowManager/Database/Repositories/ArtifactsRepository.cs @@ -22,7 +22,6 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Monai.Deploy.WorkflowManager.Common.Database.Options; -using MongoDB.Bson; using MongoDB.Driver; using Artifact = Monai.Deploy.Messaging.Common.Artifact; @@ -46,7 +45,7 @@ public static ArtifactReceivedDetails FromArtifact(Artifact artifact) => public class ArtifactReceivedItems { - public string Id { get; set; } + public string Id { get; set; } = string.Empty; /// /// Gets or Sets WorkflowInstanceId. diff --git a/src/WorkflowManager/Database/packages.lock.json b/src/WorkflowManager/Database/packages.lock.json index c755c997f..ddd22e3af 100755 --- a/src/WorkflowManager/Database/packages.lock.json +++ b/src/WorkflowManager/Database/packages.lock.json @@ -267,17 +267,6 @@ "System.Security.Principal.Windows": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "MongoDB.Bson": { "type": "Transitive", "resolved": "2.21.0", @@ -682,10 +671,19 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/Logging/packages.lock.json b/src/WorkflowManager/Logging/packages.lock.json index 3d96aac6b..4ca609e56 100755 --- a/src/WorkflowManager/Logging/packages.lock.json +++ b/src/WorkflowManager/Logging/packages.lock.json @@ -208,17 +208,6 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Mongo.Migration": { "type": "Transitive", "resolved": "3.1.4", @@ -638,10 +627,19 @@ "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/PayloadListener/packages.lock.json b/src/WorkflowManager/PayloadListener/packages.lock.json index 3cc1bdc9a..decd50eaa 100644 --- a/src/WorkflowManager/PayloadListener/packages.lock.json +++ b/src/WorkflowManager/PayloadListener/packages.lock.json @@ -268,17 +268,6 @@ "System.Security.Principal.Windows": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -768,6 +757,15 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -779,7 +777,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -802,7 +800,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } @@ -830,7 +828,7 @@ "Monai.Deploy.WorkflowManager.Logging": "[1.0.0, )" } }, - "Monai.Deploy.WorkloadManager.WorkflowExecuter": { + "monai.deploy.workloadmanager.workflowexecuter": { "type": "Project", "dependencies": { "Monai.Deploy.WorkflowManager.Common": "[1.0.0, )", diff --git a/src/WorkflowManager/Services/packages.lock.json b/src/WorkflowManager/Services/packages.lock.json index 5e228295f..76c0e129e 100644 --- a/src/WorkflowManager/Services/packages.lock.json +++ b/src/WorkflowManager/Services/packages.lock.json @@ -247,17 +247,6 @@ "System.Security.Principal.Windows": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -722,6 +711,15 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -733,14 +731,14 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/Storage/packages.lock.json b/src/WorkflowManager/Storage/packages.lock.json index 0cf7faadc..382416b00 100755 --- a/src/WorkflowManager/Storage/packages.lock.json +++ b/src/WorkflowManager/Storage/packages.lock.json @@ -233,17 +233,6 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage.S3Policy": { "type": "Transitive", "resolved": "0.2.18", @@ -672,10 +661,19 @@ "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs b/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs index 8183d850e..0f4417cda 100644 --- a/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs +++ b/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs @@ -192,7 +192,8 @@ public static ExportRequestEvent ToExportRequestEvent( ExportTaskId = taskId, CorrelationId = correlationId, Files = dicomImages, - Destinations = exportDestinations + Destinations = exportDestinations, + Target = new DataOrigin { DataService = DataService.DIMSE, Destination = exportDestinations[0] } }; request.PluginAssemblies.AddRange(plugins); return request; diff --git a/src/WorkflowManager/WorkflowExecuter/packages.lock.json b/src/WorkflowManager/WorkflowExecuter/packages.lock.json index 759e2a5d7..bcd3406c9 100644 --- a/src/WorkflowManager/WorkflowExecuter/packages.lock.json +++ b/src/WorkflowManager/WorkflowExecuter/packages.lock.json @@ -268,17 +268,6 @@ "System.Security.Principal.Windows": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -768,6 +757,15 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -779,7 +777,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -802,7 +800,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj b/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj index 90f183156..f0cf8b3fe 100644 --- a/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj +++ b/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj @@ -46,9 +46,6 @@ true - - true - true @@ -72,6 +69,7 @@ + diff --git a/src/WorkflowManager/WorkflowManager/packages.lock.json b/src/WorkflowManager/WorkflowManager/packages.lock.json index 4cf5bba1b..1e2ef4eed 100755 --- a/src/WorkflowManager/WorkflowManager/packages.lock.json +++ b/src/WorkflowManager/WorkflowManager/packages.lock.json @@ -23,17 +23,6 @@ "Newtonsoft.Json.Bson": "1.0.2" } }, - "Monai.Deploy.Messaging.RabbitMQ": { - "type": "Direct", - "requested": "[1.0.4, )", - "resolved": "1.0.4", - "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==", - "dependencies": { - "Monai.Deploy.Messaging": "1.0.4", - "Polly": "7.2.4", - "RabbitMQ.Client": "6.5.0" - } - }, "Monai.Deploy.Security": { "type": "Direct", "requested": "[0.1.3, )", @@ -483,17 +472,6 @@ "System.Reactive.Linq": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -1048,6 +1026,23 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, + "monai.deploy.messaging.rabbitmq": { + "type": "Project", + "dependencies": { + "Monai.Deploy.Messaging": "[0.1.0, )", + "Polly": "[7.2.4, )", + "RabbitMQ.Client": "[6.5.0, )" + } + }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -1059,7 +1054,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -1082,7 +1077,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } @@ -1135,7 +1130,7 @@ "Monai.Deploy.WorkflowManager.Logging": "[1.0.0, )" } }, - "Monai.Deploy.WorkloadManager.WorkflowExecuter": { + "monai.deploy.workloadmanager.workflowexecuter": { "type": "Project", "dependencies": { "Monai.Deploy.WorkflowManager.Common": "[1.0.0, )", diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj b/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj index a937adff8..f79ef9076 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj @@ -27,8 +27,6 @@ - - @@ -42,9 +40,11 @@ + + diff --git a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj index 2027038fd..fe4468e10 100644 --- a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj +++ b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj @@ -34,8 +34,6 @@ - - @@ -51,6 +49,11 @@ + + + + + PayloadApi.feature diff --git a/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs b/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs index d7fdb1048..9b726b4a6 100644 --- a/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs +++ b/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs @@ -704,6 +704,11 @@ public async Task ProcessPayload_WithExportTask_DispatchesExport() var body = Encoding.UTF8.GetString(messageSent?.Body); var exportMessageBody = JsonConvert.DeserializeObject(body); Assert.Empty(exportMessageBody!.PluginAssemblies); + + var exportEventMessage = messageSent.ConvertTo(); + Assert.NotNull(exportEventMessage.Target); + Assert.Equal(DataService.DIMSE, exportEventMessage.Target.DataService); + #pragma warning restore CS8604 // Possible null reference argument. } diff --git a/tests/UnitTests/WorkflowManager.Tests/packages.lock.json b/tests/UnitTests/WorkflowManager.Tests/packages.lock.json index a00502e21..047823ab7 100755 --- a/tests/UnitTests/WorkflowManager.Tests/packages.lock.json +++ b/tests/UnitTests/WorkflowManager.Tests/packages.lock.json @@ -508,27 +508,6 @@ "System.Reactive.Linq": "5.0.0" } }, - "Monai.Deploy.Messaging": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==", - "dependencies": { - "Ardalis.GuardClauses": "4.1.1", - "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", - "Newtonsoft.Json": "13.0.3", - "System.IO.Abstractions": "17.2.3" - } - }, - "Monai.Deploy.Messaging.RabbitMQ": { - "type": "Transitive", - "resolved": "1.0.4", - "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==", - "dependencies": { - "Monai.Deploy.Messaging": "1.0.4", - "Polly": "7.2.4", - "RabbitMQ.Client": "6.5.0" - } - }, "Monai.Deploy.Security": { "type": "Transitive", "resolved": "0.1.3", @@ -1859,12 +1838,29 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, + "monai.deploy.messaging": { + "type": "Project", + "dependencies": { + "Ardalis.GuardClauses": "[4.1.1, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", + "Newtonsoft.Json": "[13.0.3, )", + "System.IO.Abstractions": "[17.2.3, )" + } + }, + "monai.deploy.messaging.rabbitmq": { + "type": "Project", + "dependencies": { + "Monai.Deploy.Messaging": "[0.1.0, )", + "Polly": "[7.2.4, )", + "RabbitMQ.Client": "[6.5.0, )" + } + }, "monai.deploy.workflowmanager": { "type": "Project", "dependencies": { "AspNetCore.HealthChecks.MongoDb": "[6.0.2, )", "Microsoft.AspNetCore.Mvc.NewtonsoftJson": "[6.0.22, )", - "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )", + "Monai.Deploy.Messaging.RabbitMQ": "[0.1.0, )", "Monai.Deploy.Security": "[0.1.3, )", "Monai.Deploy.Storage.MinIO": "[0.2.18, )", "Monai.Deploy.WorkflowManager.Common.Configuration": "[1.0.0, )", @@ -1892,7 +1888,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -1915,7 +1911,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[1.0.4, )", + "Monai.Deploy.Messaging": "[0.1.0, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } @@ -1968,7 +1964,7 @@ "Monai.Deploy.WorkflowManager.Logging": "[1.0.0, )" } }, - "Monai.Deploy.WorkloadManager.WorkflowExecuter": { + "monai.deploy.workloadmanager.workflowexecuter": { "type": "Project", "dependencies": { "Monai.Deploy.WorkflowManager.Common": "[1.0.0, )", From 616beee7f354c47e6548c7f456f9416e4c2562bc Mon Sep 17 00:00:00 2001 From: Neil South Date: Tue, 14 Nov 2023 14:55:22 +0000 Subject: [PATCH 02/10] new externalApp Queue Signed-off-by: Neil South --- .../MessageBrokerConfigurationKeys.cs | 7 ++ .../Contracts/Constants/TaskTypeConstants.cs | 2 + .../WorkflowExecuter/Common/EventMapper.cs | 30 ++++++++ .../Services/WorkflowExecuterService.cs | 72 +++++++++++++++++-- .../WorkflowManager/Services/Http/Startup.cs | 22 ++++++ 5 files changed, 127 insertions(+), 6 deletions(-) diff --git a/src/Common/Configuration/MessageBrokerConfigurationKeys.cs b/src/Common/Configuration/MessageBrokerConfigurationKeys.cs index 886497f27..bd8e48bf6 100644 --- a/src/Common/Configuration/MessageBrokerConfigurationKeys.cs +++ b/src/Common/Configuration/MessageBrokerConfigurationKeys.cs @@ -91,5 +91,12 @@ public class MessageBrokerConfigurationKeys [ConfigurationKeyName("artifactrecieved")] public string ArtifactRecieved { get; set; } = "md.workflow.artifactrecieved"; + + /// + /// Gets or sets the topic for publishing export requests. + /// Defaults to `md_export_request`. + /// + [ConfigurationKeyName("externalAppRequest")] + public string ExternalAppRequest { get; set; } = "md.externalapp.request"; } } diff --git a/src/WorkflowManager/Contracts/Constants/TaskTypeConstants.cs b/src/WorkflowManager/Contracts/Constants/TaskTypeConstants.cs index 32632a8a3..1496763da 100644 --- a/src/WorkflowManager/Contracts/Constants/TaskTypeConstants.cs +++ b/src/WorkflowManager/Contracts/Constants/TaskTypeConstants.cs @@ -23,5 +23,7 @@ public static class TaskTypeConstants public const string ExportTask = "export"; public const string ExternalAppTask = "remote_app_execution"; + + public const string ExportHl7Task = "export_hl7"; } } diff --git a/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs b/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs index 0f4417cda..8d9391e5f 100644 --- a/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs +++ b/src/WorkflowManager/WorkflowExecuter/Common/EventMapper.cs @@ -198,5 +198,35 @@ public static ExportRequestEvent ToExportRequestEvent( request.PluginAssemblies.AddRange(plugins); return request; } + + public static ExternalAppRequestEvent ToExternalAppRequestEvent( + IList dicomImages, + List exportDestinations, + string taskId, + string workflowInstanceId, + string correlationId, + string destinationFolder, + List? plugins = null) + { + plugins ??= new List(); + + Guard.Against.NullOrWhiteSpace(taskId, nameof(taskId)); + Guard.Against.NullOrWhiteSpace(workflowInstanceId, nameof(workflowInstanceId)); + Guard.Against.NullOrWhiteSpace(correlationId, nameof(correlationId)); + Guard.Against.NullOrEmpty(dicomImages, nameof(dicomImages)); + Guard.Against.NullOrEmpty(exportDestinations, nameof(exportDestinations)); + + var request = new ExternalAppRequestEvent + { + WorkflowInstanceId = workflowInstanceId, + ExportTaskId = taskId, + CorrelationId = correlationId, + Files = dicomImages, + Targets = exportDestinations, + DestinationFolder = destinationFolder + }; + request.PluginAssemblies.AddRange(plugins); + return request; + } } } diff --git a/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs b/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs index 7b4072c35..2d35a683a 100644 --- a/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs +++ b/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs @@ -60,6 +60,7 @@ public class WorkflowExecuterService : IWorkflowExecuterService private string TaskDispatchRoutingKey { get; } private string ExportRequestRoutingKey { get; } + private string ExternalAppRoutingKey { get; } private string ClinicalReviewTimeoutRoutingKey { get; } public WorkflowExecuterService( @@ -94,7 +95,7 @@ public WorkflowExecuterService( ClinicalReviewTimeoutRoutingKey = configuration.Value.Messaging.Topics.AideClinicalReviewCancelation; _migExternalAppPlugins = configuration.Value.MigExternalAppPlugins.ToList(); ExportRequestRoutingKey = $"{configuration.Value.Messaging.Topics.ExportRequestPrefix}.{configuration.Value.Messaging.DicomAgents.ScuAgentName}"; - + ExternalAppRoutingKey = configuration.Value.Messaging.Topics.ExternalAppRequest; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _workflowRepository = workflowRepository ?? throw new ArgumentNullException(nameof(workflowRepository)); _workflowInstanceRepository = workflowInstanceRepository ?? throw new ArgumentNullException(nameof(workflowInstanceRepository)); @@ -270,6 +271,10 @@ private async Task ProcessArtifactReceivedOutputs(ArtifactsReceivedEvent message } } + var currentTask = workflowInstance.Tasks?.FirstOrDefault(t => t.TaskId == taskId); + + currentTask!.OutputArtifacts = validArtifacts; // added here are the parent function saves the object ! + _logger.LogDebug($"adding files to workflowInstance {workflowInstance.Id} :Task {taskId} : {JsonConvert.SerializeObject(validArtifacts)}"); await _workflowInstanceRepository.UpdateTaskOutputArtifactsAsync(workflowInstance.Id, taskId, validArtifacts); } @@ -329,6 +334,7 @@ await SwitchTasksAsync(task, routerFunc: () => HandleTaskDestinations(workflowInstance, workflow, task, correlationId), exportFunc: () => HandleDicomExportAsync(workflow, workflowInstance, task, correlationId), externalFunc: () => HandleExternalAppAsync(workflow, workflowInstance, task, correlationId), + exportHl7Func: () => HandleHl7ExportAsync(workflow, workflowInstance, task, correlationId), notCreatedStatusFunc: () => { _logger.TaskPreviouslyDispatched(workflowInstance.PayloadId, task.TaskId); @@ -343,12 +349,14 @@ private static Task SwitchTasksAsync(TaskExecution task, Func exportFunc, Func externalFunc, Func notCreatedStatusFunc, + Func exportHl7Func, Func defaultFunc) => task switch { { TaskType: TaskTypeConstants.RouterTask } => routerFunc(), { TaskType: TaskTypeConstants.ExportTask } => exportFunc(), { TaskType: TaskTypeConstants.ExternalAppTask } => externalFunc(), + { TaskType: TaskTypeConstants.ExportHl7Task } => exportHl7Func(), { Status: var s } when s != TaskExecutionStatus.Created => notCreatedStatusFunc(), _ => defaultFunc() }; @@ -568,7 +576,38 @@ private async Task UpdateWorkflowInstanceStatus(WorkflowInstance workflowI private async Task HandleExternalAppAsync(WorkflowRevision workflow, WorkflowInstance workflowInstance, TaskExecution task, string correlationId) { var plugins = _migExternalAppPlugins; - await HandleDicomExportAsync(workflow, workflowInstance, task, correlationId, plugins).ConfigureAwait(false); + + var exportDestinations = workflow.Workflow?.Tasks?.FirstOrDefault(t => t.Id == task.TaskId)?.ExportDestinations + .Select(e => new DataOrigin { DataService = DataService.DIMSE, Destination = e.Name }); + + if (exportDestinations is null || !exportDestinations.Any()) + { + return; + } + + var artifactValues = await GetArtifactValues(workflow, workflowInstance, task, exportDestinations.Select(o => o.Destination).ToArray(), correlationId); + + if (artifactValues.IsNullOrEmpty()) + { + return; + } + + var destinationFolder = $"{workflowInstance.PayloadId}/dcm/{task.TaskId}/"; + + _logger.LogMigExport(task.TaskId, string.Join(",", exportDestinations), artifactValues.Length, string.Join(",", plugins)); + + var exportRequestEvent = EventMapper.ToExternalAppRequestEvent(artifactValues, exportDestinations.ToList(), task.TaskId, workflowInstance.Id, correlationId, destinationFolder, plugins); + + await ExternalAppRequest(exportRequestEvent); + await _workflowInstanceRepository.UpdateTaskStatusAsync(workflowInstance.Id, task.TaskId, TaskExecutionStatus.Dispatched); + } + + private async Task ExternalAppRequest(ExternalAppRequestEvent externalAppRequestEvent) + { + var jsonMessage = new JsonMessage(externalAppRequestEvent, MessageBrokerConfiguration.WorkflowManagerApplicationId, externalAppRequestEvent.CorrelationId, Guid.NewGuid().ToString()); + + await _messageBrokerPublisherService.Publish(ExportRequestRoutingKey, jsonMessage.ToMessage()); + return true; } private async Task HandleDicomExportAsync(WorkflowRevision workflow, WorkflowInstance workflowInstance, TaskExecution task, string correlationId, List? plugins = null) @@ -576,6 +615,17 @@ private async Task HandleDicomExportAsync(WorkflowRevision workflow, WorkflowIns plugins ??= new List(); var exportList = workflow.Workflow?.Tasks?.FirstOrDefault(t => t.Id == task.TaskId)?.ExportDestinations.Select(e => e.Name).ToArray(); + var artifactValues = await GetArtifactValues(workflow, workflowInstance, task, exportList, correlationId); + + if (artifactValues.IsNullOrEmpty()) + { + return; + } + await DispatchDicomExport(workflowInstance, task, exportList, artifactValues, correlationId, plugins); + } + + private async Task GetArtifactValues(WorkflowRevision workflow, WorkflowInstance workflowInstance, TaskExecution task, string[]? exportList, string correlationId) + { var artifactValues = GetDicomExports(workflow, task, exportList); var files = new List(); @@ -598,16 +648,19 @@ private async Task HandleDicomExportAsync(WorkflowRevision workflow, WorkflowIns } artifactValues = files.Select(f => f.FilePath).ToArray(); - if (artifactValues.IsNullOrEmpty()) { _logger.ExportFilesNotFound(task.TaskId, workflowInstance.Id); await CompleteTask(task, workflowInstance, correlationId, TaskExecutionStatus.Failed); - - return; } - await DispatchDicomExport(workflowInstance, task, exportList, artifactValues, correlationId, plugins); + return artifactValues; + } + + private async Task HandleHl7ExportAsync(WorkflowRevision workflow, WorkflowInstance workflowInstance, TaskExecution task, string correlationId) + { + // create message. send + } private string[] GetDicomExports(WorkflowRevision workflow, TaskExecution task, string[]? exportDestinations) @@ -738,6 +791,13 @@ private async Task DispatchTaskDestinations(WorkflowInstance workflowInsta continue; } + if (string.Equals(taskExec!.TaskType, TaskTypeConstants.ExportHl7Task, StringComparison.InvariantCultureIgnoreCase)) + { + await HandleHl7ExportAsync(workflow, workflowInstance, taskExec!, correlationId); + + continue; + } + processed &= await DispatchTask(workflowInstance, workflow, taskExec!, correlationId); if (processed is false) diff --git a/src/WorkflowManager/WorkflowManager/Services/Http/Startup.cs b/src/WorkflowManager/WorkflowManager/Services/Http/Startup.cs index 6e1442bc7..7fcb111f4 100644 --- a/src/WorkflowManager/WorkflowManager/Services/Http/Startup.cs +++ b/src/WorkflowManager/WorkflowManager/Services/Http/Startup.cs @@ -16,6 +16,7 @@ using System.Linq; using System.Net.Mime; +using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; @@ -63,6 +64,27 @@ public void ConfigureServices(IServiceCollection services) { c.SwaggerDoc("v1", new OpenApiInfo { Title = "MONAI Workflow Manager", Version = "v1" }); c.DescribeAllParametersInCamelCase(); + c.AddSecurityDefinition("basic", new OpenApiSecurityScheme + { + Scheme = "basic", + Name = "basic", + In = ParameterLocation.Header, + Type = SecuritySchemeType.Http, + }); + c.AddSecurityRequirement(new OpenApiSecurityRequirement + { + { + new OpenApiSecurityScheme + { + Reference = new OpenApiReference + { + Type = ReferenceType.SecurityScheme, + Id = "basic", + }, + }, + System.Array.Empty() + }, + }); }); var serviceProvider = services.BuildServiceProvider(); From 69758c19f412b67779a67639fd5362372b32fea6 Mon Sep 17 00:00:00 2001 From: Neil South Date: Tue, 14 Nov 2023 18:35:11 +0000 Subject: [PATCH 03/10] fixing up projects and tests Signed-off-by: Neil South --- ...orkflowManager.Common.Configuration.csproj | 5 +- src/Common/Configuration/packages.lock.json | 21 ++++---- src/Common/Miscellaneous/packages.lock.json | 22 +++++---- src/Monai.Deploy.WorkflowManager.sln | 12 ----- ...loy.WorkflowManager.TaskManager.API.csproj | 5 +- src/TaskManager/API/packages.lock.json | 21 ++++---- src/TaskManager/Database/packages.lock.json | 22 +++++---- .../AideClinicalReview/packages.lock.json | 24 ++++----- .../Plug-ins/Argo/packages.lock.json | 24 ++++----- ....Deploy.WorkflowManager.TaskManager.csproj | 7 ++- .../TaskManager/packages.lock.json | 33 +++++++------ ...ai.Deploy.WorkflowManager.Contracts.csproj | 5 +- .../Database/packages.lock.json | 22 +++++---- .../Logging/packages.lock.json | 22 +++++---- .../PayloadListener/packages.lock.json | 24 ++++----- .../Services/packages.lock.json | 24 ++++----- .../Storage/packages.lock.json | 22 +++++---- .../WorkflowExecuter/packages.lock.json | 24 ++++----- .../Monai.Deploy.WorkflowManager.csproj | 2 +- .../WorkflowManager/packages.lock.json | 43 +++++++++------- ...anager.TaskManager.IntegrationTests.csproj | 4 +- .../Support/RabbitConsumer.cs | 49 ++++++++++++++++++- .../TestData/TaskDispatchTestData.cs | 8 +-- .../appsettings.Test.json | 10 ++-- ...r.WorkflowExecutor.IntegrationTests.csproj | 7 +-- .../ArtifactReceivedEventStepDefinitions.cs | 2 - .../appsettings.Test.json | 8 +-- ...y.WorkflowManager.TaskManager.Tests.csproj | 1 + .../Common/EventMapperTests.cs | 9 +++- .../Services/WorkflowExecuterServiceTests.cs | 44 ++++++++++++----- .../WorkflowManager.Tests/packages.lock.json | 44 +++++++++-------- 31 files changed, 327 insertions(+), 243 deletions(-) diff --git a/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj b/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj index 7106c58c9..df7ca53da 100644 --- a/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj +++ b/src/Common/Configuration/Monai.Deploy.WorkflowManager.Common.Configuration.csproj @@ -31,6 +31,7 @@ + @@ -44,10 +45,6 @@ - - - - true true diff --git a/src/Common/Configuration/packages.lock.json b/src/Common/Configuration/packages.lock.json index 77e5c324d..100312f9a 100644 --- a/src/Common/Configuration/packages.lock.json +++ b/src/Common/Configuration/packages.lock.json @@ -2,6 +2,18 @@ "version": 1, "dependencies": { "net6.0": { + "Monai.Deploy.Messaging": { + "type": "Direct", + "requested": "[1.0.5-rc0006, )", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Direct", "requested": "[0.2.18, )", @@ -124,15 +136,6 @@ "type": "Transitive", "resolved": "6.0.0", "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } } } } diff --git a/src/Common/Miscellaneous/packages.lock.json b/src/Common/Miscellaneous/packages.lock.json index 7237cb1fa..ae6e37a07 100644 --- a/src/Common/Miscellaneous/packages.lock.json +++ b/src/Common/Miscellaneous/packages.lock.json @@ -144,6 +144,17 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -222,19 +233,10 @@ "resolved": "6.0.0", "contentHash": "TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } } diff --git a/src/Monai.Deploy.WorkflowManager.sln b/src/Monai.Deploy.WorkflowManager.sln index c64642007..fbc226aa9 100644 --- a/src/Monai.Deploy.WorkflowManager.sln +++ b/src/Monai.Deploy.WorkflowManager.sln @@ -90,10 +90,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.WorkflowManage EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.WorkflowManager.Services", "WorkflowManager\Services\Monai.Deploy.WorkflowManager.Services.csproj", "{76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.Messaging", "..\..\monai-deploy-messaging\src\Messaging\Monai.Deploy.Messaging.csproj", "{03923799-9ACE-4527-8DDA-EB18978EFE96}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.Messaging.RabbitMQ", "..\..\monai-deploy-messaging\src\Plugins\RabbitMQ\Monai.Deploy.Messaging.RabbitMQ.csproj", "{B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -256,14 +252,6 @@ Global {76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}.Debug|Any CPU.Build.0 = Debug|Any CPU {76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}.Release|Any CPU.ActiveCfg = Release|Any CPU {76A9FF94-862D-43E8-A0A7-562DD1DDDB3B}.Release|Any CPU.Build.0 = Release|Any CPU - {03923799-9ACE-4527-8DDA-EB18978EFE96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {03923799-9ACE-4527-8DDA-EB18978EFE96}.Debug|Any CPU.Build.0 = Debug|Any CPU - {03923799-9ACE-4527-8DDA-EB18978EFE96}.Release|Any CPU.ActiveCfg = Release|Any CPU - {03923799-9ACE-4527-8DDA-EB18978EFE96}.Release|Any CPU.Build.0 = Release|Any CPU - {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B32E6BBD-12F0-4723-BD56-CF89CCF95AA7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj b/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj index d66166cae..300f7966c 100644 --- a/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj +++ b/src/TaskManager/API/Monai.Deploy.WorkflowManager.TaskManager.API.csproj @@ -39,11 +39,8 @@ + - - - - diff --git a/src/TaskManager/API/packages.lock.json b/src/TaskManager/API/packages.lock.json index 0031bc500..5ce666cc1 100755 --- a/src/TaskManager/API/packages.lock.json +++ b/src/TaskManager/API/packages.lock.json @@ -2,6 +2,18 @@ "version": 1, "dependencies": { "net6.0": { + "Monai.Deploy.Messaging": { + "type": "Direct", + "requested": "[1.0.5-rc0006, )", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Mongo.Migration": { "type": "Direct", "requested": "[3.1.4, )", @@ -628,15 +640,6 @@ "type": "Transitive", "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" - }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } } } } diff --git a/src/TaskManager/Database/packages.lock.json b/src/TaskManager/Database/packages.lock.json index 146ad8458..7c5847679 100755 --- a/src/TaskManager/Database/packages.lock.json +++ b/src/TaskManager/Database/packages.lock.json @@ -245,6 +245,17 @@ "System.Security.Principal.Windows": "5.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Mongo.Migration": { "type": "Transitive", "resolved": "3.1.4", @@ -670,19 +681,10 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json b/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json index e316db0c3..1bd0c0b46 100644 --- a/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json +++ b/src/TaskManager/Plug-ins/AideClinicalReview/packages.lock.json @@ -256,6 +256,17 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -719,19 +730,10 @@ "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -745,7 +747,7 @@ "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/TaskManager/Plug-ins/Argo/packages.lock.json b/src/TaskManager/Plug-ins/Argo/packages.lock.json index b6dfa2240..30207c748 100644 --- a/src/TaskManager/Plug-ins/Argo/packages.lock.json +++ b/src/TaskManager/Plug-ins/Argo/packages.lock.json @@ -366,6 +366,17 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -857,19 +868,10 @@ "resolved": "13.3.1", "contentHash": "Q2dqDsb0xAlr092grgHk8/vTXI2snIiYM5ND3IXkgJDFIdPnqDYwYnlk+gwzSeRByDLhiSzTog8uT7xFwH68Zg==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -883,7 +885,7 @@ "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj b/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj index aacf775d5..122a1f39d 100644 --- a/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj +++ b/src/TaskManager/TaskManager/Monai.Deploy.WorkflowManager.TaskManager.csproj @@ -58,6 +58,8 @@ + + true @@ -84,10 +86,7 @@ - - - true - + diff --git a/src/TaskManager/TaskManager/packages.lock.json b/src/TaskManager/TaskManager/packages.lock.json index a99adaa9b..31646f8c7 100644 --- a/src/TaskManager/TaskManager/packages.lock.json +++ b/src/TaskManager/TaskManager/packages.lock.json @@ -23,13 +23,25 @@ "Newtonsoft.Json.Bson": "1.0.2" } }, + "Monai.Deploy.Messaging": { + "type": "Direct", + "requested": "[1.0.5-rc0006, )", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Messaging.RabbitMQ": { "type": "Direct", - "requested": "[1.0.4, )", - "resolved": "1.0.4", - "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==", + "requested": "[1.0.5-rc0006, )", + "resolved": "1.0.5-rc0006", + "contentHash": "luSfBhU4hFwyGk7SS05sfKHwxcCYjXimfmaTjNDjFKKjIYbd3IPm8lYDPSiszbZB53jpgNvYDy+aWJY8YlVXZg==", "dependencies": { - "Monai.Deploy.Messaging": "1.0.4", + "Monai.Deploy.Messaging": "1.0.5-rc0006", "Polly": "7.2.4", "RabbitMQ.Client": "6.5.0" } @@ -1124,19 +1136,10 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -1158,7 +1161,7 @@ "monai.deploy.workflowmanager.taskmanager.api": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj b/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj index 2f41d39e0..9ddb37527 100644 --- a/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj +++ b/src/WorkflowManager/Contracts/Monai.Deploy.WorkflowManager.Contracts.csproj @@ -38,11 +38,8 @@ + - - - - diff --git a/src/WorkflowManager/Database/packages.lock.json b/src/WorkflowManager/Database/packages.lock.json index ddd22e3af..6f087e2ed 100755 --- a/src/WorkflowManager/Database/packages.lock.json +++ b/src/WorkflowManager/Database/packages.lock.json @@ -267,6 +267,17 @@ "System.Security.Principal.Windows": "5.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "MongoDB.Bson": { "type": "Transitive", "resolved": "2.21.0", @@ -671,19 +682,10 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/Logging/packages.lock.json b/src/WorkflowManager/Logging/packages.lock.json index 4ca609e56..b43a5b68c 100755 --- a/src/WorkflowManager/Logging/packages.lock.json +++ b/src/WorkflowManager/Logging/packages.lock.json @@ -208,6 +208,17 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Mongo.Migration": { "type": "Transitive", "resolved": "3.1.4", @@ -627,19 +638,10 @@ "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/PayloadListener/packages.lock.json b/src/WorkflowManager/PayloadListener/packages.lock.json index decd50eaa..b55fe8bcf 100644 --- a/src/WorkflowManager/PayloadListener/packages.lock.json +++ b/src/WorkflowManager/PayloadListener/packages.lock.json @@ -268,6 +268,17 @@ "System.Security.Principal.Windows": "5.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -757,15 +768,6 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -777,7 +779,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -800,7 +802,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/Services/packages.lock.json b/src/WorkflowManager/Services/packages.lock.json index 76c0e129e..37da80c34 100644 --- a/src/WorkflowManager/Services/packages.lock.json +++ b/src/WorkflowManager/Services/packages.lock.json @@ -247,6 +247,17 @@ "System.Security.Principal.Windows": "5.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -711,15 +722,6 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -731,14 +733,14 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/Storage/packages.lock.json b/src/WorkflowManager/Storage/packages.lock.json index 382416b00..ee397b593 100755 --- a/src/WorkflowManager/Storage/packages.lock.json +++ b/src/WorkflowManager/Storage/packages.lock.json @@ -233,6 +233,17 @@ "resolved": "1.1.0", "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage.S3Policy": { "type": "Transitive", "resolved": "0.2.18", @@ -661,19 +672,10 @@ "resolved": "4.5.0", "contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/WorkflowExecuter/packages.lock.json b/src/WorkflowManager/WorkflowExecuter/packages.lock.json index bcd3406c9..c14678ceb 100644 --- a/src/WorkflowManager/WorkflowExecuter/packages.lock.json +++ b/src/WorkflowManager/WorkflowExecuter/packages.lock.json @@ -268,6 +268,17 @@ "System.Security.Principal.Windows": "5.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -757,15 +768,6 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -777,7 +779,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -800,7 +802,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj b/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj index f0cf8b3fe..66cf88181 100644 --- a/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj +++ b/src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj @@ -42,6 +42,7 @@ + true @@ -69,7 +70,6 @@ - diff --git a/src/WorkflowManager/WorkflowManager/packages.lock.json b/src/WorkflowManager/WorkflowManager/packages.lock.json index 1e2ef4eed..7c8060467 100755 --- a/src/WorkflowManager/WorkflowManager/packages.lock.json +++ b/src/WorkflowManager/WorkflowManager/packages.lock.json @@ -23,6 +23,17 @@ "Newtonsoft.Json.Bson": "1.0.2" } }, + "Monai.Deploy.Messaging.RabbitMQ": { + "type": "Direct", + "requested": "[1.0.5-rc0006, )", + "resolved": "1.0.5-rc0006", + "contentHash": "luSfBhU4hFwyGk7SS05sfKHwxcCYjXimfmaTjNDjFKKjIYbd3IPm8lYDPSiszbZB53jpgNvYDy+aWJY8YlVXZg==", + "dependencies": { + "Monai.Deploy.Messaging": "1.0.5-rc0006", + "Polly": "7.2.4", + "RabbitMQ.Client": "6.5.0" + } + }, "Monai.Deploy.Security": { "type": "Direct", "requested": "[0.1.3, )", @@ -472,6 +483,17 @@ "System.Reactive.Linq": "5.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, "Monai.Deploy.Storage": { "type": "Transitive", "resolved": "0.2.18", @@ -1026,23 +1048,6 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, - "monai.deploy.messaging.rabbitmq": { - "type": "Project", - "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", - "Polly": "[7.2.4, )", - "RabbitMQ.Client": "[6.5.0, )" - } - }, "monai.deploy.workflowmanager.common": { "type": "Project", "dependencies": { @@ -1054,7 +1059,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -1077,7 +1082,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj b/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj index f79ef9076..1d8f4d169 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.csproj @@ -27,6 +27,8 @@ + + @@ -40,11 +42,9 @@ - - diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs b/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs index 11cb653b5..2b7450c63 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs @@ -17,6 +17,7 @@ using System.Text; using Newtonsoft.Json; using RabbitMQ.Client; +using RabbitMQ.Client.Exceptions; namespace Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.Support { @@ -30,6 +31,10 @@ public RabbitConsumer(string exchange, string routingKey) private string Exchange { get; set; } + private string DeadLetterExchange { get; set; } = "monaideploy-dead-letter"; + + private int Deliverylimit { get; set; } = 5; + private string RoutingKey { get; set; } #pragma warning disable CS8602 // Dereference of a possibly null reference. #pragma warning disable CS8604 // Possible null reference argument. @@ -38,10 +43,30 @@ public RabbitConsumer(string exchange, string routingKey) { using (var channel = RabbitConnectionFactory.Connection?.CreateModel()) { - var queue = channel.QueueDeclare(queue: RoutingKey, durable: true); + var arguments = new Dictionary() + { + { "x-queue-type", "quorum" }, + { "x-delivery-limit", Deliverylimit }, + { "x-dead-letter-exchange", DeadLetterExchange } + }; + + var deadLetterQueue = $"{RoutingKey}-dead-letter"; + var (exists, _) = QueueExists(deadLetterQueue); + if (exists == false) + { + channel.QueueDeclare(queue: deadLetterQueue, durable: true, exclusive: false, autoDelete: false); + } + + var queue = channel.QueueDeclare(queue: RoutingKey, durable: true, exclusive: false, autoDelete: false, arguments); channel.QueueBind(queue.QueueName, Exchange, RoutingKey); + if (!string.IsNullOrEmpty(deadLetterQueue)) + { + channel.QueueBind(deadLetterQueue, DeadLetterExchange, RoutingKey); + } + channel.ExchangeDeclare(Exchange, ExchangeType.Topic, durable: true); + var basicGetResult = channel.BasicGet(queue.QueueName, true); if (basicGetResult != null) @@ -56,6 +81,28 @@ public RabbitConsumer(string exchange, string routingKey) return default; } + private (bool exists, bool accessable) QueueExists(string queueName) + { + var testChannel = RabbitConnectionFactory.Connection?.CreateModel(); + + try + { + var testRun = testChannel!.QueueDeclarePassive(queue: queueName); + } + catch (OperationInterruptedException operationInterruptedException) + { + ///RabbitMQ node that hosts the previously created dead-letter queue is unavailable + if (operationInterruptedException.Message.Contains("down or inaccessible")) + { + return (true, false); + } + else + { + return (false, true); + } + } + return (true, true); + } } #pragma warning restore CS8604 // Possible null reference argument. #pragma warning restore CS8602 // Dereference of a possibly null reference. diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/TestData/TaskDispatchTestData.cs b/tests/IntegrationTests/TaskManager.IntegrationTests/TestData/TaskDispatchTestData.cs index dc6aa2acb..9ee84084f 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/TestData/TaskDispatchTestData.cs +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/TestData/TaskDispatchTestData.cs @@ -1268,7 +1268,7 @@ public static class TaskDispatchesTestData AccessToken = "test", }, Bucket = "bucket1", - RelativeRootPath = "//dcm_1" + RelativeRootPath = "dcm_1" }, }, IntermediateStorage = new Messaging.Common.Storage @@ -1316,7 +1316,7 @@ public static class TaskDispatchesTestData AccessToken = "test", }, Bucket = "bucket1", - RelativeRootPath = "//dcm_1" + RelativeRootPath = "dcm_1" }, }, IntermediateStorage = new Messaging.Common.Storage @@ -1363,7 +1363,7 @@ public static class TaskDispatchesTestData AccessToken = "test", }, Bucket = "bucket1", - RelativeRootPath = "//dcm_1" + RelativeRootPath = "dcm_1" }, }, IntermediateStorage = new Messaging.Common.Storage @@ -1376,7 +1376,7 @@ public static class TaskDispatchesTestData AccessToken = "test", }, Bucket = "bucket1", - RelativeRootPath = "//dcm" + RelativeRootPath = "dcm" }, TaskPluginArguments = new Dictionary() { diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json b/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json index d484bdf9b..85ee4909d 100755 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json @@ -57,8 +57,8 @@ "publisherServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ", "publisherSettings": { "endpoint": "localhost", - "username": "admin", - "password": "admin", + "username": "rabbitmq", + "password": "rabbitmq", "virtualHost": "monaideploy", "exchange": "monaideploy", "deadLetterExchange": "deadLetterExchange", @@ -68,13 +68,13 @@ "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ", "subscriberSettings": { "endpoint": "localhost", - "username": "admin", - "password": "admin", + "username": "rabbitmq", + "password": "rabbitmq", "virtualHost": "monaideploy", "exchange": "monaideploy", "deadLetterExchange": "monaideploy-dead-letter", "exportRequestQueue": "export_tasks", - "deliveryLimit": 3, + "deliveryLimit": 5, "requeueDelay": 30 } } diff --git a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj index fe4468e10..212de085b 100644 --- a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj +++ b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.csproj @@ -34,6 +34,8 @@ + + @@ -49,11 +51,6 @@ - - - - - PayloadApi.feature diff --git a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/StepDefinitions/ArtifactReceivedEventStepDefinitions.cs b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/StepDefinitions/ArtifactReceivedEventStepDefinitions.cs index b07622bbf..fa72ef27f 100644 --- a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/StepDefinitions/ArtifactReceivedEventStepDefinitions.cs +++ b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/StepDefinitions/ArtifactReceivedEventStepDefinitions.cs @@ -17,11 +17,9 @@ using BoDi; using Monai.Deploy.Messaging.Events; using Monai.Deploy.Messaging.Messages; -using Monai.Deploy.WorkflowManager.Common.IntegrationTests.Models; using Monai.Deploy.WorkflowManager.Common.IntegrationTests.Support; using Monai.Deploy.WorkflowManager.Common.WorkflowExecutor.IntegrationTests.Support; using MongoDB.Driver; -using NUnit.Framework; using Polly; using Polly.Retry; using TechTalk.SpecFlow.Infrastructure; diff --git a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/appsettings.Test.json b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/appsettings.Test.json index 4a0ceb4d9..6ee2915cb 100755 --- a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/appsettings.Test.json +++ b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/appsettings.Test.json @@ -37,8 +37,8 @@ "publisherServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ", "publisherSettings": { "endpoint": "localhost", - "username": "admin", - "password": "admin", + "username": "rabbitmq", + "password": "rabbitmq", "port": "5672", "virtualHost": "monaideploy", "exchange": "monaideploy", @@ -47,8 +47,8 @@ "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ", "subscriberSettings": { "endpoint": "localhost", - "username": "admin", - "password": "admin", + "username": "rabbitmq", + "password": "rabbitmq", "port": "5672", "virtualHost": "monaideploy", "deadLetterExchange": "monaideploy-dead-letter", diff --git a/tests/UnitTests/TaskManager.Tests/Monai.Deploy.WorkflowManager.TaskManager.Tests.csproj b/tests/UnitTests/TaskManager.Tests/Monai.Deploy.WorkflowManager.TaskManager.Tests.csproj index 5bc6c5979..a9802a29f 100644 --- a/tests/UnitTests/TaskManager.Tests/Monai.Deploy.WorkflowManager.TaskManager.Tests.csproj +++ b/tests/UnitTests/TaskManager.Tests/Monai.Deploy.WorkflowManager.TaskManager.Tests.csproj @@ -25,6 +25,7 @@ + diff --git a/tests/UnitTests/WorkflowExecuter.Tests/Common/EventMapperTests.cs b/tests/UnitTests/WorkflowExecuter.Tests/Common/EventMapperTests.cs index 0446c13cb..0851c63cd 100644 --- a/tests/UnitTests/WorkflowExecuter.Tests/Common/EventMapperTests.cs +++ b/tests/UnitTests/WorkflowExecuter.Tests/Common/EventMapperTests.cs @@ -157,10 +157,17 @@ public void ToExportRequestEvent_ValidOutputArtifacts_ReturnsExportRequest() ExportTaskId = task.TaskId, CorrelationId = correlationId, Files = dicomImages, - Destinations = exportDestinations + Destinations = exportDestinations, + Target = new DataOrigin + { + Destination = exportDestinations[0], + DataService = DataService.DIMSE, + Source = "WFM" + } }; var exportRequest = EventMapper.ToExportRequestEvent(dicomImages, exportDestinations, task.TaskId, workflowInstanceId, correlationId); + exportRequest.Target!.Source = "WFM"; exportRequest.Should().BeEquivalentTo(expected); } diff --git a/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs b/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs index 9b726b4a6..67751c5db 100644 --- a/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs +++ b/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs @@ -230,8 +230,14 @@ public async Task ProcessArtifactReceived_WhenWorkflowTemplateReturnsNull_Return _workflowInstanceRepository.Setup(w => w.GetByWorkflowInstanceIdAsync(message.WorkflowInstanceId))! .ReturnsAsync(new WorkflowInstance { WorkflowId = "789" }); _workflowRepository.Setup(w => w.GetByWorkflowIdAsync("789"))! - .ReturnsAsync(new WorkflowRevision { Workflow = new Workflow { Tasks = new [] - { new TaskObject() { Id = "not456" } }} }); + .ReturnsAsync(new WorkflowRevision + { + Workflow = new Workflow + { + Tasks = new[] + { new TaskObject() { Id = "not456" } } + } + }); var result = await WorkflowExecuterService.ProcessArtifactReceivedAsync(message); Assert.False(result); } @@ -239,15 +245,21 @@ public async Task ProcessArtifactReceived_WhenWorkflowTemplateReturnsNull_Return [Fact] public async Task ProcessArtifactReceived_WhenStillHasMissingArtifacts_ReturnsTrue() { - var message = new ArtifactsReceivedEvent { WorkflowInstanceId = "123", TaskId = "456", - Artifacts = new List() { new Messaging.Common.Artifact() { Type = ArtifactType.CT } } }; - var workflowInstance = new WorkflowInstance { WorkflowId = "789", Tasks = new List() - { new TaskExecution() { TaskId = "456" } } }; + var message = new ArtifactsReceivedEvent + { + WorkflowInstanceId = "123", TaskId = "456", + Artifacts = new List() { new Messaging.Common.Artifact() { Type = ArtifactType.CT } } + }; + var workflowInstance = new WorkflowInstance + { + WorkflowId = "789", Tasks = new List() + { new TaskExecution() { TaskId = "456" } } + }; _workflowInstanceRepository.Setup(w => w.GetByWorkflowInstanceIdAsync(message.WorkflowInstanceId))! .ReturnsAsync(workflowInstance); var templateArtifacts = new OutputArtifact[] { new OutputArtifact() { Type = ArtifactType.CT }, new OutputArtifact() { Type = ArtifactType.DG } }; var taskTemplate = new TaskObject() { Id = "456", Artifacts = new ArtifactMap { Output = templateArtifacts } }; - var workflowTemplate = new WorkflowRevision { Workflow = new Workflow { Tasks = new [] { taskTemplate }} }; + var workflowTemplate = new WorkflowRevision { Workflow = new Workflow { Tasks = new[] { taskTemplate } } }; _workflowRepository.Setup(w => w.GetByWorkflowIdAsync("789"))! .ReturnsAsync(workflowTemplate); _artifactReceivedRepository.Setup(r => r.GetAllAsync(workflowInstance.WorkflowId, taskTemplate.Id)) @@ -261,10 +273,16 @@ public async Task ProcessArtifactReceived_WhenStillHasMissingArtifacts_ReturnsTr public async Task ProcessArtifactReceived_WhenAllArtifactsReceivedArtifactsButTaskExecNotFound_ReturnsFalse() { //incoming artifacts - var message = new ArtifactsReceivedEvent { WorkflowInstanceId = "123", TaskId = "456", - Artifacts = new List() { new Messaging.Common.Artifact() { Type = ArtifactType.CT } } }; - var workflowInstance = new WorkflowInstance { WorkflowId = "789", Tasks = new List() - { new TaskExecution() { TaskId = "not456" } } }; + var message = new ArtifactsReceivedEvent + { + WorkflowInstanceId = "123", TaskId = "456", + Artifacts = new List() { new Messaging.Common.Artifact() { Type = ArtifactType.CT } } + }; + var workflowInstance = new WorkflowInstance + { + WorkflowId = "789", Tasks = new List() + { new TaskExecution() { TaskId = "not456" } } + }; _workflowInstanceRepository.Setup(w => w.GetByWorkflowInstanceIdAsync(message.WorkflowInstanceId))! .ReturnsAsync(workflowInstance); //expected artifacts @@ -273,7 +291,7 @@ public async Task ProcessArtifactReceived_WhenAllArtifactsReceivedArtifactsButTa new OutputArtifact() { Type = ArtifactType.CT }, }; var taskTemplate = new TaskObject() { Id = "456", Artifacts = new ArtifactMap { Output = templateArtifacts } }; - var workflowTemplate = new WorkflowRevision { Workflow = new Workflow { Tasks = new [] { taskTemplate }} }; + var workflowTemplate = new WorkflowRevision { Workflow = new Workflow { Tasks = new[] { taskTemplate } } }; _workflowRepository.Setup(w => w.GetByWorkflowIdAsync("789"))! .ReturnsAsync(workflowTemplate); @@ -3179,7 +3197,7 @@ public async Task ProcessArtifactReceived_Calls_WorkflowInstanceRepository_Updat var workflowInstance = new WorkflowInstance { WorkflowId = "789", Tasks = new List() - { new TaskExecution() { TaskId = "not456" } } + { new TaskExecution() { TaskId = "456" } } }; _workflowInstanceRepository.Setup(w => w.GetByWorkflowInstanceIdAsync(message.WorkflowInstanceId))! .ReturnsAsync(workflowInstance); diff --git a/tests/UnitTests/WorkflowManager.Tests/packages.lock.json b/tests/UnitTests/WorkflowManager.Tests/packages.lock.json index 047823ab7..6eb5e1096 100755 --- a/tests/UnitTests/WorkflowManager.Tests/packages.lock.json +++ b/tests/UnitTests/WorkflowManager.Tests/packages.lock.json @@ -508,6 +508,27 @@ "System.Reactive.Linq": "5.0.0" } }, + "Monai.Deploy.Messaging": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "Yr6Ix8AeKdciz7t9aeteYuDAiNpmv3FmpF9bvdvjVh46gBazf+HBdvXdbWWXgzNTd3yevsQGBKazQXN9ecqwog==", + "dependencies": { + "Ardalis.GuardClauses": "4.1.1", + "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21", + "Newtonsoft.Json": "13.0.3", + "System.IO.Abstractions": "17.2.3" + } + }, + "Monai.Deploy.Messaging.RabbitMQ": { + "type": "Transitive", + "resolved": "1.0.5-rc0006", + "contentHash": "luSfBhU4hFwyGk7SS05sfKHwxcCYjXimfmaTjNDjFKKjIYbd3IPm8lYDPSiszbZB53jpgNvYDy+aWJY8YlVXZg==", + "dependencies": { + "Monai.Deploy.Messaging": "1.0.5-rc0006", + "Polly": "7.2.4", + "RabbitMQ.Client": "6.5.0" + } + }, "Monai.Deploy.Security": { "type": "Transitive", "resolved": "0.1.3", @@ -1838,29 +1859,12 @@ "resolved": "0.6.2", "contentHash": "jPao/LdUNLUz8rn3H1D8W7wQbZsRZM0iayvWI4xGejJg3XJHT56gcmYdgmCGPdJF1UEBqUjucCRrFB+4HbJsbw==" }, - "monai.deploy.messaging": { - "type": "Project", - "dependencies": { - "Ardalis.GuardClauses": "[4.1.1, )", - "Microsoft.Extensions.Diagnostics.HealthChecks": "[6.0.21, )", - "Newtonsoft.Json": "[13.0.3, )", - "System.IO.Abstractions": "[17.2.3, )" - } - }, - "monai.deploy.messaging.rabbitmq": { - "type": "Project", - "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", - "Polly": "[7.2.4, )", - "RabbitMQ.Client": "[6.5.0, )" - } - }, "monai.deploy.workflowmanager": { "type": "Project", "dependencies": { "AspNetCore.HealthChecks.MongoDb": "[6.0.2, )", "Microsoft.AspNetCore.Mvc.NewtonsoftJson": "[6.0.22, )", - "Monai.Deploy.Messaging.RabbitMQ": "[0.1.0, )", + "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5-rc0006, )", "Monai.Deploy.Security": "[0.1.3, )", "Monai.Deploy.Storage.MinIO": "[0.2.18, )", "Monai.Deploy.WorkflowManager.Common.Configuration": "[1.0.0, )", @@ -1888,7 +1892,7 @@ "monai.deploy.workflowmanager.common.configuration": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Monai.Deploy.Storage": "[0.2.18, )" } }, @@ -1911,7 +1915,7 @@ "monai.deploy.workflowmanager.contracts": { "type": "Project", "dependencies": { - "Monai.Deploy.Messaging": "[0.1.0, )", + "Monai.Deploy.Messaging": "[1.0.5-rc0006, )", "Mongo.Migration": "[3.1.4, )", "MongoDB.Bson": "[2.21.0, )" } From ac06ed45949719b4a193c787d75d6912b3343d2f Mon Sep 17 00:00:00 2001 From: Neil South Date: Wed, 15 Nov 2023 09:58:12 +0000 Subject: [PATCH 04/10] change Deliverylimit to 3 Signed-off-by: Neil South --- src/TaskManager/TaskManager/appsettings.json | 2 +- src/WorkflowManager/WorkflowManager/appsettings.json | 2 +- .../TaskManager.IntegrationTests/Support/RabbitConsumer.cs | 2 +- .../TaskManager.IntegrationTests/appsettings.Test.json | 4 ++-- .../Support/RabbitConsumer.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/TaskManager/TaskManager/appsettings.json b/src/TaskManager/TaskManager/appsettings.json index 9353ca939..efb322e3e 100755 --- a/src/TaskManager/TaskManager/appsettings.json +++ b/src/TaskManager/TaskManager/appsettings.json @@ -94,7 +94,7 @@ "virtualHost": "monaideploy", "exchange": "monaideploy", "deadLetterExchange": "deadLetterExchange", - "deliveryLimit": "5", + "deliveryLimit": "3", "requeueDelay": "0" }, "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ", diff --git a/src/WorkflowManager/WorkflowManager/appsettings.json b/src/WorkflowManager/WorkflowManager/appsettings.json index 555e34085..b04fff02f 100755 --- a/src/WorkflowManager/WorkflowManager/appsettings.json +++ b/src/WorkflowManager/WorkflowManager/appsettings.json @@ -72,7 +72,7 @@ "virtualHost": "monaideploy", "exchange": "monaideploy", "deadLetterExchange": "deadLetterExchange", - "deliveryLimit": "5", + "deliveryLimit": "3", "requeueDelay": "0" }, "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ", diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs b/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs index 2b7450c63..258201e69 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/Support/RabbitConsumer.cs @@ -33,7 +33,7 @@ public RabbitConsumer(string exchange, string routingKey) private string DeadLetterExchange { get; set; } = "monaideploy-dead-letter"; - private int Deliverylimit { get; set; } = 5; + private int Deliverylimit { get; set; } = 3; private string RoutingKey { get; set; } #pragma warning disable CS8602 // Dereference of a possibly null reference. diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json b/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json index 85ee4909d..7778f2e35 100755 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/appsettings.Test.json @@ -62,7 +62,7 @@ "virtualHost": "monaideploy", "exchange": "monaideploy", "deadLetterExchange": "deadLetterExchange", - "deliveryLimit": "5", + "deliveryLimit": "3", "requeueDelay": "0" }, "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ", @@ -74,7 +74,7 @@ "exchange": "monaideploy", "deadLetterExchange": "monaideploy-dead-letter", "exportRequestQueue": "export_tasks", - "deliveryLimit": 5, + "deliveryLimit": 3, "requeueDelay": 30 } } diff --git a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Support/RabbitConsumer.cs b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Support/RabbitConsumer.cs index 045a1c65f..c78817fed 100644 --- a/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Support/RabbitConsumer.cs +++ b/tests/IntegrationTests/WorkflowExecutor.IntegrationTests/Support/RabbitConsumer.cs @@ -63,7 +63,7 @@ public RabbitConsumer(IModel channel, string exchange, string routingKey) private string DeadLetterExchange { get; set; } = "monaideploy-dead-letter"; - private int Deliverylimit { get; set; } = 5; + private int Deliverylimit { get; set; } = 3; public T? GetMessage() { From 1726d6b833b0c25f3920ab1aed1710f128c43139 Mon Sep 17 00:00:00 2001 From: Neil South Date: Wed, 15 Nov 2023 16:48:48 +0000 Subject: [PATCH 05/10] fixups from e to e Signed-off-by: Neil South --- .../Services/WorkflowExecuterService.cs | 16 ++++++++-------- .../WorkflowManager/appsettings.Local.json | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs b/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs index 2d35a683a..42d3cf3fe 100644 --- a/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs +++ b/src/WorkflowManager/WorkflowExecuter/Services/WorkflowExecuterService.cs @@ -93,7 +93,7 @@ public WorkflowExecuterService( _defaultPerTaskTypeTimeoutMinutes = configuration.Value.PerTaskTypeTimeoutMinutes; TaskDispatchRoutingKey = configuration.Value.Messaging.Topics.TaskDispatchRequest; ClinicalReviewTimeoutRoutingKey = configuration.Value.Messaging.Topics.AideClinicalReviewCancelation; - _migExternalAppPlugins = configuration.Value.MigExternalAppPlugins.ToList(); + _migExternalAppPlugins = configuration.Value.MigExternalAppPlugins.Select(p => p.Trim()).Where(p => p.Length > 0).ToList(); ExportRequestRoutingKey = $"{configuration.Value.Messaging.Topics.ExportRequestPrefix}.{configuration.Value.Messaging.DicomAgents.ScuAgentName}"; ExternalAppRoutingKey = configuration.Value.Messaging.Topics.ExternalAppRequest; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); @@ -251,7 +251,7 @@ await _artifactsRepository private async Task ProcessArtifactReceivedOutputs(ArtifactsReceivedEvent message, WorkflowInstance workflowInstance, TaskObject task, string taskId) { - var artifactList = message.Artifacts.Select(a => $"{message.PayloadId}/{a.Path}").ToList(); + var artifactList = message.Artifacts.Select(a => $"{a.Path}").ToList(); var artifactsInStorage = (await _storageService.VerifyObjectsExistAsync(workflowInstance.BucketId, artifactList, default)) ?? new Dictionary(); if (artifactsInStorage.Any(a => a.Value) is false) { @@ -259,15 +259,15 @@ private async Task ProcessArtifactReceivedOutputs(ArtifactsReceivedEvent message return; } - var messageArtifactsInStorage = message.Artifacts.Where(m => artifactsInStorage.First(a => a.Value && a.Key == $"{message.PayloadId}/{m.Path}").Value).ToList(); + var messageArtifactsInStorage = message.Artifacts.Where(m => artifactsInStorage.First(a => a.Value && a.Key == $"{m.Path}").Value).ToList(); var validArtifacts = new Dictionary(); foreach (var artifact in messageArtifactsInStorage) { - var match = task.Artifacts.Output.First(t => t.Type == artifact.Type); - if (validArtifacts.ContainsKey(match.Name) is false) + var match = task.Artifacts.Output.FirstOrDefault(t => t.Type == artifact.Type); + if (match is not null && validArtifacts.ContainsKey(match!.Name) is false) { - validArtifacts.Add(match.Name, $"{message.PayloadId}/{artifact.Path}"); + validArtifacts.Add(match.Name, $"{artifact.Path}"); } } @@ -592,7 +592,7 @@ private async Task HandleExternalAppAsync(WorkflowRevision workflow, WorkflowIns return; } - var destinationFolder = $"{workflowInstance.PayloadId}/dcm/{task.TaskId}/"; + var destinationFolder = $"{workflowInstance.PayloadId}/inference/{task.TaskId}/{exportDestinations.First().Destination}"; _logger.LogMigExport(task.TaskId, string.Join(",", exportDestinations), artifactValues.Length, string.Join(",", plugins)); @@ -606,7 +606,7 @@ private async Task ExternalAppRequest(ExternalAppRequestEvent externalAppR { var jsonMessage = new JsonMessage(externalAppRequestEvent, MessageBrokerConfiguration.WorkflowManagerApplicationId, externalAppRequestEvent.CorrelationId, Guid.NewGuid().ToString()); - await _messageBrokerPublisherService.Publish(ExportRequestRoutingKey, jsonMessage.ToMessage()); + await _messageBrokerPublisherService.Publish(ExternalAppRoutingKey, jsonMessage.ToMessage()); return true; } diff --git a/src/WorkflowManager/WorkflowManager/appsettings.Local.json b/src/WorkflowManager/WorkflowManager/appsettings.Local.json index 773a8c22e..cd86c2532 100755 --- a/src/WorkflowManager/WorkflowManager/appsettings.Local.json +++ b/src/WorkflowManager/WorkflowManager/appsettings.Local.json @@ -97,9 +97,10 @@ } }, "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": [ + "migExternalAppPlugins2": [ "Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution.DicomDeidentifier, Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution, Version=0.0.0.0" ], + "migExternalAppPlugins": [""], "InformaticsGateway": { "apiHost": "http://localhost:5010", "username": "aide", From 844a987f45696dd3478df4163894eb84a8ed716a Mon Sep 17 00:00:00 2001 From: Neil South Date: Wed, 15 Nov 2023 17:36:54 +0000 Subject: [PATCH 06/10] fix up tests Signed-off-by: Neil South --- doc/dependency_decisions.yml | 2 ++ .../Services/WorkflowExecuterServiceTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/dependency_decisions.yml b/doc/dependency_decisions.yml index 9cba1da9f..57013fe39 100644 --- a/doc/dependency_decisions.yml +++ b/doc/dependency_decisions.yml @@ -763,6 +763,7 @@ - 1.0.1 - 1.0.3 - 1.0.4 + - 1.0.5-rc0006 :when: 2023-24-10 11:43:10.781625468 Z - - :approve - Monai.Deploy.Messaging.RabbitMQ @@ -772,6 +773,7 @@ - 1.0.1 - 1.0.3 - 1.0.4 + - 1.0.5-rc0006 :when: 2023-24-10 11:43:20.975488411 Z - - :approve - Monai.Deploy.Security diff --git a/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs b/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs index 8c92c5df5..7ad63a1e8 100755 --- a/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs +++ b/tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs @@ -2685,7 +2685,7 @@ public async Task ProcessPayload_WithExternalAppTask_Dispatches() var result = await WorkflowExecuterService.ProcessPayload(workflowRequest, new Payload() { Id = Guid.NewGuid().ToString() }); - _messageBrokerPublisherService.Verify(w => w.Publish($"{_configuration.Value.Messaging.Topics.ExportRequestPrefix}.{_configuration.Value.Messaging.DicomAgents.ScuAgentName}", It.IsAny()), Times.Exactly(1)); + _messageBrokerPublisherService.Verify(w => w.Publish($"{_configuration.Value.Messaging.Topics.ExternalAppRequest}", It.IsAny()), Times.Exactly(1)); Assert.True(result); Assert.NotNull(messageSent); @@ -3213,7 +3213,7 @@ public async Task ProcessArtifactReceived_Calls_WorkflowInstanceRepository_Updat .ReturnsAsync(workflowTemplate); _storageService.Setup(s => s.VerifyObjectsExistAsync(It.IsAny(), It.IsAny>(), It.IsAny())) - .ReturnsAsync(new Dictionary { { $"{message.PayloadId}/{artifactPath}", true } }); + .ReturnsAsync(new Dictionary { { $"{artifactPath}", true } }); //previously received artifacts _artifactReceivedRepository.Setup(r => r.GetAllAsync(workflowInstance.WorkflowId, taskTemplate.Id)) From 81d1bec11182ff90af6981afbf9d036f23aa01e9 Mon Sep 17 00:00:00 2001 From: Neil South Date: Wed, 15 Nov 2023 17:47:34 +0000 Subject: [PATCH 07/10] change docker-deploy to match migs passwords Signed-off-by: Neil South --- deploy/docker-compose/docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/docker-compose/docker-compose.yml b/deploy/docker-compose/docker-compose.yml index e2208969b..c58b1f138 100644 --- a/deploy/docker-compose/docker-compose.yml +++ b/deploy/docker-compose/docker-compose.yml @@ -16,7 +16,7 @@ version: '3.9' services: minio: - image: "minio/minio:latest" + image: "minio/minio:RELEASE.2023-10-16T04-13-43Z" command: server --console-address ":9001" /data hostname: minio volumes: @@ -38,8 +38,8 @@ services: hostname: "rabbit1" environment: RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG" - RABBITMQ_DEFAULT_USER: "admin" - RABBITMQ_DEFAULT_PASS: "admin" + RABBITMQ_DEFAULT_USER: "rabbitmq" + RABBITMQ_DEFAULT_PASS: "rabbitmq" RABBITMQ_DEFAULT_VHOST: "monaideploy" ports: - "15672:15672" From fa5e7bee277c97ecde21740ce744c74c03e48bcd Mon Sep 17 00:00:00 2001 From: Neil South Date: Wed, 15 Nov 2023 18:12:50 +0000 Subject: [PATCH 08/10] change to match mig passwords Signed-off-by: Neil South --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2949f98b8..fd5dcb575 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,8 +82,8 @@ jobs: image: rabbitmq:3.8.18-management env: RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG" - RABBITMQ_DEFAULT_USER: "admin" - RABBITMQ_DEFAULT_PASS: "admin" + RABBITMQ_DEFAULT_USER: "rabbitmq" + RABBITMQ_DEFAULT_PASS: "rabbitmq" RABBITMQ_DEFAULT_VHOST: "monaideploy" ports: - "15672:15672" @@ -159,8 +159,8 @@ jobs: image: rabbitmq:3.8.18-management env: RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG" - RABBITMQ_DEFAULT_USER: "admin" - RABBITMQ_DEFAULT_PASS: "admin" + RABBITMQ_DEFAULT_USER: "rabbitmq" + RABBITMQ_DEFAULT_PASS: "rabbitmq" RABBITMQ_DEFAULT_VHOST: "monaideploy" ports: - "15672:15672" From ccd774cd16e4dc7a8e07c5a682e6227a40766fb3 Mon Sep 17 00:00:00 2001 From: Neil South Date: Thu, 16 Nov 2023 08:43:12 +0000 Subject: [PATCH 09/10] ignoring test for now, works locally Signed-off-by: Neil South --- .../TaskManager.IntegrationTests/Features/TaskUpdate.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature b/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature index 94bea3f80..e5c97a38d 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature @@ -17,11 +17,13 @@ Feature: TaskUpdate Integration tests for testing TaskUpdateEvents from TaskManager +@Ignore @TaskDispatch_TaskUpdate Scenario: TaskUpdateEvent is published with status Accepted after receiving a valid TaskDispatchEvent When A Task Dispatch event is published Task_Dispatch_Accepted Then A Task Update event with status Accepted is published with Task Dispatch details + @TaskDispatch_TaskUpdate Scenario Outline: TaskUpdateEvent is published with status Failed after receiving an invalid TaskDispatchEvent When A Task Dispatch event is published From 96acd8e50049cc1ebbe69a6930e5948a10e9006e Mon Sep 17 00:00:00 2001 From: Neil South Date: Thu, 16 Nov 2023 09:02:12 +0000 Subject: [PATCH 10/10] ignoring test for now, works locally Signed-off-by: Neil South --- .../TaskManager.IntegrationTests/Features/TaskUpdate.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature b/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature index e5c97a38d..0323284b0 100644 --- a/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature +++ b/tests/IntegrationTests/TaskManager.IntegrationTests/Features/TaskUpdate.feature @@ -23,7 +23,7 @@ Scenario: TaskUpdateEvent is published with status Accepted after receiving a va When A Task Dispatch event is published Task_Dispatch_Accepted Then A Task Update event with status Accepted is published with Task Dispatch details - +@Ignore @TaskDispatch_TaskUpdate Scenario Outline: TaskUpdateEvent is published with status Failed after receiving an invalid TaskDispatchEvent When A Task Dispatch event is published