Skip to content
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

gh-347 Update log statement for debugging #366

Merged
merged 11 commits into from
Mar 28, 2023
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/execute@v0.10.2
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/upload-artifact@v3.1.2
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
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
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
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")]

File renamed without changes.
10 changes: 6 additions & 4 deletions src/CLI/Monai.Deploy.InformaticsGateway.CLI.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
~ Copyright 2021-2022 MONAI Consortium
~
~ Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -26,6 +26,7 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
Expand All @@ -38,6 +39,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="..\Api\Monai.Deploy.InformaticsGateway.Api.csproj" />
<ProjectReference Include="..\Client\Monai.Deploy.InformaticsGateway.Client.csproj" />
Expand All @@ -51,9 +56,6 @@
<ItemGroup>
<PackageReference Include="Crayon" Version="2.0.69" />
<PackageReference Include="Docker.DotNet" Version="3.125.13" />
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
Expand Down
6 changes: 0 additions & 6 deletions src/CLI/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"Microsoft.Extensions.Hosting": {
"type": "Direct",
"requested": "[6.0.1, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" Version="4.0.1" />
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="6.0.7" />
</ItemGroup>

Expand All @@ -44,4 +42,8 @@
<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>

</Project>
6 changes: 0 additions & 6 deletions src/Client.Common/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
"JetBrains.Annotations": "2021.3.0"
}
},
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"System.Text.Json": {
"type": "Direct",
"requested": "[6.0.7, )",
Expand Down
File renamed without changes.
8 changes: 5 additions & 3 deletions src/Client/Monai.Deploy.InformaticsGateway.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
</ItemGroup>
Expand All @@ -42,6 +40,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="..\Api\Monai.Deploy.InformaticsGateway.Api.csproj" />
<ProjectReference Include="..\Client.Common\Monai.Deploy.InformaticsGateway.Client.Common.csproj" />
Expand Down
6 changes: 0 additions & 6 deletions src/Client/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=="
},
"Microsoft.AspNet.WebApi.Client": {
"type": "Direct",
"requested": "[5.2.9, )",
Expand Down
10 changes: 6 additions & 4 deletions src/Common/Monai.Deploy.InformaticsGateway.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
~ Copyright 2021-2022 MONAI Consortium
~
~ Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -25,14 +25,12 @@
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" Version="4.0.1" />
<PackageReference Include="fo-dicom" Version="5.0.3" />
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="6.0.0" />
</ItemGroup>
Expand All @@ -47,4 +45,8 @@
<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>

</Project>
6 changes: 0 additions & 6 deletions src/Common/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
"System.Threading.Channels": "6.0.0"
}
},
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"System.IO.Abstractions": {
"type": "Direct",
"requested": "[17.2.3, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
<IsTrimmable>true</IsTrimmable>
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<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="..\Api\Monai.Deploy.InformaticsGateway.Api.csproj" />
<ProjectReference Include="..\Common\Monai.Deploy.InformaticsGateway.Common.csproj" />
Expand Down
6 changes: 0 additions & 6 deletions src/Configuration/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=="
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Direct",
"requested": "[6.0.3, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
Expand All @@ -30,6 +31,10 @@
<None Remove="Test\**" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
<PackageReference Include="Polly" Version="7.2.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
* limitations under the License.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.EntityFrameworkCore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
~ Copyright 2021-2022 MONAI Consortium
~
~ Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -24,6 +24,7 @@
<CodeAnalysisRuleSet>..\..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<Nullable>enable</Nullable>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
Expand All @@ -36,6 +37,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>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.15">
Expand Down
8 changes: 5 additions & 3 deletions src/Database/Monai.Deploy.InformaticsGateway.Database.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -61,11 +62,12 @@
<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>
<PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="6.0.2" />
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
Expand Down
Loading