From 4f059bb565790420539ce02a5223207009a5951d Mon Sep 17 00:00:00 2001 From: Dominion Date: Tue, 20 Dec 2022 13:31:05 -0500 Subject: [PATCH 1/8] Fix webpanel redirect not working without config --- src/Tgstation.Server.Host/Controllers/HomeController.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Controllers/HomeController.cs b/src/Tgstation.Server.Host/Controllers/HomeController.cs index 3b5a2b3d9a..2bf911a446 100644 --- a/src/Tgstation.Server.Host/Controllers/HomeController.cs +++ b/src/Tgstation.Server.Host/Controllers/HomeController.cs @@ -165,7 +165,12 @@ namespace Tgstation.Server.Host.Controllers if (controlPanelConfiguration.Enable && !Request.Headers.TryGetValue(ApiHeaders.ApiVersionHeader, out _)) { Logger.LogDebug("No API headers on request, redirecting to control panel..."); - return Redirect(controlPanelConfiguration.PublicPath ?? ControlPanelController.ControlPanelRoute); + + var controlPanelRoute = controlPanelConfiguration.PublicPath; + if (String.IsNullOrWhiteSpace(controlPanelRoute)) + controlPanelRoute = ControlPanelController.ControlPanelRoute; + + return Redirect(controlPanelRoute); } try From 1449276ba9590038ae0ad820b129e2e5483a1a50 Mon Sep 17 00:00:00 2001 From: Dominion Date: Tue, 20 Dec 2022 13:31:22 -0500 Subject: [PATCH 2/8] Version bump to 5.2.4 --- build/Version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Version.props b/build/Version.props index d5a53ab32a..53af5bd78b 100644 --- a/build/Version.props +++ b/build/Version.props @@ -3,7 +3,7 @@ - 5.2.3 + 5.2.4 4.4.0 9.7.0 10.1.0 From 87907b3f48613035178bcefa2fd30f037704649a Mon Sep 17 00:00:00 2001 From: Dominion Date: Tue, 20 Dec 2022 13:34:07 -0500 Subject: [PATCH 3/8] Bump Newtosoft.Json version --- src/Tgstation.Server.Api/Tgstation.Server.Api.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj index 7f275db48d..0840359482 100644 --- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj +++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj @@ -47,7 +47,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 48088b223c132964f066e8aece7bc522bf7bdbf1 Mon Sep 17 00:00:00 2001 From: Dominion Date: Tue, 20 Dec 2022 13:59:59 -0500 Subject: [PATCH 4/8] Fix Dockerfile --- build/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 48113a8414..a48a345099 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -33,9 +33,7 @@ WORKDIR /repo/src/Tgstation.Server.Host COPY src/Tgstation.Server.Host/Tgstation.Server.Host.csproj ./ # I cant figure out how to run npm as non root so eh -RUN npm set unsafe-perm true RUN dotnet msbuild -target:NpmBuild -RUN npm set unsafe-perm fals WORKDIR /repo From e8f10e20bb8d607b3acd9748f52444f3db0b1ba7 Mon Sep 17 00:00:00 2001 From: Dominion Date: Tue, 27 Dec 2022 12:33:12 -0500 Subject: [PATCH 5/8] Potential fix for dotnet test invocation --- .github/workflows/ci-suite.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml index a956e18fc9..9e9391a2d1 100644 --- a/.github/workflows/ci-suite.yml +++ b/.github/workflows/ci-suite.yml @@ -173,7 +173,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }}NoService - name: Run Unit Tests - run: sudo dotnet test tgstation-server.sln --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults + run: sudo dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln - name: Store Code Coverage uses: actions/upload-artifact@v3 @@ -204,7 +204,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }} - name: Run Unit Tests - run: dotnet test tgstation-server.sln --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }} --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults + run: dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }} --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln - name: Store Code Coverage uses: actions/upload-artifact@v3 From a843b76fac15a71a0174e1967b3612587dc848b1 Mon Sep 17 00:00:00 2001 From: Dominion Date: Sun, 1 Jan 2023 19:25:16 -0500 Subject: [PATCH 6/8] Add --verbose to Linux test command Need to see what's up --- .github/workflows/ci-suite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml index 9e9391a2d1..9d47d2b797 100644 --- a/.github/workflows/ci-suite.yml +++ b/.github/workflows/ci-suite.yml @@ -173,7 +173,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }}NoService - name: Run Unit Tests - run: sudo dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln + run: sudo dotnet test -v diagnostic --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln - name: Store Code Coverage uses: actions/upload-artifact@v3 From f11e5e2cff76728fc391b6387eefde151126da51 Mon Sep 17 00:00:00 2001 From: Dominion Date: Tue, 3 Jan 2023 09:21:40 -0500 Subject: [PATCH 7/8] Remove console logger specification for unit tests --- .github/workflows/ci-suite.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml index 9d47d2b797..8151163448 100644 --- a/.github/workflows/ci-suite.yml +++ b/.github/workflows/ci-suite.yml @@ -173,7 +173,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }}NoService - name: Run Unit Tests - run: sudo dotnet test -v diagnostic --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln + run: sudo dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln - name: Store Code Coverage uses: actions/upload-artifact@v3 @@ -204,7 +204,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }} - name: Run Unit Tests - run: dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -l "console;verbosity=detailed;noprogress=true" -c ${{ matrix.configuration }} --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln + run: dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -c ${{ matrix.configuration }} --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln - name: Store Code Coverage uses: actions/upload-artifact@v3 From f33a1f72d80e4440cd86cac05f5c6d6d9c7c76ee Mon Sep 17 00:00:00 2001 From: Dominion Date: Tue, 3 Jan 2023 18:18:41 -0500 Subject: [PATCH 8/8] Fix dotnet test directory --- .github/workflows/ci-suite.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml index 8151163448..48befd67f3 100644 --- a/.github/workflows/ci-suite.yml +++ b/.github/workflows/ci-suite.yml @@ -173,7 +173,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }}NoService - name: Run Unit Tests - run: sudo dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln + run: sudo dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -c ${{ matrix.configuration }}NoService --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings --results-directory ./TestResults tgstation-server.sln - name: Store Code Coverage uses: actions/upload-artifact@v3 @@ -204,7 +204,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }} - name: Run Unit Tests - run: dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -c ${{ matrix.configuration }} --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings -r ./TestResults tgstation-server.sln + run: dotnet test --no-build --filter FullyQualifiedName!~IntegrationTest -c ${{ matrix.configuration }} --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings --results-directory ./TestResults tgstation-server.sln - name: Store Code Coverage uses: actions/upload-artifact@v3 @@ -265,7 +265,7 @@ jobs: run: | cd tests/Tgstation.Server.Tests Start-Sleep -Seconds 10 - dotnet test -c ${{ matrix.configuration }} -l "console;verbosity=detailed;noprogress=true" --collect:"XPlat Code Coverage" --settings ../../build/coverlet.runsettings -r ../../TestResults + dotnet test -c ${{ matrix.configuration }} -l "console;verbosity=detailed;noprogress=true" --collect:"XPlat Code Coverage" --settings ../../build/coverlet.runsettings --results-directory ../../TestResults - name: Store Code Coverage uses: actions/upload-artifact@v3 @@ -414,7 +414,7 @@ jobs: run: | cd tests/Tgstation.Server.Tests sleep 10 - dotnet test -c ${{ matrix.configuration }}NoService -l "console;verbosity=detailed;noprogress=true" --collect:"XPlat Code Coverage" --settings ../../build/coverlet.runsettings -r ../../TestResults + dotnet test -c ${{ matrix.configuration }}NoService -l "console;verbosity=detailed;noprogress=true" --collect:"XPlat Code Coverage" --settings ../../build/coverlet.runsettings --results-directory ../../TestResults - name: Store Code Coverage uses: actions/upload-artifact@v3