Repository: featbit/featbit (language: python)

Issue:
🏗 fix: multi platform dotnet project docker build hangs
Reference

- https://github.com/dotnet/runtime/issues/97828
- https://devblogs.microsoft.com/dotnet/improving-multiplatform-container-support/
[Bug]: .Net Core 8 treat empty strings as null for non-nullable reference types
### What happened?

There appears to be a problem with a brand new install of featbit using docker compose. If I take the current repo from github, and run docker compose -f docker-compose.yml up -d, it sets me up a brand new installation. I can login using the test account, and set up the organisation, project and environment. However, from there, all search pages fail with an error similar to the following: 
```json
{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "errors": {
        "Name": [
            "The Name field is required."
        ]
    },
    "traceId": "00-eee64a4a3881f046919cf9f6249bd495-6e218a04cbeecfc1-00"
}
```

### To Reproduce

1. Go to feature flags list page, an error will occur

### Expected behavior

There should be no error

### Additional context

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
🐛 Fix: fixed bug related to .Net Core 8 model binding behavior break change
Fixed #667 

<!--
# Instructions

1. Pick a meaningful and result oriented title for your pull request. (Use sentence case, don't include any words indicating the way you achived this result, we just want the result. Keep it short < 70 characters)
  - Prefix the title with an emoji to categorize what is being done. (Copy-paste the emoji from the list below.)
  - Assign the appropriate label(s) to the pull request. (Use one of the labels from the list below.)
  
2. Enter a succinct description that says why the PR is necessary, and what it does.
  - Implement aspect X
  - Leave out feature Y because of A
  - Improve performance by B
  - Improve accessibility by C

3. Provide clear testing instructions that include any pertinent information, i.e. seat, roles, etc.
4. Include screenshots of your changes if they impact the UI (Before & After).
5. Update the preview link with your pull request number.
6. Include any JIRA tickets, design documents, GitHub issues, or other related items to the bottom of the PR.

# Available labels
UI
API
Evaluation Server
OLAP

# Emojis for categorizing pull requests

✨ New feature or functionality
🐛 Bugfix
🔥 P0 fix
✅ Tests
🚀 Performance improvements
🖍 CSS / Styling
📖 Documentation
🏗 Infrastructure / Tooling / Builds / CI
↩️ Reverting a previous change
🧹 Refactoring / Housekeeping
🔧 Package Upgrades / Maintenance
🗑️ Deleting code

-->



Discussion / hints:

Fix patch:
diff --git a/modules/back-end/Directory.Build.props b/modules/back-end/Directory.Build.props
deleted file mode 100644
index 80d5ca955..000000000
--- a/modules/back-end/Directory.Build.props
+++ /dev/null
@@ -1,13 +0,0 @@
-<Project>
-    <PropertyGroup Condition="'$(TargetArch)' == 'amd64'">
-        <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(TargetArch)' == 'arm64'">
-        <RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
-    </PropertyGroup>
-    
-    <PropertyGroup>
-        <ImplicitUsings>enable</ImplicitUsings>
-        <Nullable>enable</Nullable>
-    </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/modules/back-end/src/Api/Api.csproj b/modules/back-end/src/Api/Api.csproj
index 6a688c8e2..72077a830 100644
--- a/modules/back-end/src/Api/Api.csproj
+++ b/modules/back-end/src/Api/Api.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
         <GenerateDocumentationFile>true</GenerateDocumentationFile>
         <NoWarn>$(NoWarn);1591</NoWarn>
     </PropertyGroup>
diff --git a/modules/back-end/src/Application/Application.csproj b/modules/back-end/src/Application/Application.csproj
index c4c9de7e7..0a251199c 100644
--- a/modules/back-end/src/Application/Application.csproj
+++ b/modules/back-end/src/Application/Application.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>disable</Nullable>
         <GenerateDocumentationFile>true</GenerateDocumentationFile>
         <NoWarn>$(NoWarn);1591</NoWarn>
     </PropertyGroup>
diff --git a/modules/back-end/src/Domain/Domain.csproj b/modules/back-end/src/Domain/Domain.csproj
index d83a231d0..7c42ad159 100644
--- a/modules/back-end/src/Domain/Domain.csproj
+++ b/modules/back-end/src/Domain/Domain.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>disable</Nullable>
         <GenerateDocumentationFile>true</GenerateDocumentationFile>
         <NoWarn>$(NoWarn);1591</NoWarn>
     </PropertyGroup>
diff --git a/modules/back-end/src/Infrastructure/Infrastructure.csproj b/modules/back-end/src/Infrastructure/Infrastructure.csproj
index 941a765ee..7a93b47cf 100644
--- a/modules/back-end/src/Infrastructure/Infrastructure.csproj
+++ b/modules/back-end/src/Infrastructure/Infrastructure.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
         <GenerateDocumentationFile>true</GenerateDocumentationFile>
         <NoWarn>$(NoWarn);1591</NoWarn>
     </PropertyGroup>
diff --git a/modules/evaluation-server/Directory.Build.props b/modules/evaluation-server/Directory.Build.props
deleted file mode 100644
index 10dbd5247..000000000
--- a/modules/evaluation-server/Directory.Build.props
+++ /dev/null
@@ -1,13 +0,0 @@
-<Project>
-    <PropertyGroup Condition="'$(TargetArch)' == 'amd64'">
-        <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(TargetArch)' == 'arm64'">
-        <RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
-    </PropertyGroup>
-    
-    <PropertyGroup>
-        <Nullable>enable</Nullable>
-        <ImplicitUsings>enable</ImplicitUsings>
-    </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/modules/evaluation-server/src/Api/Api.csproj b/modules/evaluation-server/src/Api/Api.csproj
index b959d7ff6..7da3f2d67 100644
--- a/modules/evaluation-server/src/Api/Api.csproj
+++ b/modules/evaluation-server/src/Api/Api.csproj
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk.Web">
 
     <PropertyGroup>
-        <TargetFramework>net8.0</TargetFramework>
         <IsPackable>false</IsPackable>
     </PropertyGroup>
 
diff --git a/modules/evaluation-server/src/Directory.Build.props b/modules/evaluation-server/src/Directory.Build.props
index 0d7bcac90..ef158743c 100644
--- a/modules/evaluation-server/src/Directory.Build.props
+++ b/modules/evaluation-server/src/Directory.Build.props
@@ -1,5 +1,9 @@
 <Project>
-    <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
+    <PropertyGroup>
+        <TargetFramework>net8.0</TargetFramework>
+        <Nullable>enable</Nullable>
+        <ImplicitUsings>enable</ImplicitUsings>
+    </PropertyGroup>
 
     <PropertyGroup>
         <PackageVersion>2.3.0</PackageVersion>
diff --git a/modules/evaluation-server/src/Domain/Domain.csproj b/modules/evaluation-server/src/Domain/Domain.csproj
index 3ecb63798..f516971ba 100644
--- a/modules/evaluation-server/src/Domain/Domain.csproj
+++ b/modules/evaluation-server/src/Domain/Domain.csproj
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
     
     <PropertyGroup>
-        <TargetFramework>net8.0</TargetFramework>
         <AssemblyName>FeatBit.EvaluationServer.Domain</AssemblyName>
         <PackageId>FeatBit.EvaluationServer.Domain</PackageId>
     </PropertyGroup>
diff --git a/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj b/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj
index 6ebcb3d28..1ea175345 100644
--- a/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj
+++ b/modules/evaluation-server/src/Infrastructure/Infrastructure.csproj
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
     <PropertyGroup>
-        <TargetFramework>net8.0</TargetFramework>
         <AssemblyName>FeatBit.EvaluationServer.Infrastructure</AssemblyName>
         <PackageId>FeatBit.EvaluationServer.Infrastructure</PackageId>
     </PropertyGroup>
diff --git a/modules/evaluation-server/src/Streaming/Streaming.csproj b/modules/evaluation-server/src/Streaming/Streaming.csproj
index 1d0b70d67..44e3221b0 100644
--- a/modules/evaluation-server/src/Streaming/Streaming.csproj
+++ b/modules/evaluation-server/src/Streaming/Streaming.csproj
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
     <PropertyGroup>
-        <TargetFramework>net8.0</TargetFramework>
         <AssemblyName>FeatBit.EvaluationServer.Streaming</AssemblyName>
         <PackageId>FeatBit.EvaluationServer.Streaming</PackageId>
     </PropertyGroup>


Test patch:
diff --git a/modules/back-end/tests/Application.IntegrationTests/Application.IntegrationTests.csproj b/modules/back-end/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
index 197a4e8d6..509fb91b3 100644
--- a/modules/back-end/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
+++ b/modules/back-end/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
 
         <IsPackable>false</IsPackable>
     </PropertyGroup>
diff --git a/modules/back-end/tests/Application.UnitTests/Application.UnitTests.csproj b/modules/back-end/tests/Application.UnitTests/Application.UnitTests.csproj
index ab3aff392..f0b0d6a1d 100644
--- a/modules/back-end/tests/Application.UnitTests/Application.UnitTests.csproj
+++ b/modules/back-end/tests/Application.UnitTests/Application.UnitTests.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
 
         <IsPackable>false</IsPackable>
     </PropertyGroup>
diff --git a/modules/back-end/tests/Domain.UnitTests/Domain.UnitTests.csproj b/modules/back-end/tests/Domain.UnitTests/Domain.UnitTests.csproj
index 2618a8518..d2cbda730 100644
--- a/modules/back-end/tests/Domain.UnitTests/Domain.UnitTests.csproj
+++ b/modules/back-end/tests/Domain.UnitTests/Domain.UnitTests.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
 
         <IsPackable>false</IsPackable>
     </PropertyGroup>
diff --git a/modules/back-end/tests/TestBase/TestBase.csproj b/modules/back-end/tests/TestBase/TestBase.csproj
index aeb91ed47..6ebff2014 100644
--- a/modules/back-end/tests/TestBase/TestBase.csproj
+++ b/modules/back-end/tests/TestBase/TestBase.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
 
         <IsPackable>false</IsPackable>
         <IsTestProject>false</IsTestProject>
diff --git a/modules/back-end/tests/TestBase/TestLogger.cs b/modules/back-end/tests/TestBase/TestLogger.cs
index b2276915d..fc2a6a5a5 100644
--- a/modules/back-end/tests/TestBase/TestLogger.cs
+++ b/modules/back-end/tests/TestBase/TestLogger.cs
@@ -15,7 +15,7 @@ public class TestLogger<TName> : ILogger<TName>, ITestLogger
 {
     public List<string> LogMessages { get; } = new();
 
-    public IDisposable BeginScope<TState>(TState state)
+    public IDisposable BeginScope<TState>(TState state) where TState : notnull
     {
         LogMessages.Add(state?.ToString());
         return null;
diff --git a/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj b/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
index 18cea8c72..76a97996f 100644
--- a/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
+++ b/modules/evaluation-server/tests/Application.IntegrationTests/Application.IntegrationTests.csproj
@@ -2,6 +2,9 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
+
         <IsPackable>false</IsPackable>
     </PropertyGroup>
 
diff --git a/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj b/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj
index 521fe3223..298643f1a 100644
--- a/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj
+++ b/modules/evaluation-server/tests/Domain.UnitTests/Domain.UnitTests.csproj
@@ -2,6 +2,9 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
+
         <IsPackable>false</IsPackable>
     </PropertyGroup>
 
diff --git a/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj b/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj
index a304be6ab..95854a90f 100644
--- a/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj
+++ b/modules/evaluation-server/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj
@@ -2,6 +2,8 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <Nullable>enable</Nullable>
+
         <IsPackable>false</IsPackable>
     </PropertyGroup>
 
diff --git a/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj b/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj
index 7471e7d2f..1a72ef84f 100644
--- a/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj
+++ b/modules/evaluation-server/tests/Streaming.UnitTests/Streaming.UnitTests.csproj
@@ -2,6 +2,9 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
+
         <IsPackable>false</IsPackable>
     </PropertyGroup>
 
diff --git a/modules/evaluation-server/tests/TestBase/TestBase.csproj b/modules/evaluation-server/tests/TestBase/TestBase.csproj
index beb81e744..8e3329f95 100644
--- a/modules/evaluation-server/tests/TestBase/TestBase.csproj
+++ b/modules/evaluation-server/tests/TestBase/TestBase.csproj
@@ -2,6 +2,9 @@
 
     <PropertyGroup>
         <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
+
         <IsPackable>false</IsPackable>
         <IsTestProject>false</IsTestProject>
     </PropertyGroup>