From c982d721d5c0dfc870143b433a8a86d83cd796bc Mon Sep 17 00:00:00 2001 From: Alon Fliess Date: Sun, 20 Apr 2025 12:36:01 +0300 Subject: [PATCH 1/2] Update test and demo project to .NET 9, Update NuGet packages for Dapr to 1.15.3 Upgrade .NET SDK and dependencies; update tests Updated `IntegrationTest.yaml` to use .NET SDK 9.0.x Updated Dapr package references from `1.15.0-rc02` to `1.15.3` and Polly from `8.4.1` to `8.5.2` in multiple `.csproj` files. Changed target frameworks from `net8.0` to `net9.0` across several projects. Modified `Dockerfile` to use .NET 9.0 base images for compatibility. Various package references in integration test projects were also updated to the latest versions, including OpenTelemetry and Swashbuckle. --- .github/workflows/IntegrationTest.yaml | 4 +- .../Sagaway.Callback.Propagator.csproj | 4 +- .../Sagaway.Callback.Router.csproj | 6 +- .../Sagaway.Hosts.DaprActorHost.csproj | 2 +- .../Dockerfile | 4 +- ...tegrationTests.OrchestrationService.csproj | 24 +-- .../Dockerfile | 4 +- ...rationTests.StepRecorderTestService.csproj | 22 +-- ...est_a_failed_on_2_no_callback.received.txt | 132 +++++++++++++ ...ailed_on_2_no_callback_revert.received.txt | 182 ++++++++++++++++++ ...agaway.IntegrationTests.TestProject.csproj | 28 +-- .../Dockerfile | 4 +- ...agaway.IntegrationTests.TestService.csproj | 24 +-- .../Dockerfile | 4 +- ...sts.TestSubSagaCommunicationService.csproj | 22 +-- .../Sagaway.OpenTelemetry.csproj | 2 +- .../Dockerfile | 4 +- ...y.ReservationDemo.BillingManagement.csproj | 22 +-- .../Dockerfile | 4 +- ...y.ReservationDemo.BookingManagement.csproj | 22 +-- .../Dockerfile | 4 +- ...ReservationDemo.InventoryManagement.csproj | 22 +-- .../Dockerfile | 4 +- ....ReservationDemo.ReservationManager.csproj | 28 +-- Sagaway.Tests/Sagaway.Tests.csproj | 13 +- 25 files changed, 452 insertions(+), 139 deletions(-) create mode 100644 Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt create mode 100644 Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt diff --git a/.github/workflows/IntegrationTest.yaml b/.github/workflows/IntegrationTest.yaml index 38b2fb0..da4f7a3 100644 --- a/.github/workflows/IntegrationTest.yaml +++ b/.github/workflows/IntegrationTest.yaml @@ -33,10 +33,10 @@ jobs: rm ./dapr/components/dapr-secretstore.json echo "{\"SignalRConnectionString\": \"${{ secrets.SAGAWAY_SIGNALR_CONNECTION_STRING }}\"}" > ./dapr/components/dapr-secretstore.json - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: | - 8.0.x + 9.0.x - name: Sagaway Core Tests run: dotnet test --verbosity normal --configuration Debug Sagaway.Tests/Sagaway.Tests.csproj - name: Docker Compose Up diff --git a/Sagaway.Callback.Propagator/Sagaway.Callback.Propagator.csproj b/Sagaway.Callback.Propagator/Sagaway.Callback.Propagator.csproj index 08b7732..ffb22d4 100644 --- a/Sagaway.Callback.Propagator/Sagaway.Callback.Propagator.csproj +++ b/Sagaway.Callback.Propagator/Sagaway.Callback.Propagator.csproj @@ -41,8 +41,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Sagaway.Callback.Router/Sagaway.Callback.Router.csproj b/Sagaway.Callback.Router/Sagaway.Callback.Router.csproj index 90f4f3b..29f7358 100644 --- a/Sagaway.Callback.Router/Sagaway.Callback.Router.csproj +++ b/Sagaway.Callback.Router/Sagaway.Callback.Router.csproj @@ -41,13 +41,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Sagaway.Hosts.DaprActorHost/Sagaway.Hosts.DaprActorHost.csproj b/Sagaway.Hosts.DaprActorHost/Sagaway.Hosts.DaprActorHost.csproj index 840fd25..ce82a3b 100644 --- a/Sagaway.Hosts.DaprActorHost/Sagaway.Hosts.DaprActorHost.csproj +++ b/Sagaway.Hosts.DaprActorHost/Sagaway.Hosts.DaprActorHost.csproj @@ -46,7 +46,7 @@ - + all diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Dockerfile b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Dockerfile index aa132bc..eff224f 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Dockerfile +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Dockerfile @@ -1,12 +1,12 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 8080 EXPOSE 8081 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Sagaway.IntegrationTests.OrchestrationService.csproj", "Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/"] diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Sagaway.IntegrationTests.OrchestrationService.csproj b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Sagaway.IntegrationTests.OrchestrationService.csproj index 41ca517..5683e87 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Sagaway.IntegrationTests.OrchestrationService.csproj +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.OrchestrationService/Sagaway.IntegrationTests.OrchestrationService.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true @@ -12,17 +12,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Dockerfile b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Dockerfile index 2c54649..ed6dd77 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Dockerfile +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Dockerfile @@ -1,7 +1,7 @@ # See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. # This stage is used when running from VS in fast mode (Default for Debug configuration) -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 8080 @@ -9,7 +9,7 @@ EXPOSE 8081 # This stage is used to build the service project -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Sagaway.IntegrationTests.StepRecorderTestService.csproj", "Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/"] diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Sagaway.IntegrationTests.StepRecorderTestService.csproj b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Sagaway.IntegrationTests.StepRecorderTestService.csproj index 6b9c525..2c29bfc 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Sagaway.IntegrationTests.StepRecorderTestService.csproj +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.StepRecorderTestService/Sagaway.IntegrationTests.StepRecorderTestService.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable enable Linux @@ -10,16 +10,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt new file mode 100644 index 0000000..075ca4b --- /dev/null +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt @@ -0,0 +1,132 @@ +Test Name: test_a_failed_on_2_no_callback +Result: False +Saga Log: +[*time*][CallA]: Start Executing CallA +[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*][CallA]: Retry CallA. Retry count: 1 +[*time*][CallA]: Start Executing CallA +[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*][CallA]: Wake by a reminder +[*time*][CallA]: OnReminderAsync: Validation for CallA returned false, retrying action. +[*time*][CallA]: Retry CallA. Retry count: 2 +[*time*][CallA]: Start Executing CallA +[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*][CallA]: CallA Failed. Retries exhausted. +[*time*][CallA]: Start Executing Revert CallA +[*time*][CallA]: No undo operation for CallA. Marking as reverted + +Open Telemetry: +[ + { + "TraceId": "id-1", + "ParentId": "id-2", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-5", + "Kind": null, + "Name": "name-6", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "operation.name": "CallA", + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-7", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-8", + "Kind": null, + "Name": "name-9", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "operation.name": "CallA", + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3" + } + }, + { + "TraceId": "id-10", + "ParentId": "id-11", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-12", + "Kind": null, + "Name": "name-9", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "operation.name": "CallA", + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-13", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.outcome": "Reverted", + "saga.type": "SagaTestActorOperations" + } + } +] \ No newline at end of file diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt new file mode 100644 index 0000000..2e40c0c --- /dev/null +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt @@ -0,0 +1,182 @@ +Test Name: test_a_failed_on_2_no_callback_revert +Result: False +Saga Log: +[*time*][CallA]: Start Executing CallA +[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*][CallA]: Retry CallA. Retry count: 1 +[*time*][CallA]: Start Executing CallA +[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*][CallA]: Retry CallA. Retry count: 2 +[*time*][CallA]: Start Executing CallA +[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*][CallA]: Wake by a reminder +[*time*][CallA]: OnReminderAsync: Validation for CallA returned false, retrying action. +[*time*][CallA]: CallA Failed. Retries exhausted. +[*time*][CallA]: Start Executing Revert CallA +[*time*][CallA]: Registering reminder CallA:Retry for Revert CallA with interval 00:00:05 +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*]The Saga is deactivated. +[*time*]The Saga is activated. +[*time*][CallA]: Revert CallA Success + +Open Telemetry: +[ + { + "TraceId": "id-1", + "ParentId": "id-2", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-5", + "Kind": null, + "Name": "name-6", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "operation.name": "CallA", + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-7", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-8", + "Kind": null, + "Name": "name-9", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "operation.name": "CallA", + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-10", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-11", + "Kind": null, + "Name": "name-9", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "operation.name": "CallA", + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3" + } + }, + { + "TraceId": "id-12", + "ParentId": "id-13", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-12", + "ParentId": "id-14", + "Kind": null, + "Name": "name-15", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "operation.name": "RevertCallA", + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3" + } + }, + { + "TraceId": "id-1", + "ParentId": "id-16", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.type": "SagaTestActorOperations" + } + }, + { + "TraceId": "id-12", + "ParentId": "id-17", + "Kind": "SERVER", + "Name": "name-4", + "LocalEndpoint": { + "ServiceName": "orchestrationservice.sagaway" + }, + "Tags": { + "otel.library.name": "OrchestrationService.Sagaway", + "otel.scope.name": "OrchestrationService.Sagaway", + "saga.id": "id-3", + "saga.outcome": "Reverted", + "saga.type": "SagaTestActorOperations" + } + } +] \ No newline at end of file diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/Sagaway.IntegrationTests.TestProject.csproj b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/Sagaway.IntegrationTests.TestProject.csproj index 0462901..14635f0 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/Sagaway.IntegrationTests.TestProject.csproj +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/Sagaway.IntegrationTests.TestProject.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable @@ -11,26 +11,26 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Dockerfile b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Dockerfile index 6841043..08c981e 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Dockerfile +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Dockerfile @@ -1,12 +1,12 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 8080 EXPOSE 8081 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Sagaway.IntegrationTests.TestService.csproj", "Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/"] diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Sagaway.IntegrationTests.TestService.csproj b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Sagaway.IntegrationTests.TestService.csproj index 0bab55e..561d6ce 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Sagaway.IntegrationTests.TestService.csproj +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestService/Sagaway.IntegrationTests.TestService.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true @@ -12,17 +12,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Dockerfile b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Dockerfile index d12ca23..e53fed5 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Dockerfile +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Dockerfile @@ -1,7 +1,7 @@ # See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. # This stage is used when running from VS in fast mode (Default for Debug configuration) -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 8080 @@ -9,7 +9,7 @@ EXPOSE 8081 # This stage is used to build the service project -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Sagaway.IntegrationTests.TestSubSagaCommunicationService.csproj", "Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/"] diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Sagaway.IntegrationTests.TestSubSagaCommunicationService.csproj b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Sagaway.IntegrationTests.TestSubSagaCommunicationService.csproj index fbbfe6e..1bba78c 100644 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Sagaway.IntegrationTests.TestSubSagaCommunicationService.csproj +++ b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestSubSagaCommunicationService/Sagaway.IntegrationTests.TestSubSagaCommunicationService.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable true @@ -12,16 +12,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/Sagaway.OpenTelemetry/Sagaway.OpenTelemetry.csproj b/Sagaway.OpenTelemetry/Sagaway.OpenTelemetry.csproj index 75ef63d..3462d82 100644 --- a/Sagaway.OpenTelemetry/Sagaway.OpenTelemetry.csproj +++ b/Sagaway.OpenTelemetry/Sagaway.OpenTelemetry.csproj @@ -48,7 +48,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Dockerfile b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Dockerfile index d311896..7969706 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Dockerfile +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Dockerfile @@ -1,12 +1,12 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Sagaway.ReservationDemo.BillingManagement.csproj", "Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/"] diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Sagaway.ReservationDemo.BillingManagement.csproj b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Sagaway.ReservationDemo.BillingManagement.csproj index 3bf62f1..4e718d1 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Sagaway.ReservationDemo.BillingManagement.csproj +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BillingManagement/Sagaway.ReservationDemo.BillingManagement.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true @@ -12,16 +12,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Dockerfile b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Dockerfile index 109a4f4..468ec5b 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Dockerfile +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Dockerfile @@ -1,12 +1,12 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Sagaway.ReservationDemo.BookingManagement.csproj", "Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/"] diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Sagaway.ReservationDemo.BookingManagement.csproj b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Sagaway.ReservationDemo.BookingManagement.csproj index 2e18c3c..dcdb8d0 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Sagaway.ReservationDemo.BookingManagement.csproj +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.BookingManagement/Sagaway.ReservationDemo.BookingManagement.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true @@ -12,16 +12,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Dockerfile b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Dockerfile index 6b3c32e..c79da8e 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Dockerfile +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Dockerfile @@ -1,12 +1,12 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Sagaway.ReservationDemo.InventoryManagement.csproj", "Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/"] diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Sagaway.ReservationDemo.InventoryManagement.csproj b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Sagaway.ReservationDemo.InventoryManagement.csproj index 6f928b1..2145a77 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Sagaway.ReservationDemo.InventoryManagement.csproj +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.InventoryManagement/Sagaway.ReservationDemo.InventoryManagement.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true @@ -12,16 +12,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Dockerfile b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Dockerfile index 2399469..6abea91 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Dockerfile +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Dockerfile @@ -1,12 +1,12 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Sagaway.ReservationDemo.ReservationManager.csproj", "Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/"] diff --git a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Sagaway.ReservationDemo.ReservationManager.csproj b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Sagaway.ReservationDemo.ReservationManager.csproj index 18f6f00..1eadef6 100644 --- a/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Sagaway.ReservationDemo.ReservationManager.csproj +++ b/Sagaway.ReservationDemo/Sagaway.ReservationDemo.ReservationManager/Sagaway.ReservationDemo.ReservationManager.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true @@ -12,19 +12,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/Sagaway.Tests/Sagaway.Tests.csproj b/Sagaway.Tests/Sagaway.Tests.csproj index 50f5aa5..6a00e6b 100644 --- a/Sagaway.Tests/Sagaway.Tests.csproj +++ b/Sagaway.Tests/Sagaway.Tests.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net9.0 enable enable @@ -10,16 +10,15 @@ - - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all From a00917f1cfb34913764a5eddc158a7969373eeed Mon Sep 17 00:00:00 2001 From: Alon Fliess Date: Thu, 24 Apr 2025 22:29:22 +0300 Subject: [PATCH 2/2] Remove OpenTelemetry logs from saga test files The test files `test_a_failed_on_2_no_callback.received.txt` and `test_a_failed_on_2_no_callback_revert.received.txt` have been updated to remove several OpenTelemetry logging entries related to saga operations and their outcomes. The changes reflect the execution flow of the saga, including retries and final outcomes. Additionally, the revert test file has been modified to indicate the success of the revert operation, which was previously absent. --- ...est_a_failed_on_2_no_callback.received.txt | 132 ------------- ...ailed_on_2_no_callback_revert.received.txt | 182 ------------------ 2 files changed, 314 deletions(-) delete mode 100644 Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt delete mode 100644 Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt deleted file mode 100644 index 075ca4b..0000000 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback.received.txt +++ /dev/null @@ -1,132 +0,0 @@ -Test Name: test_a_failed_on_2_no_callback -Result: False -Saga Log: -[*time*][CallA]: Start Executing CallA -[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*][CallA]: Retry CallA. Retry count: 1 -[*time*][CallA]: Start Executing CallA -[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*][CallA]: Wake by a reminder -[*time*][CallA]: OnReminderAsync: Validation for CallA returned false, retrying action. -[*time*][CallA]: Retry CallA. Retry count: 2 -[*time*][CallA]: Start Executing CallA -[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*][CallA]: CallA Failed. Retries exhausted. -[*time*][CallA]: Start Executing Revert CallA -[*time*][CallA]: No undo operation for CallA. Marking as reverted - -Open Telemetry: -[ - { - "TraceId": "id-1", - "ParentId": "id-2", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-5", - "Kind": null, - "Name": "name-6", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "operation.name": "CallA", - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-7", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-8", - "Kind": null, - "Name": "name-9", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "operation.name": "CallA", - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3" - } - }, - { - "TraceId": "id-10", - "ParentId": "id-11", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-12", - "Kind": null, - "Name": "name-9", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "operation.name": "CallA", - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-13", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.outcome": "Reverted", - "saga.type": "SagaTestActorOperations" - } - } -] \ No newline at end of file diff --git a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt b/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt deleted file mode 100644 index 2e40c0c..0000000 --- a/Sagaway.IntegrationTests/Sagaway.IntegrationTests.TestProject/ApprovalFiles/test_a_failed_on_2_no_callback_revert.received.txt +++ /dev/null @@ -1,182 +0,0 @@ -Test Name: test_a_failed_on_2_no_callback_revert -Result: False -Saga Log: -[*time*][CallA]: Start Executing CallA -[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*][CallA]: Retry CallA. Retry count: 1 -[*time*][CallA]: Start Executing CallA -[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*][CallA]: Retry CallA. Retry count: 2 -[*time*][CallA]: Start Executing CallA -[*time*][CallA]: Registering reminder CallA:Retry for CallA with interval 00:00:05 -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*][CallA]: Wake by a reminder -[*time*][CallA]: OnReminderAsync: Validation for CallA returned false, retrying action. -[*time*][CallA]: CallA Failed. Retries exhausted. -[*time*][CallA]: Start Executing Revert CallA -[*time*][CallA]: Registering reminder CallA:Retry for Revert CallA with interval 00:00:05 -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*]The Saga is deactivated. -[*time*]The Saga is activated. -[*time*][CallA]: Revert CallA Success - -Open Telemetry: -[ - { - "TraceId": "id-1", - "ParentId": "id-2", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-5", - "Kind": null, - "Name": "name-6", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "operation.name": "CallA", - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-7", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-8", - "Kind": null, - "Name": "name-9", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "operation.name": "CallA", - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-10", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-11", - "Kind": null, - "Name": "name-9", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "operation.name": "CallA", - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3" - } - }, - { - "TraceId": "id-12", - "ParentId": "id-13", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-12", - "ParentId": "id-14", - "Kind": null, - "Name": "name-15", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "operation.name": "RevertCallA", - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3" - } - }, - { - "TraceId": "id-1", - "ParentId": "id-16", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.type": "SagaTestActorOperations" - } - }, - { - "TraceId": "id-12", - "ParentId": "id-17", - "Kind": "SERVER", - "Name": "name-4", - "LocalEndpoint": { - "ServiceName": "orchestrationservice.sagaway" - }, - "Tags": { - "otel.library.name": "OrchestrationService.Sagaway", - "otel.scope.name": "OrchestrationService.Sagaway", - "saga.id": "id-3", - "saga.outcome": "Reverted", - "saga.type": "SagaTestActorOperations" - } - } -] \ No newline at end of file