From 52badd8d8ac027940e96a1cbffd6bbb192ac78d6 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 16 Nov 2023 20:43:18 -0600 Subject: [PATCH 1/6] New: Bump to net8 --- azure-pipelines.yml | 44 +++++++++--------- build.sh | 46 +++++++++---------- docs.sh | 2 +- package.json | 2 +- src/Directory.Build.props | 2 +- src/NzbDrone.Api.Test/Radarr.Api.Test.csproj | 2 +- .../Radarr.Automation.Test.csproj | 2 +- .../Radarr.Common.Test.csproj | 2 +- .../Disk/DestinationAlreadyExistsException.cs | 6 --- src/NzbDrone.Common/Radarr.Common.csproj | 12 ++--- src/NzbDrone.Console/Radarr.Console.csproj | 2 +- .../Migration/208_collectionsFixture.cs | 2 +- .../Radarr.Core.Test.csproj | 2 +- .../Datastore/Migration/208_collections.cs | 2 +- .../MovieImport/RecycleBinException.cs | 6 --- .../RootFolderNotFoundException.cs | 8 +--- src/NzbDrone.Core/Radarr.Core.csproj | 12 ++--- .../Radarr.Host.Test.csproj | 2 +- src/NzbDrone.Host/Radarr.Host.csproj | 6 +-- .../Radarr.Integration.Test.csproj | 4 +- .../Radarr.Libraries.Test.csproj | 2 +- .../Radarr.Mono.Test.csproj | 2 +- src/NzbDrone.Mono/Radarr.Mono.csproj | 2 +- src/NzbDrone.SignalR/Radarr.SignalR.csproj | 2 +- src/NzbDrone.Test.Common/NzbDroneRunner.cs | 2 +- .../Radarr.Test.Common.csproj | 2 +- .../Radarr.Test.Dummy.csproj | 2 +- .../Radarr.Update.Test.csproj | 2 +- src/NzbDrone.Update/Radarr.Update.csproj | 2 +- .../Radarr.Windows.Test.csproj | 2 +- src/NzbDrone.Windows/Radarr.Windows.csproj | 2 +- src/NzbDrone/Radarr.csproj | 4 +- src/Radarr.Api.V3/Radarr.Api.V3.csproj | 2 +- .../ApiKeyAuthenticationHandler.cs | 3 +- .../BasicAuthenticationHandler.cs | 8 ++-- .../Authentication/NoAuthenticationHandler.cs | 5 +- .../Middleware/VersionMiddleware.cs | 2 +- src/Radarr.Http/Radarr.Http.csproj | 2 +- .../ServiceInstall/ServiceInstall.csproj | 2 +- .../ServiceUninstall/ServiceUninstall.csproj | 2 +- yarn.lock | 38 ++++++++------- 41 files changed, 121 insertions(+), 135 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c610a535b..ea2a0220d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -122,27 +122,27 @@ stages: artifact: '$(osName)Backend' displayName: Publish Backend condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/win-x64/publish' + - publish: '$(testsFolder)/net8.0/win-x64/publish' artifact: win-x64-tests displayName: Publish win-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/linux-x64/publish' + - publish: '$(testsFolder)/net8.0/linux-x64/publish' artifact: linux-x64-tests displayName: Publish linux-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/linux-x86/publish' + - publish: '$(testsFolder)/net8.0/linux-x86/publish' artifact: linux-x86-tests displayName: Publish linux-x86 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/linux-musl-x64/publish' + - publish: '$(testsFolder)/net8.0/linux-musl-x64/publish' artifact: linux-musl-x64-tests displayName: Publish linux-musl-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/freebsd-x64/publish' + - publish: '$(testsFolder)/net8.0/freebsd-x64/publish' artifact: freebsd-x64-tests displayName: Publish freebsd-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/osx-x64/publish' + - publish: '$(testsFolder)/net8.0/osx-x64/publish' artifact: osx-x64-tests displayName: Publish osx-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) @@ -260,21 +260,21 @@ stages: archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/win-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/win-x64/net8.0 - task: ArchiveFiles@2 displayName: Create win-x86 zip inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x86.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/win-x86/net6.0 + rootFolderOrFile: $(artifactsFolder)/win-x86/net8.0 - task: ArchiveFiles@2 displayName: Create osx-x64 app inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-x64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net8.0 - task: ArchiveFiles@2 displayName: Create osx-x64 tar inputs: @@ -282,14 +282,14 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-x64/net8.0 - task: ArchiveFiles@2 displayName: Create osx-arm64 app inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-arm64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net8.0 - task: ArchiveFiles@2 displayName: Create osx-arm64 tar inputs: @@ -297,7 +297,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-arm64/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-arm64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-x64 tar inputs: @@ -305,7 +305,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-x64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-musl-x64 tar inputs: @@ -313,7 +313,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-x86 tar inputs: @@ -321,7 +321,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-x86/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-x86/net8.0 - task: ArchiveFiles@2 displayName: Create linux-arm tar inputs: @@ -329,7 +329,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-arm/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-arm/net8.0 - task: ArchiveFiles@2 displayName: Create linux-musl-arm tar inputs: @@ -337,7 +337,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-arm/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-arm/net8.0 - task: ArchiveFiles@2 displayName: Create linux-arm64 tar inputs: @@ -345,7 +345,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-arm64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-arm64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-musl-arm64 tar inputs: @@ -353,7 +353,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net8.0 - task: ArchiveFiles@2 displayName: Create freebsd-x64 tar inputs: @@ -361,7 +361,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/freebsd-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/freebsd-x64/net8.0 - publish: $(Build.ArtifactStagingDirectory) artifact: 'Packages' displayName: Publish Packages @@ -1220,8 +1220,8 @@ stages: sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml - bash: | - ./build.sh --backend -f net6.0 -r win-x64 - TEST_DIR=_tests/net6.0/win-x64/publish/ ./test.sh Windows Unit Coverage + ./build.sh --backend -f net8.0 -r win-x64 + TEST_DIR=_tests/net8.0/win-x64/publish/ ./test.sh Windows Unit Coverage displayName: Coverage Unit Tests - task: SonarCloudAnalyze@1 condition: eq(variables['System.PullRequest.IsFork'], 'False') diff --git a/build.sh b/build.sh index 2cb5facae..e792ed810 100755 --- a/build.sh +++ b/build.sh @@ -137,7 +137,7 @@ PackageLinux() echo "Adding Radarr.Mono to UpdatePackage" cp $folder/Radarr.Mono.* $folder/Radarr.Update - if [ "$framework" = "net6.0" ]; then + if [ "$framework" = "net8.0" ]; then cp $folder/Mono.Posix.NETStandard.* $folder/Radarr.Update cp $folder/libMonoPosixHelper.* $folder/Radarr.Update fi @@ -165,7 +165,7 @@ PackageMacOS() echo "Adding Radarr.Mono to UpdatePackage" cp $folder/Radarr.Mono.* $folder/Radarr.Update - if [ "$framework" = "net6.0" ]; then + if [ "$framework" = "net8.0" ]; then cp $folder/Mono.Posix.NETStandard.* $folder/Radarr.Update cp $folder/libMonoPosixHelper.* $folder/Radarr.Update fi @@ -377,15 +377,15 @@ then Build if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then - PackageTests "net6.0" "win-x64" - PackageTests "net6.0" "win-x86" - PackageTests "net6.0" "linux-x64" - PackageTests "net6.0" "linux-musl-x64" - PackageTests "net6.0" "osx-x64" + PackageTests "net8.0" "win-x64" + PackageTests "net8.0" "win-x86" + PackageTests "net8.0" "linux-x64" + PackageTests "net8.0" "linux-musl-x64" + PackageTests "net8.0" "osx-x64" if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ]; then - PackageTests "net6.0" "freebsd-x64" - PackageTests "net6.0" "linux-x86" + PackageTests "net8.0" "freebsd-x64" + PackageTests "net8.0" "linux-x86" fi else PackageTests "$FRAMEWORK" "$RID" @@ -413,20 +413,20 @@ then if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then - Package "net6.0" "win-x64" - Package "net6.0" "win-x86" - Package "net6.0" "linux-x64" - Package "net6.0" "linux-musl-x64" - Package "net6.0" "linux-arm64" - Package "net6.0" "linux-musl-arm64" - Package "net6.0" "linux-arm" - Package "net6.0" "linux-musl-arm" - Package "net6.0" "osx-x64" - Package "net6.0" "osx-arm64" + Package "net8.0" "win-x64" + Package "net8.0" "win-x86" + Package "net8.0" "linux-x64" + Package "net8.0" "linux-musl-x64" + Package "net8.0" "linux-arm64" + Package "net8.0" "linux-musl-arm64" + Package "net8.0" "linux-arm" + Package "net8.0" "linux-musl-arm" + Package "net8.0" "osx-x64" + Package "net8.0" "osx-arm64" if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ]; then - Package "net6.0" "freebsd-x64" - Package "net6.0" "linux-x86" + Package "net8.0" "freebsd-x64" + Package "net8.0" "linux-x86" fi else Package "$FRAMEWORK" "$RID" @@ -436,7 +436,7 @@ fi if [ "$INSTALLER" = "YES" ]; then InstallInno - BuildInstaller "net6.0" "win-x64" - BuildInstaller "net6.0" "win-x86" + BuildInstaller "net8.0" "win-x64" + BuildInstaller "net8.0" "win-x86" RemoveInno fi diff --git a/docs.sh b/docs.sh index 606af8e9e..593412d8f 100644 --- a/docs.sh +++ b/docs.sh @@ -29,7 +29,7 @@ dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p dotnet new tool-manifest dotnet tool install --version 6.5.0 Swashbuckle.AspNetCore.Cli -dotnet tool run swagger tofile --output ./src/Radarr.Api.V3/openapi.json "$outputFolder/net6.0/$RUNTIME/radarr.console.dll" v3 & +dotnet tool run swagger tofile --output ./src/Radarr.Api.V3/openapi.json "$outputFolder/net8.0/$RUNTIME/radarr.console.dll" v3 & sleep 45 diff --git a/package.json b/package.json index 8bb6b63fc..96b8a725d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@fortawesome/free-solid-svg-icons": "6.4.0", "@fortawesome/react-fontawesome": "0.2.0", "@juggle/resize-observer": "3.4.0", - "@microsoft/signalr": "6.0.25", + "@microsoft/signalr": "8.0.0", "@sentry/browser": "7.100.0", "@sentry/integrations": "7.100.0", "@types/node": "18.19.31", diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 08ce7c1cf..7edf52d85 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -136,7 +136,7 @@ - + diff --git a/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj b/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj index 9bfecde2c..555287131 100644 --- a/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj +++ b/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj b/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj index 8e8212080..9c31c67ba 100644 --- a/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj +++ b/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj b/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj index 3726a01c7..054797a9f 100644 --- a/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 diff --git a/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs b/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs index ffdc36e0e..d96bb22e9 100644 --- a/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs +++ b/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Runtime.Serialization; namespace NzbDrone.Common.Disk { @@ -24,10 +23,5 @@ namespace NzbDrone.Common.Disk : base(message, innerException) { } - - protected DestinationAlreadyExistsException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } } diff --git a/src/NzbDrone.Common/Radarr.Common.csproj b/src/NzbDrone.Common/Radarr.Common.csproj index f6c13069e..0dd14effd 100644 --- a/src/NzbDrone.Common/Radarr.Common.csproj +++ b/src/NzbDrone.Common/Radarr.Common.csproj @@ -1,12 +1,12 @@  - net6.0 + net8.0 ISMUSL - - + + @@ -14,13 +14,13 @@ - + - + - + diff --git a/src/NzbDrone.Console/Radarr.Console.csproj b/src/NzbDrone.Console/Radarr.Console.csproj index 8e5a92e07..8ede30c64 100644 --- a/src/NzbDrone.Console/Radarr.Console.csproj +++ b/src/NzbDrone.Console/Radarr.Console.csproj @@ -1,7 +1,7 @@ Exe - net6.0 + net8.0 ..\NzbDrone.Host\Radarr.ico diff --git a/src/NzbDrone.Core.Test/Datastore/Migration/208_collectionsFixture.cs b/src/NzbDrone.Core.Test/Datastore/Migration/208_collectionsFixture.cs index 24a077115..919b48670 100644 --- a/src/NzbDrone.Core.Test/Datastore/Migration/208_collectionsFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/Migration/208_collectionsFixture.cs @@ -9,7 +9,7 @@ using NzbDrone.Core.Test.Framework; namespace NzbDrone.Core.Test.Datastore.Migration { [TestFixture] - public class collectionsFixture : MigrationTest + public class collectionsFixture : MigrationTest { [Test] public void should_add_collection_from_movie_and_link_back_to_movie() diff --git a/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj b/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj index 817a16efc..5c83ca4a1 100644 --- a/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Core/Datastore/Migration/208_collections.cs b/src/NzbDrone.Core/Datastore/Migration/208_collections.cs index d647d1129..b982e37d3 100644 --- a/src/NzbDrone.Core/Datastore/Migration/208_collections.cs +++ b/src/NzbDrone.Core/Datastore/Migration/208_collections.cs @@ -12,7 +12,7 @@ using NzbDrone.Core.Parser; namespace NzbDrone.Core.Datastore.Migration { [Migration(208)] - public class collections : NzbDroneMigrationBase + public class add_collections : NzbDroneMigrationBase { protected override void MainDbUpgrade() { diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/RecycleBinException.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/RecycleBinException.cs index 34e4eac9e..baa1af668 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/RecycleBinException.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/RecycleBinException.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Runtime.Serialization; namespace NzbDrone.Core.MediaFiles.MovieImport { @@ -19,10 +18,5 @@ namespace NzbDrone.Core.MediaFiles.MovieImport : base(message, innerException) { } - - protected RecycleBinException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } } diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/RootFolderNotFoundException.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/RootFolderNotFoundException.cs index 1d47aac4b..6a3a7b1a0 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/RootFolderNotFoundException.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/RootFolderNotFoundException.cs @@ -1,6 +1,5 @@ -using System; +using System; using System.IO; -using System.Runtime.Serialization; namespace NzbDrone.Core.MediaFiles.MovieImport { @@ -19,10 +18,5 @@ namespace NzbDrone.Core.MediaFiles.MovieImport : base(message, innerException) { } - - protected RootFolderNotFoundException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } } diff --git a/src/NzbDrone.Core/Radarr.Core.csproj b/src/NzbDrone.Core/Radarr.Core.csproj index b44d8e69a..cc63e8f2b 100644 --- a/src/NzbDrone.Core/Radarr.Core.csproj +++ b/src/NzbDrone.Core/Radarr.Core.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 @@ -12,10 +12,10 @@ - - - - + + + + @@ -25,7 +25,7 @@ - + diff --git a/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj b/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj index 23c9f2249..ee5cb6f05 100644 --- a/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj +++ b/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 diff --git a/src/NzbDrone.Host/Radarr.Host.csproj b/src/NzbDrone.Host/Radarr.Host.csproj index 3de6409e6..f12f4e6b9 100644 --- a/src/NzbDrone.Host/Radarr.Host.csproj +++ b/src/NzbDrone.Host/Radarr.Host.csproj @@ -1,11 +1,11 @@  - net6.0 + net8.0 Library - - + + diff --git a/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj b/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj index ae0db6152..dec5ca9d2 100644 --- a/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj @@ -1,10 +1,10 @@  - net6.0 + net8.0 Library - + diff --git a/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj index e62c371b8..467027084 100644 --- a/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 diff --git a/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj b/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj index 9bfb6f830..dbc5cb1e7 100644 --- a/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 - - - - - diff --git a/src/NzbDrone.Common/Radarr.Common.csproj b/src/NzbDrone.Common/Radarr.Common.csproj index 0dd14effd..3364adfaf 100644 --- a/src/NzbDrone.Common/Radarr.Common.csproj +++ b/src/NzbDrone.Common/Radarr.Common.csproj @@ -8,13 +8,13 @@ - - - + + + - - + + diff --git a/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj b/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj index 5c83ca4a1..b536b23be 100644 --- a/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj @@ -3,7 +3,7 @@ net8.0 - + diff --git a/src/NzbDrone.Core/Radarr.Core.csproj b/src/NzbDrone.Core/Radarr.Core.csproj index cc63e8f2b..ef24166a2 100644 --- a/src/NzbDrone.Core/Radarr.Core.csproj +++ b/src/NzbDrone.Core/Radarr.Core.csproj @@ -3,17 +3,17 @@ net8.0 - + - + - + @@ -22,10 +22,10 @@ - + - + diff --git a/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj b/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj index dec5ca9d2..57c61b1ef 100644 --- a/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj @@ -4,7 +4,7 @@ Library - + diff --git a/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj b/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj index 667e19269..e7baf786a 100644 --- a/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/Radarr.Test.Common.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/NzbDrone.Update/Radarr.Update.csproj b/src/NzbDrone.Update/Radarr.Update.csproj index 41f24bd8e..0477ed74b 100644 --- a/src/NzbDrone.Update/Radarr.Update.csproj +++ b/src/NzbDrone.Update/Radarr.Update.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/NzbDrone.Windows/Radarr.Windows.csproj b/src/NzbDrone.Windows/Radarr.Windows.csproj index 8fdb8d495..844fff0d5 100644 --- a/src/NzbDrone.Windows/Radarr.Windows.csproj +++ b/src/NzbDrone.Windows/Radarr.Windows.csproj @@ -4,7 +4,7 @@ true - + diff --git a/src/Radarr.Api.V3/Radarr.Api.V3.csproj b/src/Radarr.Api.V3/Radarr.Api.V3.csproj index ddc83d4f0..e4d825685 100644 --- a/src/Radarr.Api.V3/Radarr.Api.V3.csproj +++ b/src/Radarr.Api.V3/Radarr.Api.V3.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Radarr.Http/Radarr.Http.csproj b/src/Radarr.Http/Radarr.Http.csproj index effc2c361..52465606e 100644 --- a/src/Radarr.Http/Radarr.Http.csproj +++ b/src/Radarr.Http/Radarr.Http.csproj @@ -5,7 +5,7 @@ - + diff --git a/test.sh b/test.sh index 0e0fe9bc6..22fd648dc 100755 --- a/test.sh +++ b/test.sh @@ -37,11 +37,14 @@ fi if [ "$PLATFORM" = "Windows" ]; then mkdir -p "$ProgramData/Radarr" WHERE="$WHERE&Category!=LINUX" -elif [ "$PLATFORM" = "Linux" ] || [ "$PLATFORM" = "Mac" ] ; then +elif [ "$PLATFORM" = "Linux" ]; then mkdir -p ~/.config/Radarr WHERE="$WHERE&Category!=WINDOWS" +elif [ "$PLATFORM" = "Mac" ]; then + mkdir -p ~/Library/Application\ Support/Radarr + WHERE="$WHERE&Category!=WINDOWS" else - echo "Platform must be provided as first arguement: Windows, Linux or Mac" + echo "Platform must be provided as first argument: Windows, Linux or Mac" exit 1 fi From 102d7c93154d8c7a750b8d23125dd577dcb0efc6 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 1 May 2024 21:16:45 +0300 Subject: [PATCH 3/6] Migrate appdata folder on dotnet 8 for OSX --- .../EnvironmentInfo/AppFolderFactory.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs index 84bb2ad9c..55dfb4530 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs @@ -75,6 +75,17 @@ namespace NzbDrone.Common.EnvironmentInfo { try { + if (OsInfo.IsOsx) + { + var userAppDataFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile, Environment.SpecialFolderOption.DoNotVerify), ".config", "Radarr"); + + if (_diskProvider.FolderExists(userAppDataFolder) && !_diskProvider.FileExists(_appFolderInfo.GetConfigPath())) + { + _diskTransferService.MirrorFolder(userAppDataFolder, _appFolderInfo.AppDataFolder); + _diskProvider.DeleteFolder(userAppDataFolder, true); + } + } + var oldDbFile = Path.Combine(_appFolderInfo.AppDataFolder, "nzbdrone.db"); if (_startupContext.Args.ContainsKey(StartupContext.APPDATA)) From 41a50a82f59d2f868833534305cbd8ae92f4fc77 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 3 May 2024 12:34:40 +0300 Subject: [PATCH 4/6] fixup! New: Bump to net8 --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 948a0a527..b5d7f5c49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -474,6 +474,7 @@ stages: displayName: Run Tests env: TEST_DIR: $(Build.SourcesDirectory)/_tests + COMPlus_EnableDiagnostics: 0 - task: PublishTestResults@2 displayName: Publish Test Results inputs: @@ -533,6 +534,8 @@ stages: ls -lR ${TESTSFOLDER} ${TESTSFOLDER}/test.sh Linux Unit Test displayName: Run Tests + env: + COMPlus_EnableDiagnostics: 0 - task: PublishTestResults@2 displayName: Publish Test Results inputs: From 05e537ea7a2e307c3c3ad0b6052edf4919683caf Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 3 May 2024 17:36:00 +0300 Subject: [PATCH 5/6] Fail build on missing test results --- azure-pipelines.yml | 14 ++++++++++++-- test.sh | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b5d7f5c49..a8bdc7602 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -474,7 +474,6 @@ stages: displayName: Run Tests env: TEST_DIR: $(Build.SourcesDirectory)/_tests - COMPlus_EnableDiagnostics: 0 - task: PublishTestResults@2 displayName: Publish Test Results inputs: @@ -482,6 +481,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: '$(testName) Unit Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true - job: Unit_Docker displayName: Unit Docker @@ -536,6 +536,7 @@ stages: displayName: Run Tests env: COMPlus_EnableDiagnostics: 0 + DOTNET_GCHeapHardLimit: 100000000 - task: PublishTestResults@2 displayName: Publish Test Results inputs: @@ -543,7 +544,8 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: '$(testName) Unit Tests' failTaskOnFailedTests: true - + failTaskOnMissingResultsFile: true + - job: Unit_LinuxCore_Postgres14 displayName: Unit Native LinuxCore with Postgres14 Database dependsOn: Prepare @@ -599,6 +601,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: 'LinuxCore Postgres14 Unit Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true - job: Unit_LinuxCore_Postgres15 displayName: Unit Native LinuxCore with Postgres15 Database @@ -655,6 +658,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: 'LinuxCore Postgres15 Unit Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true - stage: Integration displayName: Integration @@ -737,6 +741,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: '$(testName) Integration Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true displayName: Publish Test Results - job: Integration_LinuxCore_Postgres14 @@ -799,6 +804,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: 'Integration LinuxCore Postgres14 Database Integration Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true displayName: Publish Test Results @@ -862,6 +868,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: 'Integration LinuxCore Postgres15 Database Integration Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true displayName: Publish Test Results - job: Integration_FreeBSD @@ -908,6 +915,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: 'FreeBSD Integration Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true displayName: Publish Test Results - job: Integration_Docker @@ -977,6 +985,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: '$(testName) Integration Tests' failTaskOnFailedTests: true + failTaskOnMissingResultsFile: true displayName: Publish Test Results - stage: Automation @@ -1058,6 +1067,7 @@ stages: testResultsFiles: '**/TestResult.xml' testRunTitle: '$(osName) Automation Tests' failTaskOnFailedTests: $(failBuild) + failTaskOnMissingResultsFile: $(failBuild) displayName: Publish Test Results - stage: Analyze diff --git a/test.sh b/test.sh index 22fd648dc..1e9a3102d 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,6 @@ #! /bin/bash +set -x + PLATFORM=$1 TYPE=$2 COVERAGE=$3 From 4300c53b432d1324694a5a62524a70911bdab284 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 3 May 2024 19:48:07 +0300 Subject: [PATCH 6/6] fixup! Fail build on missing test results --- azure-pipelines.yml | 2 +- test.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a8bdc7602..f0f7fd914 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -536,7 +536,7 @@ stages: displayName: Run Tests env: COMPlus_EnableDiagnostics: 0 - DOTNET_GCHeapHardLimit: 100000000 + DOTNET_GCHeapHardLimit: 10000000 - task: PublishTestResults@2 displayName: Publish Test Results inputs: diff --git a/test.sh b/test.sh index 1e9a3102d..c96531c43 100755 --- a/test.sh +++ b/test.sh @@ -1,6 +1,10 @@ #! /bin/bash set -x +echo $DOTNET_GCHeapHardLimit +cat /proc/meminfo +ulimit -a + PLATFORM=$1 TYPE=$2 COVERAGE=$3