diff --git a/Dockerfile b/Dockerfile index 5ed521ac..7b0c3832 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -ARG RUNNER_IMG= +ARG RUNNER_IMG -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/nightly/sdk:8.0-preview AS builder +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS builder ARG TARGETARCH WORKDIR /app @@ -23,7 +23,7 @@ ARG TARGETARCH COPY ./src ./src RUN dotnet publish ./src/es-replicator -c Release -a $TARGETARCH -clp:NoSummary --no-self-contained -o /app/publish -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runner +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runner WORKDIR /app COPY --from=publish /app/publish . diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ea81fccd..1573dff4 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - net7.0 + net8.0 11 false $(NoWarn);CS1591;CS0618; diff --git a/src/EventStore.Replicator.Esdb.Grpc/EventStore.Replicator.Esdb.Grpc.csproj b/src/EventStore.Replicator.Esdb.Grpc/EventStore.Replicator.Esdb.Grpc.csproj index 6eec68ff..98efffe4 100644 --- a/src/EventStore.Replicator.Esdb.Grpc/EventStore.Replicator.Esdb.Grpc.csproj +++ b/src/EventStore.Replicator.Esdb.Grpc/EventStore.Replicator.Esdb.Grpc.csproj @@ -1,7 +1,9 @@ - + + + diff --git a/src/EventStore.Replicator.Esdb.Tcp/EventStore.Replicator.Esdb.Tcp.csproj b/src/EventStore.Replicator.Esdb.Tcp/EventStore.Replicator.Esdb.Tcp.csproj index 9308927e..3d6acb3a 100644 --- a/src/EventStore.Replicator.Esdb.Tcp/EventStore.Replicator.Esdb.Tcp.csproj +++ b/src/EventStore.Replicator.Esdb.Tcp/EventStore.Replicator.Esdb.Tcp.csproj @@ -1,9 +1,10 @@ - - + + + diff --git a/src/EventStore.Replicator.Http/EventStore.Replicator.Http.csproj b/src/EventStore.Replicator.Http/EventStore.Replicator.Http.csproj index 2f4a5df2..3538fe72 100644 --- a/src/EventStore.Replicator.Http/EventStore.Replicator.Http.csproj +++ b/src/EventStore.Replicator.Http/EventStore.Replicator.Http.csproj @@ -2,4 +2,7 @@ + + + diff --git a/src/EventStore.Replicator.JavaScript/EventStore.Replicator.JavaScript.csproj b/src/EventStore.Replicator.JavaScript/EventStore.Replicator.JavaScript.csproj index a44c3a82..a60bcbf9 100644 --- a/src/EventStore.Replicator.JavaScript/EventStore.Replicator.JavaScript.csproj +++ b/src/EventStore.Replicator.JavaScript/EventStore.Replicator.JavaScript.csproj @@ -4,5 +4,6 @@ + diff --git a/src/EventStore.Replicator.Kafka/EventStore.Replicator.Kafka.csproj b/src/EventStore.Replicator.Kafka/EventStore.Replicator.Kafka.csproj index 919b95ec..7830043a 100644 --- a/src/EventStore.Replicator.Kafka/EventStore.Replicator.Kafka.csproj +++ b/src/EventStore.Replicator.Kafka/EventStore.Replicator.Kafka.csproj @@ -1,7 +1,8 @@ - + + diff --git a/src/EventStore.Replicator.Kafka/KafkaJsMessageRouter.cs b/src/EventStore.Replicator.Kafka/KafkaJsMessageRouter.cs index 75d4471b..b1c1304c 100644 --- a/src/EventStore.Replicator.Kafka/KafkaJsMessageRouter.cs +++ b/src/EventStore.Replicator.Kafka/KafkaJsMessageRouter.cs @@ -3,6 +3,7 @@ using Jint; using Jint.Native; using Jint.Native.Json; +// ReSharper disable NotAccessedPositionalProperty.Global namespace EventStore.Replicator.Kafka; @@ -16,7 +17,7 @@ public KafkaJsMessageRouter(string routingFunction) { AsRoute ); - static MessageRoute AsRoute(JsValue result, RouteEvent evt) { + static MessageRoute AsRoute(JsValue? result, RouteEvent evt) { if (result == null || result.IsUndefined() || !result.IsObject()) return DefaultRouters.RouteByCategory(evt.Stream); @@ -36,7 +37,7 @@ public MessageRoute Route(ProposedEvent evt) { evt.EventDetails.Stream, evt.EventDetails.EventType, parser.Parse(evt.Data.AsUtf8String()), - parser.Parse(evt.Metadata?.AsUtf8String()) + evt.Metadata == null ? null : parser.Parse(evt.Metadata.AsUtf8String()) ) ); } diff --git a/src/EventStore.Replicator.Mongo/EventStore.Replicator.Mongo.csproj b/src/EventStore.Replicator.Mongo/EventStore.Replicator.Mongo.csproj index 830bd9f4..9f9284ed 100644 --- a/src/EventStore.Replicator.Mongo/EventStore.Replicator.Mongo.csproj +++ b/src/EventStore.Replicator.Mongo/EventStore.Replicator.Mongo.csproj @@ -1,6 +1,7 @@ - + + diff --git a/src/EventStore.Replicator.Shared/EventStore.Replicator.Shared.csproj b/src/EventStore.Replicator.Shared/EventStore.Replicator.Shared.csproj index 16994364..a8d27bfc 100644 --- a/src/EventStore.Replicator.Shared/EventStore.Replicator.Shared.csproj +++ b/src/EventStore.Replicator.Shared/EventStore.Replicator.Shared.csproj @@ -6,6 +6,7 @@ - + + diff --git a/src/EventStore.Replicator/EventStore.Replicator.csproj b/src/EventStore.Replicator/EventStore.Replicator.csproj index ee8c4b60..d776f8cb 100644 --- a/src/EventStore.Replicator/EventStore.Replicator.csproj +++ b/src/EventStore.Replicator/EventStore.Replicator.csproj @@ -1,6 +1,7 @@ + diff --git a/src/es-replicator/es-replicator.csproj b/src/es-replicator/es-replicator.csproj index d246afbd..1434d315 100644 --- a/src/es-replicator/es-replicator.csproj +++ b/src/es-replicator/es-replicator.csproj @@ -7,13 +7,14 @@ - - - + + + - + + diff --git a/test/EventStore.Replicator.Tests/EventStore.Replicator.Tests.csproj b/test/EventStore.Replicator.Tests/EventStore.Replicator.Tests.csproj index 1b76710e..90b3d5af 100644 --- a/test/EventStore.Replicator.Tests/EventStore.Replicator.Tests.csproj +++ b/test/EventStore.Replicator.Tests/EventStore.Replicator.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 11 false enable @@ -10,14 +10,14 @@ - - - - + + + + - - - + + +