From 5223384d088709382592ac3222fbc68e96bf75d8 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 15:35:20 -0700 Subject: [PATCH 1/8] add host health check --- test/SmokeTests/e2e-test.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/SmokeTests/e2e-test.ps1 b/test/SmokeTests/e2e-test.ps1 index 5eee1e0fd..654c9c134 100644 --- a/test/SmokeTests/e2e-test.ps1 +++ b/test/SmokeTests/e2e-test.ps1 @@ -107,6 +107,7 @@ try { $pingUrl = "http://localhost:8080/admin/host/ping" Write-Host "Pinging app at $pingUrl to ensure the host is healthy" -ForegroundColor Yellow Invoke-RestMethod -Method Post -Uri "http://localhost:8080/admin/host/ping" + Write-Host "Host is healthy" -ForegroundColor Green Exit-OnError if ($NoValidation -eq $false) { From ed4a3500ccdd3dd08d310ccb3c15fea6ec189e4f Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 15:38:11 -0700 Subject: [PATCH 2/8] add validation to .NET isolated e2e test --- .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 f818ff7ae..31891609c 100644 --- a/.github/workflows/smoketest-dotnet-isolated-v4.yml +++ b/.github/workflows/smoketest-dotnet-isolated-v4.yml @@ -21,5 +21,5 @@ jobs: # Validation is blocked on https://github.com/Azure/azure-functions-host/issues/7995 - name: Run V4 .NET Isolated Smoke Test - run: test/SmokeTests/e2e-test.ps1 -DockerfilePath test/SmokeTests/OOProcSmokeTests/DotNetIsolated/Dockerfile -HttpStartPath api/StartHelloCitiesTyped -NoValidation + run: test/SmokeTests/e2e-test.ps1 -DockerfilePath test/SmokeTests/OOProcSmokeTests/DotNetIsolated/Dockerfile -HttpStartPath api/StartHelloCitiesTyped shell: pwsh From 3127b46eec0022179fdb30d3605961fb7e31b438 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 15:50:43 -0700 Subject: [PATCH 3/8] add target framework to error --- .../DurableTaskExtension.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs index 937b236ea..24127df81 100644 --- a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs +++ b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs @@ -32,6 +32,10 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; +// debugging +using System.Reflection; +using System.Runtime.Versioning; + namespace Microsoft.Azure.WebJobs.Extensions.DurableTask { /// @@ -447,10 +451,15 @@ void IExtensionConfigProvider.Initialize(ExtensionConfigContext context) this.taskHubWorker.AddOrchestrationDispatcherMiddleware(ooprocMiddleware.CallOrchestratorAsync); this.taskHubWorker.AddEntityDispatcherMiddleware(ooprocMiddleware.CallEntityAsync); #else + + var targetFramework = Assembly.GetEntryAssembly()? + .GetCustomAttribute()? + .FrameworkName; + // This can happen if, for example, a Java user tries to use Durable Functions while targeting V2 or V3 extension bundles // because those bundles target .NET Core 2.2, which doesn't support the gRPC libraries used in the modern out-of-proc implementation. throw new PlatformNotSupportedException( - "This project type is not supported on this version of the Azure Functions runtime. Please upgrade to Azure Functions V3 or higher. " + + $"{targetFramework}. This project type is not supported on this version of the Azure Functions runtime. Please upgrade to Azure Functions V3 or higher. " + "If you are using a language that supports extension bundles, please use extension bundles V4 or higher. " + "For more information on Azure Functions versions, see https://docs.microsoft.com/azure/azure-functions/functions-versions. " + "For more information on extension bundles, see https://docs.microsoft.com/azure/azure-functions/functions-bindings-register#extension-bundles."); From 35d7527c3f820903985e00e490ce828b6e7df461 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 15:54:27 -0700 Subject: [PATCH 4/8] re-order imports --- src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs index 24127df81..dbab133a5 100644 --- a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs +++ b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs @@ -9,6 +9,7 @@ using System.Net; using System.Net.Http; using System.Reflection; +using System.Runtime.Versioning; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -32,10 +33,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -// debugging -using System.Reflection; -using System.Runtime.Versioning; - namespace Microsoft.Azure.WebJobs.Extensions.DurableTask { /// From e5fd6ee3f93df5b99a458337de5e666b39636772 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 18:37:12 -0700 Subject: [PATCH 5/8] remove NoValidation option --- test/SmokeTests/e2e-test.ps1 | 41 +++++++++++++++++------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/test/SmokeTests/e2e-test.ps1 b/test/SmokeTests/e2e-test.ps1 index 654c9c134..34f003272 100644 --- a/test/SmokeTests/e2e-test.ps1 +++ b/test/SmokeTests/e2e-test.ps1 @@ -7,7 +7,6 @@ param( [string]$ImageName="dfapp", [string]$ContainerName="app", [switch]$NoSetup=$false, - [switch]$NoValidation=$false, [int]$Sleep=30, [switch]$SetupSQLServer=$false, [string]$pw="$env:SA_PASSWORD", @@ -110,32 +109,30 @@ try { Write-Host "Host is healthy" -ForegroundColor Green Exit-OnError - if ($NoValidation -eq $false) { - # Note that any HTTP protocol errors (e.g. HTTP 4xx or 5xx) will cause an immediate failure - $startOrchestrationUri = "http://localhost:8080/$HttpStartPath" - Write-Host "Starting a new orchestration instance via POST to $startOrchestrationUri..." -ForegroundColor Yellow + # Note that any HTTP protocol errors (e.g. HTTP 4xx or 5xx) will cause an immediate failure + $startOrchestrationUri = "http://localhost:8080/$HttpStartPath" + Write-Host "Starting a new orchestration instance via POST to $startOrchestrationUri..." -ForegroundColor Yellow - $result = Invoke-RestMethod -Method Post -Uri $startOrchestrationUri - Write-Host "Started orchestration with instance ID '$($result.id)'!" -ForegroundColor Yellow - Write-Host "Waiting for orchestration to complete..." -ForegroundColor Yellow + $result = Invoke-RestMethod -Method Post -Uri $startOrchestrationUri + Write-Host "Started orchestration with instance ID '$($result.id)'!" -ForegroundColor Yellow + Write-Host "Waiting for orchestration to complete..." -ForegroundColor Yellow - $retryCount = 0 - $success = $false - $statusUrl = $result.statusQueryGetUri + $retryCount = 0 + $success = $false + $statusUrl = $result.statusQueryGetUri - while ($retryCount -lt 15) { - $result = Invoke-RestMethod -Method Get -Uri $statusUrl - $runtimeStatus = $result.runtimeStatus - Write-Host "Orchestration is $runtimeStatus" -ForegroundColor Yellow + while ($retryCount -lt 15) { + $result = Invoke-RestMethod -Method Get -Uri $statusUrl + $runtimeStatus = $result.runtimeStatus + Write-Host "Orchestration is $runtimeStatus" -ForegroundColor Yellow - if ($result.runtimeStatus -eq "Completed") { - $success = $true - break - } - - Start-Sleep -Seconds 1 - $retryCount = $retryCount + 1 + if ($result.runtimeStatus -eq "Completed") { + $success = $true + break } + + Start-Sleep -Seconds 1 + $retryCount = $retryCount + 1 } if ($success -eq $false) { From 722c4a73f20213b171786b40b44980cf4bb4c715 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 18:46:25 -0700 Subject: [PATCH 6/8] remove unecessary changes --- src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs index dbab133a5..d28c74791 100644 --- a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs +++ b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs @@ -9,7 +9,6 @@ using System.Net; using System.Net.Http; using System.Reflection; -using System.Runtime.Versioning; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -449,14 +448,10 @@ void IExtensionConfigProvider.Initialize(ExtensionConfigContext context) this.taskHubWorker.AddEntityDispatcherMiddleware(ooprocMiddleware.CallEntityAsync); #else - var targetFramework = Assembly.GetEntryAssembly()? - .GetCustomAttribute()? - .FrameworkName; - // This can happen if, for example, a Java user tries to use Durable Functions while targeting V2 or V3 extension bundles // because those bundles target .NET Core 2.2, which doesn't support the gRPC libraries used in the modern out-of-proc implementation. throw new PlatformNotSupportedException( - $"{targetFramework}. This project type is not supported on this version of the Azure Functions runtime. Please upgrade to Azure Functions V3 or higher. " + + $"This project type is not supported on this version of the Azure Functions runtime. Please upgrade to Azure Functions V3 or higher. " + "If you are using a language that supports extension bundles, please use extension bundles V4 or higher. " + "For more information on Azure Functions versions, see https://docs.microsoft.com/azure/azure-functions/functions-versions. " + "For more information on extension bundles, see https://docs.microsoft.com/azure/azure-functions/functions-bindings-register#extension-bundles."); From 27ce3475d3303b5ecc142a2aaa43bde02a78938a Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 18:48:33 -0700 Subject: [PATCH 7/8] remove $ --- src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs index d28c74791..8b7d538d6 100644 --- a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs +++ b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs @@ -451,7 +451,7 @@ void IExtensionConfigProvider.Initialize(ExtensionConfigContext context) // This can happen if, for example, a Java user tries to use Durable Functions while targeting V2 or V3 extension bundles // because those bundles target .NET Core 2.2, which doesn't support the gRPC libraries used in the modern out-of-proc implementation. throw new PlatformNotSupportedException( - $"This project type is not supported on this version of the Azure Functions runtime. Please upgrade to Azure Functions V3 or higher. " + + "This project type is not supported on this version of the Azure Functions runtime. Please upgrade to Azure Functions V3 or higher. " + "If you are using a language that supports extension bundles, please use extension bundles V4 or higher. " + "For more information on Azure Functions versions, see https://docs.microsoft.com/azure/azure-functions/functions-versions. " + "For more information on extension bundles, see https://docs.microsoft.com/azure/azure-functions/functions-bindings-register#extension-bundles."); From f0a2c40661299c19a07f7ac3da5da47eb4a3958f Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 30 Sep 2024 18:48:57 -0700 Subject: [PATCH 8/8] remove newline --- src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs index 8b7d538d6..937b236ea 100644 --- a/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs +++ b/src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs @@ -447,7 +447,6 @@ void IExtensionConfigProvider.Initialize(ExtensionConfigContext context) this.taskHubWorker.AddOrchestrationDispatcherMiddleware(ooprocMiddleware.CallOrchestratorAsync); this.taskHubWorker.AddEntityDispatcherMiddleware(ooprocMiddleware.CallEntityAsync); #else - // This can happen if, for example, a Java user tries to use Durable Functions while targeting V2 or V3 extension bundles // because those bundles target .NET Core 2.2, which doesn't support the gRPC libraries used in the modern out-of-proc implementation. throw new PlatformNotSupportedException(