Repository: featbit/featbit (language: python)

Issue:
🔧 refactor: upgrade evaluation server to .NET 8
This PR upgrades the evaluation server to dotnet 8


Discussion / hints:
Merci @wss-rbrennan We will review it.

Fix patch:
diff --git a/modules/evaluation-server/src/Api/Api.csproj b/modules/evaluation-server/src/Api/Api.csproj
index 36334cc0b..620577a17 100644
--- a/modules/evaluation-server/src/Api/Api.csproj
+++ b/modules/evaluation-server/src/Api/Api.csproj
@@ -8,7 +8,7 @@
     <ItemGroup>
         <PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
         <PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
-        <PackageReference Include="Serilog.Sinks.OpenTelemetry" Version="1.2.0" />
+        <PackageReference Include="Serilog.Sinks.OpenTelemetry" Version="4.1.0" />
 
         <PackageReference Include="Grpc.Net.Client" Version="2.65.0" />
     </ItemGroup>
diff --git a/modules/evaluation-server/src/Api/Program.cs b/modules/evaluation-server/src/Api/Program.cs
index 844e61e17..b4b773e36 100644
--- a/modules/evaluation-server/src/Api/Program.cs
+++ b/modules/evaluation-server/src/Api/Program.cs
@@ -47,7 +47,7 @@ void InitializeSerilog()
                                    | IncludedData.TraceIdField
                                    | IncludedData.SpanIdField;
             options.BatchingOptions.BatchSizeLimit = 2;
-            options.BatchingOptions.Period = TimeSpan.FromSeconds(2);
+            options.BatchingOptions.BufferingTimeLimit = TimeSpan.FromSeconds(2);
             options.BatchingOptions.QueueLimit = 10;
 
             options.ResourceAttributes = new Dictionary<string, object>
diff --git a/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj b/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj
index 4253cd860..9026b8914 100644
--- a/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj
+++ b/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj
@@ -11,16 +11,16 @@
     </ItemGroup>
 
     <ItemGroup>
-        <PackageReference Include="AspNetCore.HealthChecks.Kafka" Version="8.0.0" />
-        <PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="8.0.0" />
-        <PackageReference Include="AspNetCore.HealthChecks.Redis" Version="8.0.0" />
-        <PackageReference Include="Confluent.Kafka" Version="2.3.0" />
+        <PackageReference Include="AspNetCore.HealthChecks.Kafka" Version="8.0.1" />
+        <PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="8.1.0" />
+        <PackageReference Include="AspNetCore.HealthChecks.Redis" Version="8.0.1" />
+        <PackageReference Include="Confluent.Kafka" Version="2.5.3" />
         <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
-        <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
-        <PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.0" />
+        <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
+        <PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.1" />
         <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
-        <PackageReference Include="MongoDB.Driver" Version="2.24.0"/>
-        <PackageReference Include="StackExchange.Redis" Version="2.7.33" />
+        <PackageReference Include="MongoDB.Driver" Version="2.29.0" />
+        <PackageReference Include="StackExchange.Redis" Version="2.8.16" />
     </ItemGroup>
 
     <ItemGroup>


Test patch:
diff --git a/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj b/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
index bc74f7259..76a97996f 100644
--- a/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
+++ b/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
@@ -10,7 +10,7 @@
 
     <ItemGroup>
         <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
-        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
+        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
     </ItemGroup>
 
     <ItemGroup>
diff --git a/modules/evaluation-server/tests/Application.IntegrationTests/WebSockets/DataSyncTests.cs b/modules/evaluation-server/tests/Application.IntegrationTests/WebSockets/DataSyncTests.cs
index d2e2a9263..b5f65f09d 100644
--- a/modules/evaluation-server/tests/Application.IntegrationTests/WebSockets/DataSyncTests.cs
+++ b/modules/evaluation-server/tests/Application.IntegrationTests/WebSockets/DataSyncTests.cs
@@ -4,7 +4,6 @@
 
 namespace Application.IntegrationTests.WebSockets;
 
-[UsesVerify]
 [Collection(nameof(TestApp))]
 public class DataSyncTests
 {
diff --git a/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj b/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj
index e2204e0dc..298643f1a 100644
--- a/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj
+++ b/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj
@@ -9,7 +9,7 @@
     </PropertyGroup>
 
     <ItemGroup>
-        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
+        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
     </ItemGroup>
 
     <ItemGroup>
diff --git a/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj b/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj
index e39ca8f46..95854a90f 100644
--- a/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj
+++ b/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj
@@ -8,7 +8,7 @@
     </PropertyGroup>
 
     <ItemGroup>
-        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
+        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
     </ItemGroup>
 
     <ItemGroup>
diff --git a/modules/evaluation-server/tests/Streaming.UnitTests/Connections/ConnectionTypeTests.cs b/modules/evaluation-server/tests/Streaming.UnitTests/Connections/ConnectionTypeTests.cs
index e7a8989c5..fe1f4ff32 100644
--- a/modules/evaluation-server/tests/Streaming.UnitTests/Connections/ConnectionTypeTests.cs
+++ b/modules/evaluation-server/tests/Streaming.UnitTests/Connections/ConnectionTypeTests.cs
@@ -10,7 +10,7 @@ public class ConnectionTypeTests
     [InlineData("another", false)]
     [InlineData(" ", false)]
     [InlineData(null, false)]
-    public void Should_Check_SdkType_Registration_Status(string type, bool registered)
+    public void Should_Check_SdkType_Registration_Status(string? type, bool registered)
     {
         Assert.Equal(registered, ConnectionType.IsRegistered(type));
     }
diff --git a/modules/evaluation-server/tests/Streaming.UnitTests/Shared/SecretTests.cs b/modules/evaluation-server/tests/Streaming.UnitTests/Shared/SecretTests.cs
index ef3549d5a..d590a6cbc 100644
--- a/modules/evaluation-server/tests/Streaming.UnitTests/Shared/SecretTests.cs
+++ b/modules/evaluation-server/tests/Streaming.UnitTests/Shared/SecretTests.cs
@@ -21,7 +21,7 @@ public void ParseValidSecret(string secretString, Guid expected)
     [InlineData("random-string")]
     [InlineData("ZGY1LTUxYTQtNCUyMDIyMDkwNTAwNTQxOV9fNDZfXzkzX18tMV9fZGVmYXVsdF82MjdhMg==")]
     [InlineData("aGVsbG8gd29ybGQ=")]
-    public void ParseInvalidSecret(string secretString)
+    public void ParseInvalidSecret(string? secretString)
     {
         var isValid = Secret.TryParse(secretString, out var actual);
 
diff --git a/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenNumberTests.cs b/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenNumberTests.cs
index 425a49be5..95eba6120 100644
--- a/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenNumberTests.cs
+++ b/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenNumberTests.cs
@@ -32,7 +32,7 @@ public void Should_Decode_Long(string encoded, long expected)
     [InlineData(null)]
     [InlineData("")]
     [InlineData(" ")]
-    public void Should_Decode_Null_Or_WhiteSpace_As_Zero(string encoded)
+    public void Should_Decode_Null_Or_WhiteSpace_As_Zero(string? encoded)
     {
         var byteParseResult = TokenNumber.TryDecodeByte(encoded, out var byteActual);
         var longParseResult = TokenNumber.TryDecodeLong(encoded, out var longActual);
diff --git a/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenTests.cs b/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenTests.cs
index 892be099f..bc5fe8825 100644
--- a/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenTests.cs
+++ b/modules/evaluation-server/tests/Streaming.UnitTests/Shared/TokenTests.cs
@@ -27,7 +27,7 @@ public void GetValidToken(string tokenString, Token expected)
     [InlineData("5chars")]
     [InlineData("QDUBHYWVkLWNiZT")]
     [InlineData("QQQQS123")]
-    public void GetInvalidToken(string tokenString)
+    public void GetInvalidToken(string? tokenString)
     {
         var token = new Token(tokenString);
 
diff --git a/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj b/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj
index aab4b4aa2..1a72ef84f 100644
--- a/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj
+++ b/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj
@@ -9,7 +9,7 @@
     </PropertyGroup>
 
     <ItemGroup>
-        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0"/>
+        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
     </ItemGroup>
 
     <ItemGroup>
diff --git a/modules/evaluation-server/tests/TestBase/TestBase.csproj b/modules/evaluation-server/tests/TestBase/TestBase.csproj
index 8e6f9f832..cd14f5480 100644
--- a/modules/evaluation-server/tests/TestBase/TestBase.csproj
+++ b/modules/evaluation-server/tests/TestBase/TestBase.csproj
@@ -11,12 +11,18 @@
 
     <!-- test suits -->
     <ItemGroup>
-        <PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
-        <PackageReference Include="Moq" Version="4.18.2" />
-        <PackageReference Include="xunit" Version="2.4.2" />
-        <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-        <PackageReference Include="coverlet.collector" Version="3.1.2" />
-        <PackageReference Include="Verify.Xunit" Version="19.6.0" />
+        <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
+        <PackageReference Include="Moq" Version="4.20.72" />
+        <PackageReference Include="xunit" Version="2.9.0" />
+        <PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
+          <PrivateAssets>all</PrivateAssets>
+          <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+        </PackageReference>
+        <PackageReference Include="coverlet.collector" Version="6.0.2">
+          <PrivateAssets>all</PrivateAssets>
+          <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+        </PackageReference>
+        <PackageReference Include="Verify.Xunit" Version="26.5.0" />
     </ItemGroup>
 
 </Project>