Skip to content

Patch/0.3.15 #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
97d1b53
Bump actions/upload-artifact from 3.1.1 to 3.1.2 (#314)
dependabot[bot] Jan 11, 2023
c0e35e9
Bump actions/cache from 3.0.11 to 3.2.3 (#313)
dependabot[bot] Jan 11, 2023
2831d3c
Bump Microsoft.NET.Test.Sdk from 17.4.0 to 17.4.1 (#309)
dependabot[bot] Jan 11, 2023
7ad457a
Clears payload at startup (#326)
mocsharp Feb 5, 2023
e3a463b
Fix payload assembler not respecting user configured timeout window (…
mocsharp Feb 9, 2023
1067bb0
Bump Microsoft.EntityFrameworkCore.InMemory from 6.0.13 to 6.0.14 (#337)
dependabot[bot] Feb 21, 2023
55f78e3
Bump Microsoft.EntityFrameworkCore from 6.0.13 to 6.0.14 (#336)
dependabot[bot] Feb 21, 2023
efaab5c
Bump Microsoft.EntityFrameworkCore.Design from 6.0.13 to 6.0.14 (#335)
dependabot[bot] Feb 21, 2023
49227ef
Bump anchore/scan-action from 3.3.2 to 3.3.4 (#334)
dependabot[bot] Feb 21, 2023
65c549e
Bump actions/cache from 3.2.3 to 3.2.5 (#333)
dependabot[bot] Feb 21, 2023
539ae4d
Bump docker/build-push-action from 3.2.0 to 4.0.0 (#328)
dependabot[bot] Feb 21, 2023
2267f21
Bump docker/metadata-action from 4.1.1 to 4.3.0 (#319)
dependabot[bot] Feb 21, 2023
3b1b3c7
Bump actions/cache from 3.2.5 to 3.2.6 (#342)
dependabot[bot] Mar 8, 2023
a176f43
Bump Microsoft.EntityFrameworkCore.Sqlite from 6.0.13 to 6.0.14 (#338)
dependabot[bot] Mar 8, 2023
86cb04c
Update messaging lib to 0.1.20 (#343)
mocsharp Mar 8, 2023
7c97f1e
Log payload move exception (#323)
mocsharp Mar 8, 2023
4906d18
Update message lib to 0.1.21 (#345)
mocsharp Mar 10, 2023
1a2af0c
gh-347 Remove incomplete payloads on timeout (#348)
mocsharp Mar 11, 2023
76b145d
Bump Microsoft.NET.Test.Sdk from 17.4.1 to 17.5.0 (#354)
dependabot[bot] Mar 15, 2023
4359c79
Bump gittools/actions from 0.9.15 to 0.10.2 (#352)
dependabot[bot] Mar 15, 2023
4142479
Bump actions/cache from 3.2.6 to 3.3.1 (#350)
dependabot[bot] Mar 15, 2023
88f1f3e
upping licenses
neildsouth Mar 16, 2023
8a4d6f3
upped dependancies
neildsouth Mar 16, 2023
9a11492
Merge pull request #356 from Project-MONAI/ac1619-nds
neildsouth Mar 16, 2023
222c747
Update Storage & Messaging libraries (#355)
mocsharp Mar 17, 2023
a8caee3
Add PUT /config/ae (#371)
mocsharp Mar 28, 2023
fcbd588
gh-347 Update log statement for debugging (#366)
mocsharp Mar 28, 2023
79df729
Merge with main
mocsharp Mar 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ branches:
ignore:
sha: []
merge-message-formats: {}
next-version: 0.3.13
next-version: 0.3.14
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,21 @@ jobs:
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
updateAssemblyInfo: true
updateAssemblyInfoFilename: src/AssemblyInfo.cs
configFilePath: .github/.gitversion.yml

- name: Print AssemblyInfo
run: cat src/AssemblyInfo.cs

- name: Upload AssemblyInfo
uses: actions/[email protected]
if: always()
with:
name: assembly-info
path: src/AssemblyInfo.cs
retention-days: 30

CodeQL-Analyze:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -330,6 +343,16 @@ jobs:
restore-keys: |
${{ runner.os }}-nuget

- name: Download AssemblyInfo.cs
id: download
uses: actions/download-artifact@v3
with:
name: assembly-info
path: src/

- name: Print AssemblyInfo
run: cat src/AssemblyInfo.cs

- name: Restore dependencies
run: dotnet restore
working-directory: ./src
Expand Down
6 changes: 3 additions & 3 deletions doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2401,21 +2401,21 @@
- :who: mocsharp
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
:versions:
- 2.19.0
- 2.19.1
:when: 2022-11-16 23:38:53.891380809 Z
- - :approve
- MongoDB.Driver
- :who: mocsharp
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
:versions:
- 2.19.0
- 2.19.1
:when: 2022-11-16 23:38:54.213853364 Z
- - :approve
- MongoDB.Driver.Core
- :who: mocsharp
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
:versions:
- 2.19.0
- 2.19.1
:when: 2022-11-16 23:38:54.553730219 Z
- - :approve
- MongoDB.Libmongocrypt
Expand Down
59 changes: 59 additions & 0 deletions docs/api/rest/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,65 @@ curl --location --request POST 'http://localhost:5000/config/ae/' \

---

## PUT /config/ae

Updates an existing MONAI SCP Application Entity.

> [!Note]
> The MONAI SCP AE Title cannot be changed.

> [!Note]
> The DICOM tag used for `grouping` can be either a Study Instance UID (0020,000D) or Series Instance UID (0020,000E).
> The default is set to a Study Instance UID (0020,000D) if not specified.

> [!Note]
> `timeout` is the number of seconds the AE Title will wait between each instance before assembling a payload and publishing
> a workflow request. We recommend calculating this value based on the network speed and the maximum size of each
> DICOM instance.

### Parameters

See the [MonaiApplicationEntity](xref:Monai.Deploy.InformaticsGateway.Api.MonaiApplicationEntity)
class definition for details.

### Responses

Response Content Type: JSON - [MonaiApplicationEntity](xref:Monai.Deploy.InformaticsGateway.Api.MonaiApplicationEntity).

| Code | Description |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | AE Title updated successfully. |
| 400 | Validation error. The response will be a [Problem details](https://datatracker.ietf.org/doc/html/rfc7807) object with server error details. |
| 404 | Named MONAI AE not found. |
| 500 | Server error. The response will be a [Problem details](https://datatracker.ietf.org/doc/html/rfc7807) object with server error details. |

### Example Request

```bash
curl --location --request PUT 'http://localhost:5000/config/ae/' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "breast-tumor",
"timeout": 3,
"workflows": [
"3f6a08a1-0dea-44e9-ab82-1ff1adf43a8e"
]
}
}'
```

### Example Response

```json
{
"name": "breast-tumor",
"aeTitle": "BREASTV1",
"workflows": ["3f6a08a1-0dea-44e9-ab82-1ff1adf43a8e"],
"timeout": 3
}
```

---
## DELETE /config/ae/{name}

Deletes the specified MONAI SCP Application Entity.
Expand Down
15 changes: 14 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ Copyright 2021-2022 MONAI Consortium
~ Copyright 2021-2023 MONAI Consortium
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,19 @@

# Changelog

## 0.3.15

[GitHub Milestone 0.3.15](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/milestone/20)

- New APIs for managing SCP AE Titles
- `PUT /config/ae`: [Update SCP AE TItle](./api/rest/config.md#put-configae)

## 0.3.14

[GitHub Milestone 0.3.14](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/milestone/19)

- Fixes RabbitMQ startup issues.

## 0.3.13

[GitHub Milestone 0.3.13](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/milestone/18)
Expand Down
18 changes: 9 additions & 9 deletions docs/compliance/third-party-licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -8672,14 +8672,14 @@ By downloading this software, you agree to the license terms & all licenses list


<details>
<summary>MongoDB.Bson 2.19.0</summary>
<summary>MongoDB.Bson 2.19.1</summary>

## MongoDB.Bson

- Version: 2.19.0
- Version: 2.19.1
- Authors: MongoDB Inc.
- Project URL: https://www.mongodb.com/docs/drivers/csharp/
- Source: [NuGet](https://www.nuget.org/packages/MongoDB.Bson/2.19.0)
- Source: [NuGet](https://www.nuget.org/packages/MongoDB.Bson/2.19.1)
- License: [Apache-2.0](https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)


Expand All @@ -8704,14 +8704,14 @@ By downloading this software, you agree to the license terms & all licenses list


<details>
<summary>MongoDB.Driver 2.19.0</summary>
<summary>MongoDB.Driver 2.19.1</summary>

## MongoDB.Driver

- Version: 2.19.0
- Version: 2.19.1
- Authors: MongoDB Inc.
- Project URL: https://www.mongodb.com/docs/drivers/csharp/
- Source: [NuGet](https://www.nuget.org/packages/MongoDB.Driver/2.19.0)
- Source: [NuGet](https://www.nuget.org/packages/MongoDB.Driver/2.19.1)
- License: [Apache-2.0](https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)


Expand All @@ -8736,14 +8736,14 @@ By downloading this software, you agree to the license terms & all licenses list


<details>
<summary>MongoDB.Driver.Core 2.19.0</summary>
<summary>MongoDB.Driver.Core 2.19.1</summary>

## MongoDB.Driver.Core

- Version: 2.19.0
- Version: 2.19.1
- Authors: MongoDB Inc.
- Project URL: https://www.mongodb.com/docs/drivers/csharp/
- Source: [NuGet](https://www.nuget.org/packages/MongoDB.Driver.Core/2.19.0)
- Source: [NuGet](https://www.nuget.org/packages/MongoDB.Driver.Core/2.19.1)
- License: [Apache-2.0](https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)


Expand Down
8 changes: 5 additions & 3 deletions src/Api/Monai.Deploy.InformaticsGateway.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Macross.Json.Extensions" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.15" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.22" />
Expand All @@ -46,6 +44,10 @@
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Common\Monai.Deploy.InformaticsGateway.Common.csproj" />
</ItemGroup>
Expand Down
27 changes: 25 additions & 2 deletions src/Api/MonaiApplicationEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
Expand Down Expand Up @@ -95,6 +96,16 @@ public class MonaiApplicationEntity : MongoDBEntityBase
/// </summary>
public string? CreatedBy { get; set; }

/// <summary>
/// Gets or set the most recent user who updated the DICOM entity.
/// </summary>
public string? UpdatedBy { get; set; }

/// <summary>
/// Gets or set the most recent date time the DICOM entity was updated.
/// </summary>
public DateTime? DateTimeUpdated { get; set; }

public MonaiApplicationEntity()
{
SetDefaultValues();
Expand Down Expand Up @@ -124,9 +135,21 @@ public override string ToString()
return $"Name: {Name}/AET: {AeTitle}";
}

public void SetAuthor(ClaimsPrincipal user)
public void SetAuthor(ClaimsPrincipal user, EditMode editMode)
{
CreatedBy = user.Identity?.Name;
if (editMode == EditMode.Update)
{
DateTimeUpdated = DateTime.UtcNow;
}

if (editMode == EditMode.Create)
{
CreatedBy = user.Identity?.Name;
}
else if (editMode == EditMode.Update)
{
UpdatedBy = user.Identity?.Name;
}
}
}
}
3 changes: 3 additions & 0 deletions src/Api/Storage/Payload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public TimeSpan Elapsed

public string? CalledAeTitle { get => Files.OfType<DicomFileStorageMetadata>().Select(p => p.CalledAeTitle).FirstOrDefault(); }

public int FilesUploaded { get => Files.Count(p => p.IsUploaded); }
public int FilesFailedToUpload { get => Files.Count(p => p.IsUploadFailed); }

public Payload(string key, string correlationId, uint timeout)
{
Guard.Against.NullOrWhiteSpace(key);
Expand Down
3 changes: 1 addition & 2 deletions src/Api/Test/Monai.Deploy.InformaticsGateway.Api.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
<PackageReference Include="xRetry" Version="1.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
<PackageReference Include="xRetry" Version="1.9.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down
6 changes: 0 additions & 6 deletions src/Api/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"version": 1,
"dependencies": {
"net6.0": {
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"Macross.Json.Extensions": {
"type": "Direct",
"requested": "[3.0.0, )",
Expand Down
22 changes: 22 additions & 0 deletions src/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2023 MONAI Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using System.Reflection;

[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]
[assembly: AssemblyInformationalVersion("0.0.0")]

Loading