Update Byond.TopicSender to 7.0.1

Also note this pushes Microsoft.Extensions.Logging.Abstractions to 7.0.0

This fixes instabilities in topic serialization.

Probably fixes #1529
This commit is contained in:
Dominion
2023-06-11 10:36:48 -04:00
parent 4388ec41aa
commit 1e416e202b
5 changed files with 9 additions and 19 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
#define DMAPI5_TOPIC_DATA "tgs_data"
#define DMAPI5_BRIDGE_REQUEST_LIMIT 8198
#define DMAPI5_TOPIC_REQUEST_LIMIT 65529
#define DMAPI5_TOPIC_RESPONSE_LIMIT 65528
#define DMAPI5_TOPIC_REQUEST_LIMIT 65528
#define DMAPI5_TOPIC_RESPONSE_LIMIT 65529
#define DMAPI5_BRIDGE_COMMAND_PORT_UPDATE 0
#define DMAPI5_BRIDGE_COMMAND_STARTUP 1
@@ -42,12 +42,12 @@ namespace Tgstation.Server.Host.Components.Interop
/// <summary>
/// The maximum length in bytes of a <see cref="global::Byond.TopicSender.ITopicClient"/> payload.
/// </summary>
public const uint MaximumTopicRequestLength = 65529;
public const uint MaximumTopicRequestLength = 65528;
/// <summary>
/// The maximum length in bytes of a <see cref="global::Byond.TopicSender.ITopicClient"/> response.
/// </summary>
public const uint MaximumTopicResponseLength = 65528;
public const uint MaximumTopicResponseLength = 65529;
/// <summary>
/// The DMAPI <see cref="InteropVersion"/> being used.
@@ -68,7 +68,7 @@
<!-- Usage: Concise throw statements for native Win32 errors -->
<PackageReference Include="BetterWin32Errors" Version="0.2.0" />
<!-- Usage: Interop with BYOND's /world/Topic -->
<PackageReference Include="Byond.TopicSender" Version="5.0.0" />
<PackageReference Include="Byond.TopicSender" Version="7.0.1" />
<!-- Usage: 503'ing request pipeline until server is finished initializing -->
<PackageReference Include="Cyberboss.AspNetCore.AsyncInitializer" Version="1.2.0" />
<!-- Usage: IRC interop -->
@@ -94,8 +94,6 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.15" />
<!-- Usage: MSSQL ORM plugin -->
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.15" />
<!-- Usage: Included transitively through other packages, workaround for https://github.com/coverlet-coverage/coverlet/issues/1381 -->
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
<!-- Usage: POSIX support for syscalls, signals, and symlinks -->
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<!-- Usage: YAML config plugin -->
+1 -1
View File
@@ -207,7 +207,7 @@ var/run_bridge_test
/datum/tgs_chat_command/response_overload_test/Run(datum/tgs_chat_user/sender, params)
// DMAPI5_TOPIC_RESPONSE_LIMIT
var/limit = 65528
var/limit = 65529
// this actually gets doubled because it's in two fields for backwards compatibility, but that's fine
var/datum/tgs_message_content/response = new(create_payload(limit * 3))
return response
@@ -550,7 +550,7 @@ namespace Tgstation.Server.Tests.Live.Instance
try
{
System.Console.WriteLine($"Topic send limit test S:{currentSize}...");
topicRequestResult = await TopicClientNoLogger.SendTopic(
topicRequestResult = await TopicClient.SendTopic(
IPAddress.Loopback,
$"tgs_integration_test_tactics3={TopicClient.SanitizeString(JsonConvert.SerializeObject(topic, DMApiConstants.SerializerSettings))}",
TestLiveServer.DDPort,
@@ -591,7 +591,7 @@ namespace Tgstation.Server.Tests.Live.Instance
{
var currentSize = baseSize + (int)Math.Pow(2, nextPow);
System.Console.WriteLine($"Topic recieve limit test S:{currentSize}...");
var topicRequestResult = await TopicClientNoLogger.SendTopic(
var topicRequestResult = await TopicClient.SendTopic(
IPAddress.Loopback,
$"tgs_integration_test_tactics4={TopicClient.SanitizeString(currentSize.ToString())}",
TestLiveServer.DDPort,
@@ -944,15 +944,7 @@ namespace Tgstation.Server.Tests.Live.Instance
ReceiveTimeout = TimeSpan.FromSeconds(30),
ConnectTimeout = TimeSpan.FromSeconds(30),
DisconnectTimeout = TimeSpan.FromSeconds(30)
}, new Logger<TopicClient>(LiveTestUtils.CreateLoggerFactoryForLogger(loggerFactory.CreateLogger("WatchdogTest.TopicClient"), out var mockLoggerFactory)));
public static readonly TopicClient TopicClientNoLogger = new(new SocketParameters
{
SendTimeout = TimeSpan.FromSeconds(30),
ReceiveTimeout = TimeSpan.FromSeconds(30),
ConnectTimeout = TimeSpan.FromSeconds(30),
DisconnectTimeout = TimeSpan.FromSeconds(30)
});
}, loggerFactory.CreateLogger("WatchdogTest.TopicClient"));
public async Task<DreamDaemonResponse> TellWorldToReboot(CancellationToken cancellationToken)
{