diff --git a/deploy/helm/Gateway.yaml b/deploy/helm/Gateway.yaml index 3f23e9cee..f1ae8f7cb 100644 --- a/deploy/helm/Gateway.yaml +++ b/deploy/helm/Gateway.yaml @@ -14,20 +14,20 @@ replicaCount: 1 image: - repository: 847264867502.dkr.ecr.eu-west-2.amazonaws.com/monai-deploy-informatics-gateway-dev + repository: registry.gitlab.com/answerdigital/londonai/aide/workflow-manager-images/infomatics-gateway pullPolicy: IfNotPresent - tag: latest + tag: 2022-08-01 enviromentVariables: InformaticsGateway__messaging__publisherSettings__endpoint: "rabbitmq-monai" - InformaticsGateway__messaging__publisherSettings__username: "admin" - InformaticsGateway__messaging__publisherSettings__password: "admin" + InformaticsGateway__messaging__publisherSettings__username: "monaideploy" + InformaticsGateway__messaging__publisherSettings__password: "monaideploy" InformaticsGateway__messaging__subscriberSettings__endpoint: "rabbitmq-monai" - InformaticsGateway__messaging__subscriberSettings__username: "admin" - InformaticsGateway__messaging__subscriberSettings__password: "admin" - InformaticsGateway__storage__settings__endpoint: "minio:9000" - InformaticsGateway__storage__settings__accessKey: "minioadmin" - InformaticsGateway__storage__settings__accessToken: "minioadmin" + InformaticsGateway__messaging__subscriberSettings__username: "monaideploy" + InformaticsGateway__messaging__subscriberSettings__password: "monaideploy" + InformaticsGateway__storage__settings__endpoint: "minio.monai:9000" + InformaticsGateway__storage__settings__accessKey: "rootminio" + InformaticsGateway__storage__settings__accessToken: "rootminio" service: type: ClusterIP diff --git a/src/Contracts/Models/TaskDestination.cs b/src/Contracts/Models/TaskDestination.cs index a2f229035..f38c154f7 100644 --- a/src/Contracts/Models/TaskDestination.cs +++ b/src/Contracts/Models/TaskDestination.cs @@ -21,9 +21,11 @@ namespace Monai.Deploy.WorkflowManager.Contracts.Models public class TaskDestination { [JsonProperty(PropertyName = "name")] +#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. public string Name { get; set; } +#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. [JsonProperty(PropertyName = "conditions")] - public string Conditions { get; set; } + public string Conditions { get; set; } = ""; } } diff --git a/src/TaskManager/Plug-ins/Argo/ArgoPlugin.cs b/src/TaskManager/Plug-ins/Argo/ArgoPlugin.cs index 0fd3fb890..2924b226e 100644 --- a/src/TaskManager/Plug-ins/Argo/ArgoPlugin.cs +++ b/src/TaskManager/Plug-ins/Argo/ArgoPlugin.cs @@ -215,10 +215,15 @@ private Dictionary GetExecutuionStats(Workflow workflow) { Guard.Against.Null(workflow); + TimeSpan? duration = null; + if (workflow.Status?.StartedAt is not null && workflow.Status?.FinishedAt is not null) + { + duration = workflow.Status?.FinishedAt - workflow.Status?.StartedAt; + } var stats = new Dictionary { { "workflowId", Event.WorkflowInstanceId }, - { "duration", workflow.Status?.EstimatedDuration.ToString() ?? string.Empty }, + { "duration", duration.HasValue ? duration.Value.TotalMilliseconds.ToString() : string.Empty }, { "startedAt", workflow.Status?.StartedAt.ToString() ?? string.Empty }, { "finishedAt", workflow.Status?.FinishedAt.ToString() ?? string.Empty } }; @@ -501,13 +506,13 @@ private async Task ConfigureInputArtifactStoreForTemplates(ICollection p.Arguments is not null).SelectMany(p => p.Arguments.Artifacts), true, cancellationToken).ConfigureAwait(false); + await ConfigureInputArtifactStore(template.Name, templates, template.Dag.Tasks.Where(p => p.Arguments is not null && p.Arguments.Artifacts is not null).SelectMany(p => p.Arguments.Artifacts), true, cancellationToken).ConfigureAwait(false); } else if (template.Steps is not null) { foreach (var step in template.Steps) { - await ConfigureInputArtifactStore(template.Name, templates, step.Where(p => p.Arguments is not null).SelectMany(p => p.Arguments.Artifacts), true, cancellationToken).ConfigureAwait(false); + await ConfigureInputArtifactStore(template.Name, templates, step.Where(p => p.Arguments is not null && p.Arguments.Artifacts is not null).SelectMany(p => p.Arguments.Artifacts), true, cancellationToken).ConfigureAwait(false); } } else if (template.Inputs is not null)