From e2e769d095b42906b3dc387b2a300213a8116281 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 24 May 2020 22:29:07 -0400 Subject: [PATCH 1/3] Fix DreamMaker progress task The task wasn't being cancelled correctly and was holding up the compile --- src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs index a10d0cb2ef..aab15c7d26 100644 --- a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs +++ b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs @@ -763,7 +763,7 @@ namespace Tgstation.Server.Host.Components.Deployment } using var progressCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - var progressTask = estimatedDuration.HasValue ? ProgressTask(progressReporter, estimatedDuration.Value, cancellationToken) : Task.CompletedTask; + var progressTask = estimatedDuration.HasValue ? ProgressTask(progressReporter, estimatedDuration.Value, progressCts.Token) : Task.CompletedTask; try { using var byondLock = await byond.UseExecutables(null, cancellationToken).ConfigureAwait(false); From c1155fce3a6493cd901a34152207adb5035eea31 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 24 May 2020 22:30:09 -0400 Subject: [PATCH 2/3] Version bump to 4.2.6 --- build/Version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Version.props b/build/Version.props index ab5b742297..bb2ef16a99 100644 --- a/build/Version.props +++ b/build/Version.props @@ -2,7 +2,7 @@ - 4.2.5 + 4.2.6 6.4.1 7.0.0 5.2.1 From e9d1ff89e038cb5ee5fda5522ab04c8de1d8eb69 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 24 May 2020 22:45:00 -0400 Subject: [PATCH 3/3] Fix client issues --- src/Tgstation.Server.Client/ApiClient.cs | 2 +- src/Tgstation.Server.Client/ServerClientFactory.cs | 9 ++++++--- .../Tgstation.Server.Client.csproj | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Tgstation.Server.Client/ApiClient.cs b/src/Tgstation.Server.Client/ApiClient.cs index 4fcdc1e981..539b3ce319 100644 --- a/src/Tgstation.Server.Client/ApiClient.cs +++ b/src/Tgstation.Server.Client/ApiClient.cs @@ -216,7 +216,7 @@ namespace Tgstation.Server.Client try { - var token = await RunRequest(Routes.Root, null, HttpMethod.Post, null, true, cancellationToken); + var token = await RunRequest(Routes.Root, new object(), HttpMethod.Post, null, true, cancellationToken); headers = new ApiHeaders(headers.UserAgent!, token.Bearer!); } catch (ClientException) diff --git a/src/Tgstation.Server.Client/ServerClientFactory.cs b/src/Tgstation.Server.Client/ServerClientFactory.cs index 9dc883cca1..211645a9cb 100644 --- a/src/Tgstation.Server.Client/ServerClientFactory.cs +++ b/src/Tgstation.Server.Client/ServerClientFactory.cs @@ -62,13 +62,16 @@ namespace Tgstation.Server.Client token = await api.Update(Routes.Root, cancellationToken).ConfigureAwait(false); } - var client = CreateFromToken(host, token); + var apiHeaders = new ApiHeaders(productHeaderValue, token.Bearer!); + + var client = new ServerClient(ApiClientFactory.CreateApiClient(host, apiHeaders, loginHeaders), token); if (timeout.HasValue) client.Timeout = timeout.Value; - var apiHeaders = new ApiHeaders(productHeaderValue, token.Bearer!); + foreach (var requestLogger in requestLoggers) + client.AddRequestLogger(requestLogger); - return new ServerClient(ApiClientFactory.CreateApiClient(host, apiHeaders, loginHeaders), token); + return client; } /// diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj index 40d7a56503..3070b75011 100644 --- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj +++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj @@ -16,7 +16,7 @@ https://github.com/tgstation/tgstation-server 2018 json web api tgstation-server tgstation ss13 byond client - .Net Standard 2.1, allow login requests to be logged. + Fixed automatic refresh erroring internally. Fixed request loggers given to ServerClientFactory not being passed to the IServerClient. true snupkg ../../build/analyzers.ruleset