From 1d37ef84002fafdfb5ecbf0474df6be139189325 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 27 Jan 2025 21:40:45 +0000 Subject: [PATCH 01/14] Updated build.yml --- eng/templates/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) 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 From 537862b3c428dfae3f492207ce13426608604799 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 27 Jan 2025 21:49:14 +0000 Subject: [PATCH 02/14] Added test.yml --- eng/templates/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 eng/templates/test.yml diff --git a/eng/templates/test.yml b/eng/templates/test.yml new file mode 100644 index 000000000..cafe3f2cd --- /dev/null +++ b/eng/templates/test.yml @@ -0,0 +1,16 @@ +trigger: none +pr: none + +pool: + name: '1ES-Hosted-DurableTaskFramework' + demands: + - ImageOverride -equals MMS2022TLS + +# Must run _after_ build.yml to ensure dependencies are available and tests are built +steps: +- pwsh: | + .\test\e2e\Tests\build-e2e-test.ps1 + +- task: VSTest@2 + displayName: 'Run E2E Tests' + searchFolder: 'test/e2e/Tests/' \ No newline at end of file From f5512abd05ee1b775e50b0f09047002fb0b23b92 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 27 Jan 2025 21:50:11 +0000 Subject: [PATCH 03/14] Updated official-build.yml --- eng/ci/official-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index 9fa980934..0e6e504c4 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -48,3 +48,7 @@ extends: dependsOn: [] jobs: - template: /eng/templates/build.yml@self + - stage: Test + dependsOn: [BuildAndSign] + jobs: + - template: /eng/templates/test.yml@self \ No newline at end of file From 40f5cfadae469c9c461360861cf09f2ee5bd5208 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 27 Jan 2025 21:51:25 +0000 Subject: [PATCH 04/14] Updated test.yml --- eng/templates/test.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/eng/templates/test.yml b/eng/templates/test.yml index cafe3f2cd..3481c2697 100644 --- a/eng/templates/test.yml +++ b/eng/templates/test.yml @@ -1,16 +1,19 @@ -trigger: none -pr: none +jobs: + - job: Build -pool: - name: '1ES-Hosted-DurableTaskFramework' - demands: - - ImageOverride -equals MMS2022TLS + templateContext: + outputs: + - output: pipelineArtifact + path: $(build.artifactStagingDirectory) + artifact: drop + sbomBuildDropPath: $(build.artifactStagingDirectory) + sbomPackageName: 'Durable Functions Extension SBOM' -# Must run _after_ build.yml to ensure dependencies are available and tests are built -steps: -- pwsh: | - .\test\e2e\Tests\build-e2e-test.ps1 + # Must run _after_ build.yml to ensure dependencies are available and tests are built + steps: + - pwsh: | + .\test\e2e\Tests\build-e2e-test.ps1 -- task: VSTest@2 - displayName: 'Run E2E Tests' - searchFolder: 'test/e2e/Tests/' \ No newline at end of file + - task: VSTest@2 + displayName: 'Run E2E Tests' + searchFolder: 'test/e2e/Tests/' \ No newline at end of file From d062e3ff35fed11625b8ba5b40802dac535fb850 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 27 Jan 2025 21:52:04 +0000 Subject: [PATCH 05/14] Updated test.yml --- eng/templates/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/templates/test.yml b/eng/templates/test.yml index 3481c2697..27b94572d 100644 --- a/eng/templates/test.yml +++ b/eng/templates/test.yml @@ -16,4 +16,5 @@ jobs: - task: VSTest@2 displayName: 'Run E2E Tests' - searchFolder: 'test/e2e/Tests/' \ No newline at end of file + inputs: + searchFolder: 'test/e2e/Tests/' \ No newline at end of file From f38df82fb006dabfbd86c3c5561c358e4af77520 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Mon, 27 Jan 2025 15:27:14 -0700 Subject: [PATCH 06/14] Fix build issue for test on ado --- test/e2e/Tests/build-e2e-test.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/Tests/build-e2e-test.ps1 b/test/e2e/Tests/build-e2e-test.ps1 index 53f00b0ca..5414dd38a 100644 --- a/test/e2e/Tests/build-e2e-test.ps1 +++ b/test/e2e/Tests/build-e2e-test.ps1 @@ -101,7 +101,10 @@ else Write-Host "Removing old packages from test app" Set-Location $E2EAppProjectDirectory -Get-ChildItem -Path ./packages -Include * -File -Recurse | ForEach-Object { $_.Delete()} +if (Test-Path "./packages") +{ + Get-ChildItem -Path ./packages -Include * -File -Recurse | ForEach-Object { $_.Delete()} +} Write-Host "Building WebJobs extension project" From 1e97cfeaa646b121687a56680ed2f8681c7a74da Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Tue, 28 Jan 2025 00:01:06 +0000 Subject: [PATCH 07/14] Updated nuget.config --- nuget.config | 3 --- 1 file changed, 3 deletions(-) diff --git a/nuget.config b/nuget.config index d580aab15..7b41c35e2 100644 --- a/nuget.config +++ b/nuget.config @@ -4,8 +4,5 @@ - - - From 7fe5c45a0203d21299b870e7aa1ec93d474dd58c Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 29 Jan 2025 19:01:06 +0000 Subject: [PATCH 08/14] Updated DurableFunctions.TypedInterfaces.Example.csproj --- .../Example/DurableFunctions.TypedInterfaces.Example.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ - + From 5f9976c0432c587d1091359c58effc89c6e24223 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 29 Jan 2025 12:32:25 -0700 Subject: [PATCH 09/14] Remove irrelevant changes --- eng/ci/official-build.yml | 6 +----- eng/templates/test.yml | 20 -------------------- test/e2e/Tests/build-e2e-test.ps1 | 5 +---- 3 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 eng/templates/test.yml diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index 0e6e504c4..9732a64f6 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -47,8 +47,4 @@ extends: - stage: BuildAndSign dependsOn: [] jobs: - - template: /eng/templates/build.yml@self - - stage: Test - dependsOn: [BuildAndSign] - jobs: - - template: /eng/templates/test.yml@self \ No newline at end of file + - template: /eng/templates/build.yml@self \ No newline at end of file diff --git a/eng/templates/test.yml b/eng/templates/test.yml deleted file mode 100644 index 27b94572d..000000000 --- a/eng/templates/test.yml +++ /dev/null @@ -1,20 +0,0 @@ -jobs: - - job: Build - - templateContext: - outputs: - - output: pipelineArtifact - path: $(build.artifactStagingDirectory) - artifact: drop - sbomBuildDropPath: $(build.artifactStagingDirectory) - sbomPackageName: 'Durable Functions Extension SBOM' - - # Must run _after_ build.yml to ensure dependencies are available and tests are built - steps: - - pwsh: | - .\test\e2e\Tests\build-e2e-test.ps1 - - - task: VSTest@2 - displayName: 'Run E2E Tests' - inputs: - searchFolder: 'test/e2e/Tests/' \ No newline at end of file diff --git a/test/e2e/Tests/build-e2e-test.ps1 b/test/e2e/Tests/build-e2e-test.ps1 index 5414dd38a..53f00b0ca 100644 --- a/test/e2e/Tests/build-e2e-test.ps1 +++ b/test/e2e/Tests/build-e2e-test.ps1 @@ -101,10 +101,7 @@ else Write-Host "Removing old packages from test app" Set-Location $E2EAppProjectDirectory -if (Test-Path "./packages") -{ - Get-ChildItem -Path ./packages -Include * -File -Recurse | ForEach-Object { $_.Delete()} -} +Get-ChildItem -Path ./packages -Include * -File -Recurse | ForEach-Object { $_.Delete()} Write-Host "Building WebJobs extension project" From c5cc336637b6addc31e6fea9f9466fb50918ccb6 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 29 Jan 2025 13:18:08 -0700 Subject: [PATCH 10/14] Update Worker SDK package in smoke test --- .../OOProcSmokeTests/DotNetIsolated/DotNetIsolated.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. --> - + From bf1e4317321238b94e6403660310c7990c91835f Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 29 Jan 2025 13:29:26 -0700 Subject: [PATCH 11/14] Run smoketest on older ubuntu - See https://github.com/actions/runner-images/issues/10989 --- .github/workflows/smoketest-dotnet-isolated-v4.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-dotnet-isolated-v4.yml b/.github/workflows/smoketest-dotnet-isolated-v4.yml index 474f48448..047d96eeb 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 From 08032557e2fec0d8c50cf3b2b14ff692dae4c055 Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 29 Jan 2025 14:05:03 -0700 Subject: [PATCH 12/14] Revert to HelloCitiesUntyped for .NET isolated --- .github/workflows/smoketest-dotnet-isolated-v4.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-dotnet-isolated-v4.yml b/.github/workflows/smoketest-dotnet-isolated-v4.yml index 047d96eeb..f1fa0d6f2 100644 --- a/.github/workflows/smoketest-dotnet-isolated-v4.yml +++ b/.github/workflows/smoketest-dotnet-isolated-v4.yml @@ -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 From 4dc5c92bf123f2f42a91c0bd21985829ac9aec5d Mon Sep 17 00:00:00 2001 From: Andy Staples Date: Wed, 29 Jan 2025 15:25:45 -0700 Subject: [PATCH 13/14] Probable bugfix for OOME handling --- .../ContextImplementations/RemoteOrchestratorContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } From e371aacc74a194e88e6e6da1f18a65b5ad5b2bc5 Mon Sep 17 00:00:00 2001 From: andystaples <77818326+andystaples@users.noreply.github.com> Date: Fri, 31 Jan 2025 13:27:37 -0700 Subject: [PATCH 14/14] Update release_notes.md --- release_notes.md | 1 + 1 file changed, 1 insertion(+) 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