From 3bfd14970291ecc4b7e5bf7210a27e7ac6251cad Mon Sep 17 00:00:00 2001 From: andystaples <77818326+andystaples@users.noreply.github.com> Date: Fri, 31 Jan 2025 12:40:04 -0800 Subject: [PATCH] Fix the official build (#3020) * Fix build issue for test on ado * Updated nuget.config to remove extra sources * Updated test project dependencies to stable versions * Run isolated smoketest on older ubuntu due to github actions runner image bug * Revert to HelloCitiesUntyped for .NET isolated due to class-as-a-function bug * Fixed bug relating to OOME retry logic in dotnet-isolated --- .github/workflows/smoketest-dotnet-isolated-v4.yml | 12 ++++++++++-- eng/ci/official-build.yml | 2 +- eng/templates/build.yml | 6 ++++++ nuget.config | 3 --- release_notes.md | 1 + .../DurableFunctions.TypedInterfaces.Example.csproj | 2 +- .../RemoteOrchestratorContext.cs | 2 +- .../DotNetIsolated/DotNetIsolated.csproj | 2 +- 8 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/smoketest-dotnet-isolated-v4.yml b/.github/workflows/smoketest-dotnet-isolated-v4.yml index 474f48448..f1fa0d6f2 100644 --- a/.github/workflows/smoketest-dotnet-isolated-v4.yml +++ b/.github/workflows/smoketest-dotnet-isolated-v4.yml @@ -15,7 +15,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -73,11 +73,19 @@ jobs: # when building the smoke test app in docker, causing the build to fail. This is a temporary workaround until the # root cause is identified and fixed. + # Due to a known issue with class-based orchestrators, this test fails to discover the orchestrator definition. + # Should re-enable once this bug is fixed: https://github.com/microsoft/durabletask-dotnet/issues/247 + # - name: Run smoke tests (Hello Cities) + # shell: pwsh + # run: azurite --silent --blobPort 10000 --queuePort 10001 --tablePort 10002 & + # cd ./test/SmokeTests/OOProcSmokeTests/DotNetIsolated && func host start --port 7071 & + # ./test/SmokeTests/OOProcSmokeTests/DotNetIsolated/run-smoke-tests.ps1 -HttpStartPath api/StartHelloCitiesTyped + - name: Run smoke tests (Hello Cities) shell: pwsh run: azurite --silent --blobPort 10000 --queuePort 10001 --tablePort 10002 & cd ./test/SmokeTests/OOProcSmokeTests/DotNetIsolated && func host start --port 7071 & - ./test/SmokeTests/OOProcSmokeTests/DotNetIsolated/run-smoke-tests.ps1 -HttpStartPath api/StartHelloCitiesTyped + ./test/SmokeTests/OOProcSmokeTests/DotNetIsolated/run-smoke-tests.ps1 -HttpStartPath api/StartHelloCitiesUntyped - name: Run smoke tests (Process Exit) shell: pwsh diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index 9fa980934..9732a64f6 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -47,4 +47,4 @@ extends: - stage: BuildAndSign dependsOn: [] jobs: - - template: /eng/templates/build.yml@self + - template: /eng/templates/build.yml@self \ No newline at end of file diff --git a/eng/templates/build.yml b/eng/templates/build.yml index c68e0d44d..a14af38ad 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -29,6 +29,12 @@ jobs: inputs: packageType: 'sdk' version: '6.0.x' + + - task: UseDotNet@2 + displayName: 'Use the .NET 8 SDK' + inputs: + packageType: 'sdk' + version: '8.0.x' # Start by restoring all the dependencies. - task: DotNetCoreCLI@2 diff --git a/nuget.config b/nuget.config index d580aab15..7b41c35e2 100644 --- a/nuget.config +++ b/nuget.config @@ -4,8 +4,5 @@ - - - diff --git a/release_notes.md b/release_notes.md index 812793b79..e52a1aa47 100644 --- a/release_notes.md +++ b/release_notes.md @@ -11,6 +11,7 @@ - Fix custom connection name not working when using IDurableClientFactory.CreateClient() - contributed by [@hctan](https://github.com/hctan) - Made durable extension for isolated worker configuration idempotent, allowing multiple calls safely. (#2950) +- Fixes a bug with Out of Memory exception handling in Isolated, improving reliability of retries for this case. (part of #3020) ### Breaking Changes diff --git a/src/DurableFunctions.TypedInterfaces/Example/DurableFunctions.TypedInterfaces.Example.csproj b/src/DurableFunctions.TypedInterfaces/Example/DurableFunctions.TypedInterfaces.Example.csproj index 3179a29a9..5830b8422 100644 --- a/src/DurableFunctions.TypedInterfaces/Example/DurableFunctions.TypedInterfaces.Example.csproj +++ b/src/DurableFunctions.TypedInterfaces/Example/DurableFunctions.TypedInterfaces.Example.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/WebJobs.Extensions.DurableTask/ContextImplementations/RemoteOrchestratorContext.cs b/src/WebJobs.Extensions.DurableTask/ContextImplementations/RemoteOrchestratorContext.cs index 86cb21c84..3243574d1 100644 --- a/src/WebJobs.Extensions.DurableTask/ContextImplementations/RemoteOrchestratorContext.cs +++ b/src/WebJobs.Extensions.DurableTask/ContextImplementations/RemoteOrchestratorContext.cs @@ -134,7 +134,7 @@ private void ThrowIfPlatformLevelException(FailureDetails failureDetails) // It's unclear if all OOMs are caught by the isolated process (probably not), and also if there are other platform-level // errors that are also caught in the isolated process and returned as a `OrchestratorExecutionResult`. Let's add them // to this method as we encounter them. - if (failureDetails.InnerFailure?.IsCausedBy() ?? false) + if (failureDetails.IsCausedBy()) { throw new SessionAbortedException(failureDetails.ErrorMessage); } diff --git a/test/SmokeTests/OOProcSmokeTests/DotNetIsolated/DotNetIsolated.csproj b/test/SmokeTests/OOProcSmokeTests/DotNetIsolated/DotNetIsolated.csproj index c909ce880..ed48e8d02 100644 --- a/test/SmokeTests/OOProcSmokeTests/DotNetIsolated/DotNetIsolated.csproj +++ b/test/SmokeTests/OOProcSmokeTests/DotNetIsolated/DotNetIsolated.csproj @@ -16,7 +16,7 @@ This preview package is to enable better NuGet restore behavior with custom feeds. TODO: upgrade to 1.16.0 when it's released. --> - +