From b2ce8fbf510353eb4fff88dbaae1f1f2fd6544af Mon Sep 17 00:00:00 2001 From: Timothy Coleman Date: Thu, 9 Oct 2025 11:20:11 +0100 Subject: [PATCH 01/28] initial 8 -> 10 reference changes --- .../workflows/build-container-reusable.yml | 4 +- .github/workflows/build-reusable.yml | 4 +- .github/workflows/common.yml | 4 +- CLAUDE.md | 8 +- Dockerfile | 2 +- README.md | 6 +- build.cmd | 18 --- build.ps1 | 74 ---------- build.sh | 137 ------------------ docs/server/quick-start/installation.md | 2 +- .../KurrentDB.Connectors.Contracts.csproj | 1 - .../KurrentDB.Connectors.TestServer.csproj | 1 - .../KurrentDB.Connectors.Tests.csproj | 1 - .../KurrentDB.Connectors.csproj | 1 - .../.run/KurrentDB (MemDb=false).run.xml | 4 +- .../.run/KurrentDB (MemDb=true).run.xml | 4 +- .../.run/Publish Plugin to artifacts.run.xml | 2 +- src/Directory.Build.props | 4 +- .../KurrentDB.Api.V2.Tests.csproj | 1 - src/KurrentDB.Api.V2/KurrentDB.Api.V2.csproj | 1 - .../KurrentDB.Auth.Ldaps.Tests.csproj | 1 - .../KurrentDB.Auth.Ldaps.csproj | 1 - ...thStreamAuthorizationDisabled.Tests.csproj | 1 - ...tionWithStreamAuthorizationDisabled.csproj | 1 - .../KurrentDB.Auth.OAuth.Tests.csproj | 1 - .../KurrentDB.Auth.OAuth.csproj | 1 - ...entDB.Auth.StreamPolicyPlugin.Tests.csproj | 1 - .../KurrentDB.Auth.StreamPolicyPlugin.csproj | 1 - ...rrentDB.Auth.UserCertificates.Tests.csproj | 1 - .../KurrentDB.Auth.UserCertificates.csproj | 1 - .../KurrentDB.AutoScavenge.Tests.csproj | 1 - .../KurrentDB.AutoScavenge.csproj | 1 - .../FakePlugin/FakePlugin.csproj | 2 +- .../PluginLoaderTests.cs | 2 +- ...iagnostics.LogsEndpointPlugin.Tests.csproj | 1 - ...ntDB.Diagnostics.LogsEndpointPlugin.csproj | 1 - .../KurrentDB.Logging.csproj | 1 - .../KurrentDB.Plugins.Api.V2.csproj | 1 - ...rentDB.Projections.Core.XUnit.Tests.csproj | 1 - ...entDB.SecondaryIndexing.LoadTesting.csproj | 1 - ...tDB.Security.EncryptionAtRest.Tests.csproj | 1 - ...KurrentDB.Security.EncryptionAtRest.csproj | 1 - .../KurrentDB.Surge.Testing.csproj | 2 +- .../KurrentDB.Surge.Tests.csproj | 1 - src/KurrentDB.Surge/KurrentDB.Surge.csproj | 2 +- .../KurrentDB.Testing.ClusterVNodeApp.csproj | 1 - .../KurrentDB.Testing.csproj | 1 - src/KurrentDB.UI/KurrentDB.UI.csproj | 1 - .../KurrentDB.SchemaRegistry.Protocol.csproj | 2 +- .../KurrentDB.SchemaRegistry.Tests.csproj | 2 +- .../KurrentDB.SchemaRegistry.csproj | 2 +- 51 files changed, 27 insertions(+), 290 deletions(-) delete mode 100644 build.cmd delete mode 100644 build.ps1 delete mode 100755 build.sh diff --git a/.github/workflows/build-container-reusable.yml b/.github/workflows/build-container-reusable.yml index a0886249edb..eb8466f0e3c 100644 --- a/.github/workflows/build-container-reusable.yml +++ b/.github/workflows/build-container-reusable.yml @@ -16,10 +16,10 @@ jobs: name: Checkout uses: actions/checkout@v4 - - name: Install net8.0 + name: Install net10.0 uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Setup QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index cd5613037a8..5d3279e596d 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -37,10 +37,10 @@ jobs: if: ${{ !startsWith(inputs.os, 'windows') }} uses: docker/setup-buildx-action@v2 - - name: Install net8.0 + name: Install net10.0 uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Clear Nuget Cache shell: powershell diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 25a625fcae5..60f38fa233a 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -27,10 +27,10 @@ jobs: name: Checkout uses: actions/checkout@v4 - - name: Install net8.0 + name: Install net10.0 uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Scan for Vulnerabilities run: | diff --git a/CLAUDE.md b/CLAUDE.md index 7381dadd08b..786fb7ed9ce 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -28,9 +28,7 @@ KurrentDB 25.1 introduces several major features and improvements: ## Development Commands ### Build -- `./build.sh [version] [configuration]` - Build KurrentDB (Linux/MacOS) -- `./build.ps1 [version] [configuration]` - Build KurrentDB (Windows) -- `dotnet build -c Release /p:Platform=x64 --framework=net8.0 src/KurrentDB.sln` - Direct dotnet build +- `dotnet build -c Release /p:Platform=x64 --framework=net10.0 src/KurrentDB.sln` - Direct dotnet build ### Test - `dotnet test src/KurrentDB.sln` - Run all tests @@ -43,7 +41,7 @@ Navigate to the test project directory and use: - `dotnet test --filter "TestClass"` ### Development Server -- Start server: `dotnet ./src/KurrentDB/bin/Release/net8.0/KurrentDB.dll --dev --db ./tmp/data --index ./tmp/index --log ./tmp/log` +- Start server: `dotnet ./src/KurrentDB/bin/Release/net10.0/KurrentDB.dll --dev --db ./tmp/data --index ./tmp/index --log ./tmp/log` - Default ports: HTTP/gRPC on 2113, Internal TCP on 1112 - Admin UI: `http://localhost:2113` (new embedded UI) or `http://localhost:2113/web` (legacy) - Windows Service: KurrentDB can now be run as a Windows Service (see installation docs) @@ -185,7 +183,7 @@ Uses centralized package management: ### Development Notes -- Target framework: .NET 8.0 with Server GC enabled by default +- Target framework: .NET 10.0 with Server GC enabled by default - Uses unsafe code blocks for performance-critical operations - Protocol buffer generation integrated into build process (`KurrentDB.Protocol` project) - Extensive use of dependency injection and hosted services pattern diff --git a/Dockerfile b/Dockerfile index 07782d7cdb2..bcf7e261a3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,7 @@ FROM build AS publish ARG RUNTIME=linux-x64 RUN dotnet publish --configuration=Release --runtime=${RUNTIME} --self-contained \ - --framework=net8.0 --output /publish /build/src/KurrentDB + --framework=net10.0 --output /publish /build/src/KurrentDB # "runtime" image FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-${CONTAINER_RUNTIME} AS runtime diff --git a/README.md b/README.md index 11c11bdb88f..94403df5e22 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ KurrentDB is written in a mixture of C# and JavaScript. It can run on Windows, L **Prerequisites** -- [.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0) +- [.NET SDK 10.0](https://dotnet.microsoft.com/download/dotnet/10.0) Once you've installed the prerequisites for your system, you can launch a `Release` build of KurrentDB as follows: @@ -125,12 +125,10 @@ Once you've installed the prerequisites for your system, you can launch a `Relea dotnet build -c Release src ``` -The build scripts: `build.sh` and `build.ps1` are also available for Linux and Windows respectively to simplify the build process. - To start a single node, you can then run: ``` -dotnet ./src/KurrentDB/bin/Release/net8.0/KurrentDB.dll --dev --db ./tmp/data --index ./tmp/index --log ./tmp/log +dotnet ./src/KurrentDB/bin/Release/net10.0/KurrentDB.dll --dev --db ./tmp/data --index ./tmp/index --log ./tmp/log ``` ### Running the tests diff --git a/build.cmd b/build.cmd deleted file mode 100644 index 1054e205086..00000000000 --- a/build.cmd +++ /dev/null @@ -1,18 +0,0 @@ -@echo off - -if '%1'=='/?' goto help -if '%1'=='/help' goto help -if '%1'=='--help' goto help -if '%1'=='-help' goto help -if '%1'=='-h' goto help - -powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\build.ps1' %*;" -exit /B %errorlevel% - -:help - -echo Usage: -echo build.cmd ^[-Version=0.0.0.0^] ^[-Configuration=Debug^|Release^] -echo. -echo Prerequisites: -echo Building KurrentDB database requires .NET Core SDK 8.0 diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 41eb7a5a5c8..00000000000 --- a/build.ps1 +++ /dev/null @@ -1,74 +0,0 @@ -[CmdletBinding()] -Param( - [Parameter(HelpMessage="Assembly version number (x.y.z.0 where x.y.z is the semantic version)")] - [string]$Version = "0.0.0.0", - [Parameter(HelpMessage="Configuration (Debug, Release)")] - [ValidateSet("Debug","Release")] - [string]$Configuration = "Release", - [Parameter(HelpMessage="Run Tests (yes,no)")] - [ValidateSet("yes","no")] - [string]$RunTests = "no" -) - -Function Write-Info { - Param([string]$message) - Process { - Write-Host $message -ForegroundColor Cyan - } -} - -#Borrowed from psake -Function Exec -{ - [CmdletBinding()] - param( - [Parameter(Mandatory=$true, Position=0)][scriptblock]$Command, - [Parameter(Mandatory=$false, Position=1)][string]$ErrorMessage = ("Failed executing {0}" -F $Command) - ) - - & $Command - if ($LASTEXITCODE -ne 0) { - throw ("Exec: " + $ErrorMessage) - } -} - -Function Start-Build{ - #Make compatible with Powershell 2 - if(!$PSScriptRoot) { $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } - - #Configuration - $platform = "x64" - - $baseDirectory = $PSScriptRoot - $srcDirectory = Join-Path $baseDirectory "src" - $binDirectory = Join-Path $baseDirectory "bin" - $kurrentDbSolution = Join-Path $srcDirectory "KurrentDB.sln" - - Write-Info "Build Configuration" - Write-Info "-------------------" - - Write-Info "Version: $Version" - Write-Info "Platform: $platform" - Write-Info "Configuration: $Configuration" - Write-Info "Run Tests: $RunTests" - - #Build KurrentDB (Patch AssemblyInfo, Build, Revert AssemblyInfo) - Remove-Item -Force -Recurse $binDirectory -ErrorAction SilentlyContinue > $null - - $versionInfoFile = Resolve-Path (Join-Path $srcDirectory (Join-Path "KurrentDB.Common" (Join-Path "Utils" "VersionInfo.cs"))) -Relative - try { - Exec { dotnet build -c $configuration /p:Version=$Version /p:Platform=x64 $kurrentDbSolution } - } finally { - Write-Info "Reverting $versionInfoFile to original state." - & { git checkout --quiet $versionInfoFile } - } - if($RunTests -eq "yes"){ - (Get-ChildItem -Attributes Directory src | % FullName) -Match '.Tests' | ` - ForEach-Object { - dotnet test -v normal -c $Configuration /p:Platform=x64 --no-build --logger trx --results-directory testResults $_ - if (-Not $?) { throw "Exit code is $?" } - } - } -} - -Start-Build diff --git a/build.sh b/build.sh deleted file mode 100755 index ba5e4eb3beb..00000000000 --- a/build.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env bash - -BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -PRODUCTNAME="KurrentDB" -COMPANYNAME="Kurrent, Inc" -COPYRIGHT="Copyright 2025 Kurrent, Inc. All rights reserved." - - -# ------------ End of configuration ------------- - -CONFIGURATION="Release" -NET_FRAMEWORK="net8.0" - -function usage() { -cat <] [] - -version: KurrentDB build version. Versions must be complete four part identifiers valid for use on a .NET assembly. - -configuration: Build configuration. Valid configurations are: Debug, Release - -EOF - exit 1 -} - -function detectOS(){ - unameOut="$(uname -s)" - case "${unameOut}" in - Linux*) os=Linux;; - Darwin*) os=MacOS;; - *) os="${unameOut}" - esac - - if [[ "$os" != "Linux" && $os != "MacOS" ]] ; then - echo "Unsupported operating system: $os. Only Linux and MacOS are supported." - exit 1 - fi - OS=$os -} - -function checkParams() { - if [[ "$1" == "-help" || "$1" == "--help" ]] ; then - usage - fi - - version=$1 - configuration=$2 - - [[ $# -gt 2 ]] && usage - - if [[ "$version" == "" ]] ; then - VERSIONSTRING="0.0.0.0" - echo "Version defaulted to: 0.0.0.0" - else - VERSIONSTRING=$version - echo "Version set to: $VERSIONSTRING" - fi - - if [[ "$configuration" == "" ]]; then - CONFIGURATION="Release" - echo "Configuration defaulted to: $CONFIGURATION" - else - if [[ "$configuration" == "Release" || "$configuration" == "Debug" ]]; then - CONFIGURATION=$configuration - echo "Configuration set to: $CONFIGURATION" - else - echo "Invalid configuration: $configuration" - usage - fi - fi -} - -function revertVersionInfo() { - files=$( find . -name "VersionInfo.cs" ) - - for file in $files - do - git checkout "$file" - echo "Reverted $file" - done -} - -function err() { - revertVersionInfo - echo "FAILED. See earlier messages" - exit 1 -} - -function patchVersionInfo { - branchName=$(git rev-parse --abbrev-ref HEAD) - commitHash=$(git log -n1 --pretty=format:"%H" HEAD) - commitTimestamp=$(git log -n1 --pretty=format:"%aD" HEAD) - - newVersion="public static readonly string Version = \"$VERSIONSTRING\";" - newBranch="public static readonly string Branch = \"$branchName\";" - newCommitHash="public static readonly string Hashtag = \"$commitHash\";" - newTimestamp="public static readonly string Timestamp = \"$commitTimestamp\";" - - versionPattern="public static readonly string Version .*$" - branchPattern="public static readonly string Branch .*$" - commitHashPattern="public static readonly string Hashtag .*$" - timestampPattern="public static readonly string Timestamp .*$" - - files=$( find . -name "VersionInfo.cs" ) - - for file in $files - do - tempfile="$file.tmp" - sed -e "s/$versionPattern/$newVersion/" \ - -e "s/$branchPattern/$newBranch/" \ - -e "s/$commitHashPattern/$newCommitHash/" \ - -e "s/$timestampPattern/$newTimestamp/" \ - "$file" > "$tempfile" - - mv "$tempfile" "$file" - echo "Patched $file with version information" - done -} - -function buildKurrentDB { - patchVersionInfo - rm -rf bin/ - dotnet build -c $CONFIGURATION /p:Platform=x64 /p:Version=$VERSIONSTRING --framework=$NET_FRAMEWORK src/KurrentDB.sln || err - revertVersionInfo -} - -function exitWithError { - echo "$1" - exit 1 -} - -detectOS -checkParams "$1" "$2" - -echo "Running from base directory: $BASE_DIR" -buildKurrentDB diff --git a/docs/server/quick-start/installation.md b/docs/server/quick-start/installation.md index bd3e2d7b433..81d8d4d8b75 100644 --- a/docs/server/quick-start/installation.md +++ b/docs/server/quick-start/installation.md @@ -426,7 +426,7 @@ KurrentDB can be deployed and managed using the [Operator](/server/kubernetes-op ## Building from source -You can also build [KurrentDB from source](https://github.com/EventStore/EventStore?tab=readme-ov-file#building-kurrentdb). Before doing that, you need to install the .NET 8 SDK. KurrentDB packages have the .NET Runtime embedded, so you don't need to install anything except the KurrentDB package. +You can also build [KurrentDB from source](https://github.com/EventStore/EventStore?tab=readme-ov-file#building-kurrentdb). Before doing that, you need to install the .NET 10 SDK. KurrentDB packages have the .NET Runtime embedded, so you don't need to install anything except the KurrentDB package. ## Compatibility notes diff --git a/src/Connectors/KurrentDB.Connectors.Contracts/KurrentDB.Connectors.Contracts.csproj b/src/Connectors/KurrentDB.Connectors.Contracts/KurrentDB.Connectors.Contracts.csproj index 13018b94dd4..27b0e4edf67 100644 --- a/src/Connectors/KurrentDB.Connectors.Contracts/KurrentDB.Connectors.Contracts.csproj +++ b/src/Connectors/KurrentDB.Connectors.Contracts/KurrentDB.Connectors.Contracts.csproj @@ -1,6 +1,5 @@ - net8.0 enable true preview diff --git a/src/Connectors/KurrentDB.Connectors.TestServer/KurrentDB.Connectors.TestServer.csproj b/src/Connectors/KurrentDB.Connectors.TestServer/KurrentDB.Connectors.TestServer.csproj index c2a93a36fcd..f3043770597 100644 --- a/src/Connectors/KurrentDB.Connectors.TestServer/KurrentDB.Connectors.TestServer.csproj +++ b/src/Connectors/KurrentDB.Connectors.TestServer/KurrentDB.Connectors.TestServer.csproj @@ -1,6 +1,5 @@  - net8.0 Exe enable enable diff --git a/src/Connectors/KurrentDB.Connectors.Tests/KurrentDB.Connectors.Tests.csproj b/src/Connectors/KurrentDB.Connectors.Tests/KurrentDB.Connectors.Tests.csproj index e4a80014217..b738ddab75e 100644 --- a/src/Connectors/KurrentDB.Connectors.Tests/KurrentDB.Connectors.Tests.csproj +++ b/src/Connectors/KurrentDB.Connectors.Tests/KurrentDB.Connectors.Tests.csproj @@ -1,6 +1,5 @@ - net8.0 enable enable xUnit1041 diff --git a/src/Connectors/KurrentDB.Connectors/KurrentDB.Connectors.csproj b/src/Connectors/KurrentDB.Connectors/KurrentDB.Connectors.csproj index 497c8707571..347eceb29f1 100644 --- a/src/Connectors/KurrentDB.Connectors/KurrentDB.Connectors.csproj +++ b/src/Connectors/KurrentDB.Connectors/KurrentDB.Connectors.csproj @@ -1,6 +1,5 @@ - net8.0 enable true preview diff --git a/src/Connectors/KurrentDB.Plugins.Connectors/.run/KurrentDB (MemDb=false).run.xml b/src/Connectors/KurrentDB.Plugins.Connectors/.run/KurrentDB (MemDb=false).run.xml index 3b9f859e0ef..cd26bc6e9fa 100644 --- a/src/Connectors/KurrentDB.Plugins.Connectors/.run/KurrentDB (MemDb=false).run.xml +++ b/src/Connectors/KurrentDB.Plugins.Connectors/.run/KurrentDB (MemDb=false).run.xml @@ -1,6 +1,6 @@ -