From 4e30ddb5fc321364bfd508e77822d1cd0cb6e2dc Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 09:55:15 -0700 Subject: [PATCH 01/12] udpate version --- .../WebJobs.Extensions.DurableTask.csproj | 3 ++- src/Worker.Extensions.DurableTask/AssemblyInfo.cs | 2 +- .../Worker.Extensions.DurableTask.csproj | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj b/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj index 5dcba2b14..44e381985 100644 --- a/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj +++ b/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj @@ -6,7 +6,8 @@ Microsoft.Azure.WebJobs.Extensions.DurableTask 3 1 - 0 + 1 + schotfix.0 $(MajorVersion).$(MinorVersion).$(PatchVersion) $(MajorVersion).$(MinorVersion).$(PatchVersion) $(MajorVersion).0.0.0 diff --git a/src/Worker.Extensions.DurableTask/AssemblyInfo.cs b/src/Worker.Extensions.DurableTask/AssemblyInfo.cs index 39cbdb946..12160c952 100644 --- a/src/Worker.Extensions.DurableTask/AssemblyInfo.cs +++ b/src/Worker.Extensions.DurableTask/AssemblyInfo.cs @@ -5,5 +5,5 @@ using Microsoft.Azure.Functions.Worker.Extensions.Abstractions; // TODO: Find a way to generate this dynamically at build-time -[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.DurableTask", "3.1.0")] +[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.DurableTask", "3.1.0-schotfix.0")] [assembly: InternalsVisibleTo("Worker.Extensions.DurableTask.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100cd1dabd5a893b40e75dc901fe7293db4a3caf9cd4d3e3ed6178d49cd476969abe74a9e0b7f4a0bb15edca48758155d35a4f05e6e852fff1b319d103b39ba04acbadd278c2753627c95e1f6f6582425374b92f51cca3deb0d2aab9de3ecda7753900a31f70a236f163006beefffe282888f85e3c76d1205ec7dfef7fa472a17b1")] diff --git a/src/Worker.Extensions.DurableTask/Worker.Extensions.DurableTask.csproj b/src/Worker.Extensions.DurableTask/Worker.Extensions.DurableTask.csproj index 2a8520376..1af53e847 100644 --- a/src/Worker.Extensions.DurableTask/Worker.Extensions.DurableTask.csproj +++ b/src/Worker.Extensions.DurableTask/Worker.Extensions.DurableTask.csproj @@ -29,8 +29,8 @@ ..\..\sign.snk - 1.3.0 - + 1.3.1 + schotfix.0 $(VersionPrefix).0 $(VersionPrefix).$(FileVersionRevision) From 321f7692a6e30466e2f48792023d3d67f78f8744 Mon Sep 17 00:00:00 2001 From: Naiyuan Tian <110135109+nytian@users.noreply.github.com> Date: Tue, 12 Aug 2025 18:36:01 -0400 Subject: [PATCH 02/12] cherry pick idurabilityprovider change --- .../IDurabilityProviderFactory.cs | 15 +++++++++++++++ .../Scale/DurableTaskTriggersScaleProvider.cs | 14 ++++++++++++-- .../EmulatorDurabilityProviderFactory.cs | 1 - 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/WebJobs.Extensions.DurableTask/IDurabilityProviderFactory.cs b/src/WebJobs.Extensions.DurableTask/IDurabilityProviderFactory.cs index 6b4fa2b85..af566185f 100644 --- a/src/WebJobs.Extensions.DurableTask/IDurabilityProviderFactory.cs +++ b/src/WebJobs.Extensions.DurableTask/IDurabilityProviderFactory.cs @@ -1,5 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +using System; +using Microsoft.Azure.WebJobs.Host.Scale; namespace Microsoft.Azure.WebJobs.Extensions.DurableTask { @@ -25,5 +27,18 @@ public interface IDurabilityProviderFactory /// A durable client attribute with parameters for the durability provider. /// A durability provider to be used by a client function. DurabilityProvider GetDurabilityProvider(DurableClientAttribute attribute); + + /// + /// Creates or retrieves a cached durability provider to be used in a given function execution. + /// + /// A durable client attribute with parameters for the durability provider. + /// Trigger metadata used to create IOrchestrationService for functions scale scenarios. + /// A durability provider to be used by a client function. + DurabilityProvider GetDurabilityProvider(DurableClientAttribute attribute, TriggerMetadata triggerMetadata) + { + // This method is not supported by this provider. + // Only providers that require TriggerMetadata for scale should implement it. + throw new NotImplementedException("This provider does not support GetDurabilityProvider with TriggerMetadata."); + } } } diff --git a/src/WebJobs.Extensions.DurableTask/Scale/DurableTaskTriggersScaleProvider.cs b/src/WebJobs.Extensions.DurableTask/Scale/DurableTaskTriggersScaleProvider.cs index 85595dcfa..257dc08be 100644 --- a/src/WebJobs.Extensions.DurableTask/Scale/DurableTaskTriggersScaleProvider.cs +++ b/src/WebJobs.Extensions.DurableTask/Scale/DurableTaskTriggersScaleProvider.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.ComponentModel; using Microsoft.Azure.WebJobs.Host.Scale; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; @@ -15,6 +14,8 @@ namespace Microsoft.Azure.WebJobs.Extensions.DurableTask.Scale { internal class DurableTaskTriggersScaleProvider : IScaleMonitorProvider, ITargetScalerProvider { + private const string AzureManagedProviderName = "azureManaged"; + private readonly IScaleMonitor monitor; private readonly ITargetScaler targetScaler; private readonly DurableTaskOptions options; @@ -40,7 +41,16 @@ public DurableTaskTriggersScaleProvider( this.GetOptions(triggerMetadata); IDurabilityProviderFactory durabilityProviderFactory = this.GetDurabilityProviderFactory(); - DurabilityProvider defaultDurabilityProvider = durabilityProviderFactory.GetDurabilityProvider(); + + DurabilityProvider defaultDurabilityProvider; + if (string.Equals(durabilityProviderFactory.Name, AzureManagedProviderName, StringComparison.OrdinalIgnoreCase)) + { + defaultDurabilityProvider = durabilityProviderFactory.GetDurabilityProvider(attribute: null, triggerMetadata); + } + else + { + defaultDurabilityProvider = durabilityProviderFactory.GetDurabilityProvider(); + } // Note: `this.options` is populated from the trigger metadata above string? connectionName = GetConnectionName(durabilityProviderFactory, this.options); diff --git a/test/FunctionsV2/EmulatorDurabilityProviderFactory.cs b/test/FunctionsV2/EmulatorDurabilityProviderFactory.cs index 11328d360..43937ed7e 100644 --- a/test/FunctionsV2/EmulatorDurabilityProviderFactory.cs +++ b/test/FunctionsV2/EmulatorDurabilityProviderFactory.cs @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -using DurableTask.Core; using DurableTask.Emulator; namespace Microsoft.Azure.WebJobs.Extensions.DurableTask From 1964037f8fc0cbfeda93b3648273d648df8d9c20 Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 10:58:19 -0700 Subject: [PATCH 03/12] enable test --- .github/workflows/E2ETest.yml | 4 ++-- .github/workflows/codeQL.yml | 2 +- .github/workflows/smoketest-dotnet-isolated-v4.yml | 2 +- .github/workflows/smoketest-java8-v4.yml | 2 +- .github/workflows/smoketest-mssql-inproc-v4.yml | 2 +- .github/workflows/smoketest-netherite-inproc-v4.yml | 2 +- .github/workflows/smoketest-node14-v4.yml | 2 +- .github/workflows/smoketest-python37-v4.yml | 2 +- .github/workflows/validate-build.yml | 1 + 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/E2ETest.yml b/.github/workflows/E2ETest.yml index 5591e8d2c..c53d5835e 100644 --- a/.github/workflows/E2ETest.yml +++ b/.github/workflows/E2ETest.yml @@ -3,12 +3,12 @@ name: End to End Test - .NET Isolated/Func V4 on: workflow_dispatch: push: - branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests ] + branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests, nytian/v3.1.0 ] paths: - 'src/**' - 'test/e2e/**' pull_request: - branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests ] + branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests, nytian/v3.1.0 ] paths: - 'src/**' - 'test/e2e/**' diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml index 6cb68940e..af3ef1dd2 100644 --- a/.github/workflows/codeQL.yml +++ b/.github/workflows/codeQL.yml @@ -8,7 +8,7 @@ on: push: branches: [ "main", "*" ] # TODO: remove development branch after approval pull_request: - branches: [ "main", "*"] # TODO: remove development branch after approval + branches: [ "main", "*", "nytian/v3.1.0"] # TODO: remove development branch after approval schedule: - cron: '0 0 * * 1' # Weekly Monday run, needed for weekly reports workflow_call: # allows to be invoked as part of a larger workflow diff --git a/.github/workflows/smoketest-dotnet-isolated-v4.yml b/.github/workflows/smoketest-dotnet-isolated-v4.yml index f1fa0d6f2..426c6c7c4 100644 --- a/.github/workflows/smoketest-dotnet-isolated-v4.yml +++ b/.github/workflows/smoketest-dotnet-isolated-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/DotNetIsolated/**' pull_request: - branches: [ main, dev ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/DotNetIsolated/**' diff --git a/.github/workflows/smoketest-java8-v4.yml b/.github/workflows/smoketest-java8-v4.yml index e118632bb..e1d0e82d8 100644 --- a/.github/workflows/smoketest-java8-v4.yml +++ b/.github/workflows/smoketest-java8-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJava/**' pull_request: - branches: [ main, dev ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJava/**' diff --git a/.github/workflows/smoketest-mssql-inproc-v4.yml b/.github/workflows/smoketest-mssql-inproc-v4.yml index e2b25adab..50d6c98ce 100644 --- a/.github/workflows/smoketest-mssql-inproc-v4.yml +++ b/.github/workflows/smoketest-mssql-inproc-v4.yml @@ -9,7 +9,7 @@ on: - 'test/SmokeTests/BackendSmokeTests/MSSQL/**' - '.github/workflows/smoketest-mssql-inproc-v4.yml' pull_request: - branches: [ main, dev ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/MSSQL/**' diff --git a/.github/workflows/smoketest-netherite-inproc-v4.yml b/.github/workflows/smoketest-netherite-inproc-v4.yml index c8d62c1d7..146817c5f 100644 --- a/.github/workflows/smoketest-netherite-inproc-v4.yml +++ b/.github/workflows/smoketest-netherite-inproc-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/Netherite/**' pull_request: - branches: [ main, dev ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/Netherite/**' diff --git a/.github/workflows/smoketest-node14-v4.yml b/.github/workflows/smoketest-node14-v4.yml index 3078b8d10..5d98d8dcb 100644 --- a/.github/workflows/smoketest-node14-v4.yml +++ b/.github/workflows/smoketest-node14-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJS/**' pull_request: - branches: [ main, dev ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJS/**' diff --git a/.github/workflows/smoketest-python37-v4.yml b/.github/workflows/smoketest-python37-v4.yml index 70b7b5378..1a260b55c 100644 --- a/.github/workflows/smoketest-python37-v4.yml +++ b/.github/workflows/smoketest-python37-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durablePy/**' pull_request: - branches: [ main, dev ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durablePy/**' diff --git a/.github/workflows/validate-build.yml b/.github/workflows/validate-build.yml index de6cf0360..a3dba6b69 100644 --- a/.github/workflows/validate-build.yml +++ b/.github/workflows/validate-build.yml @@ -9,6 +9,7 @@ on: pull_request: branches: - '*' + - nytian/v3.1.0 paths-ignore: [ '**.md' ] env: From 7d85158c73131027ece5d180f40a57e4290fb053 Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 10:03:42 -0700 Subject: [PATCH 04/12] solve whitespace --- .github/workflows/codeQL.yml | 2 +- .github/workflows/smoketest-dotnet-isolated-v4.yml | 2 +- .github/workflows/smoketest-java8-v4.yml | 2 +- .github/workflows/smoketest-mssql-inproc-v4.yml | 2 +- .github/workflows/smoketest-netherite-inproc-v4.yml | 2 +- .github/workflows/smoketest-node14-v4.yml | 2 +- .github/workflows/smoketest-python37-v4.yml | 2 +- .github/workflows/validate-build-analyzer.yml | 2 ++ .github/workflows/validate-build-e2e.yml | 2 ++ .github/workflows/validate-build.yml | 1 + 10 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml index af3ef1dd2..89ffc5c1b 100644 --- a/.github/workflows/codeQL.yml +++ b/.github/workflows/codeQL.yml @@ -6,7 +6,7 @@ name: "CodeQL" on: push: - branches: [ "main", "*" ] # TODO: remove development branch after approval + branches: [ "main", "*", "nytian/v3.1.0" ] # TODO: remove development branch after approval pull_request: branches: [ "main", "*", "nytian/v3.1.0"] # TODO: remove development branch after approval schedule: diff --git a/.github/workflows/smoketest-dotnet-isolated-v4.yml b/.github/workflows/smoketest-dotnet-isolated-v4.yml index 426c6c7c4..79d457d5f 100644 --- a/.github/workflows/smoketest-dotnet-isolated-v4.yml +++ b/.github/workflows/smoketest-dotnet-isolated-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/DotNetIsolated/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/DotNetIsolated/**' diff --git a/.github/workflows/smoketest-java8-v4.yml b/.github/workflows/smoketest-java8-v4.yml index e1d0e82d8..95608f340 100644 --- a/.github/workflows/smoketest-java8-v4.yml +++ b/.github/workflows/smoketest-java8-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJava/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJava/**' diff --git a/.github/workflows/smoketest-mssql-inproc-v4.yml b/.github/workflows/smoketest-mssql-inproc-v4.yml index 50d6c98ce..7fb403350 100644 --- a/.github/workflows/smoketest-mssql-inproc-v4.yml +++ b/.github/workflows/smoketest-mssql-inproc-v4.yml @@ -9,7 +9,7 @@ on: - 'test/SmokeTests/BackendSmokeTests/MSSQL/**' - '.github/workflows/smoketest-mssql-inproc-v4.yml' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/MSSQL/**' diff --git a/.github/workflows/smoketest-netherite-inproc-v4.yml b/.github/workflows/smoketest-netherite-inproc-v4.yml index 146817c5f..00dd5abb3 100644 --- a/.github/workflows/smoketest-netherite-inproc-v4.yml +++ b/.github/workflows/smoketest-netherite-inproc-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/Netherite/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/Netherite/**' diff --git a/.github/workflows/smoketest-node14-v4.yml b/.github/workflows/smoketest-node14-v4.yml index 5d98d8dcb..e07197c9d 100644 --- a/.github/workflows/smoketest-node14-v4.yml +++ b/.github/workflows/smoketest-node14-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJS/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJS/**' diff --git a/.github/workflows/smoketest-python37-v4.yml b/.github/workflows/smoketest-python37-v4.yml index 1a260b55c..c3e017db1 100644 --- a/.github/workflows/smoketest-python37-v4.yml +++ b/.github/workflows/smoketest-python37-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durablePy/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durablePy/**' diff --git a/.github/workflows/validate-build-analyzer.yml b/.github/workflows/validate-build-analyzer.yml index 22afaf09d..cef5207e1 100644 --- a/.github/workflows/validate-build-analyzer.yml +++ b/.github/workflows/validate-build-analyzer.yml @@ -5,10 +5,12 @@ on: branches: - main - dev + - nytian/v3.1.0 paths-ignore: [ '**.md' ] pull_request: branches: - '*' + - nytian/v3.1.0 paths-ignore: [ '**.md' ] env: diff --git a/.github/workflows/validate-build-e2e.yml b/.github/workflows/validate-build-e2e.yml index 935a33072..3ae3c139d 100644 --- a/.github/workflows/validate-build-e2e.yml +++ b/.github/workflows/validate-build-e2e.yml @@ -5,10 +5,12 @@ on: branches: - main - dev + - nytian/v3.1.0 paths-ignore: [ '**.md' ] pull_request: branches: - '*' + - nytian/v3.1.0 paths-ignore: [ '**.md' ] env: diff --git a/.github/workflows/validate-build.yml b/.github/workflows/validate-build.yml index a3dba6b69..2066de31f 100644 --- a/.github/workflows/validate-build.yml +++ b/.github/workflows/validate-build.yml @@ -5,6 +5,7 @@ on: branches: - main - dev + - nytian/v3.1.0 paths-ignore: [ '**.md' ] pull_request: branches: From 4eeac84ec463f53c17c6527313da6aaac2866d1b Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 11:04:17 -0700 Subject: [PATCH 05/12] enale test --- .github/workflows/E2ETest.yml | 4 ++-- .github/workflows/codeQL.yml | 4 ++-- .github/workflows/smoketest-dotnet-isolated-v4.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/E2ETest.yml b/.github/workflows/E2ETest.yml index c53d5835e..8e140f9ef 100644 --- a/.github/workflows/E2ETest.yml +++ b/.github/workflows/E2ETest.yml @@ -3,12 +3,12 @@ name: End to End Test - .NET Isolated/Func V4 on: workflow_dispatch: push: - branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests, nytian/v3.1.0 ] + branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests, nytian/v3.1.0, nytian/sc-hotfix-v3.1.0 ] paths: - 'src/**' - 'test/e2e/**' pull_request: - branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests, nytian/v3.1.0 ] + branches: [ main, dev, andystaples/add-gh-action-for-e2e-tests, nytian/v3.1.0, nytian/sc-hotfix-v3.1.0 ] paths: - 'src/**' - 'test/e2e/**' diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml index 89ffc5c1b..67a0c59c6 100644 --- a/.github/workflows/codeQL.yml +++ b/.github/workflows/codeQL.yml @@ -6,9 +6,9 @@ name: "CodeQL" on: push: - branches: [ "main", "*", "nytian/v3.1.0" ] # TODO: remove development branch after approval + branches: [ "main", "*", "nytian/v3.1.0", "nytian/sc-hotfix-v3.1.0" ] # TODO: remove development branch after approval pull_request: - branches: [ "main", "*", "nytian/v3.1.0"] # TODO: remove development branch after approval + branches: [ "main", "*", "nytian/v3.1.0", "nytian/sc-hotfix-v3.1.0"] # TODO: remove development branch after approval schedule: - cron: '0 0 * * 1' # Weekly Monday run, needed for weekly reports workflow_call: # allows to be invoked as part of a larger workflow diff --git a/.github/workflows/smoketest-dotnet-isolated-v4.yml b/.github/workflows/smoketest-dotnet-isolated-v4.yml index 79d457d5f..020283838 100644 --- a/.github/workflows/smoketest-dotnet-isolated-v4.yml +++ b/.github/workflows/smoketest-dotnet-isolated-v4.yml @@ -3,12 +3,12 @@ name: Smoke Test - .NET Isolated on Functions V4 on: workflow_dispatch: push: - branches: [ main, dev ] + branches: [ main, dev, nytian/sc-hotfix-v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/DotNetIsolated/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0, nytian/sc-hotfix-v3.1.0 ] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/DotNetIsolated/**' From 14fb8126ef71e4d7e61adbeac70dd647822f0c7f Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 11:21:58 -0700 Subject: [PATCH 06/12] enale test --- .github/workflows/smoketest-java8-v4.yml | 2 +- .github/workflows/smoketest-mssql-inproc-v4.yml | 2 +- .github/workflows/smoketest-netherite-inproc-v4.yml | 2 +- .github/workflows/smoketest-node14-v4.yml | 2 +- .github/workflows/smoketest-python37-v4.yml | 2 +- .github/workflows/validate-build-analyzer.yml | 1 + .github/workflows/validate-build-e2e.yml | 1 + .github/workflows/validate-build.yml | 1 + 8 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/smoketest-java8-v4.yml b/.github/workflows/smoketest-java8-v4.yml index 95608f340..92e7bf092 100644 --- a/.github/workflows/smoketest-java8-v4.yml +++ b/.github/workflows/smoketest-java8-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJava/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 , nytian/sc-hotfix-v3.1.0] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJava/**' diff --git a/.github/workflows/smoketest-mssql-inproc-v4.yml b/.github/workflows/smoketest-mssql-inproc-v4.yml index 7fb403350..013b91c27 100644 --- a/.github/workflows/smoketest-mssql-inproc-v4.yml +++ b/.github/workflows/smoketest-mssql-inproc-v4.yml @@ -9,7 +9,7 @@ on: - 'test/SmokeTests/BackendSmokeTests/MSSQL/**' - '.github/workflows/smoketest-mssql-inproc-v4.yml' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 , nytian/sc-hotfix-v3.1.0] paths: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/MSSQL/**' diff --git a/.github/workflows/smoketest-netherite-inproc-v4.yml b/.github/workflows/smoketest-netherite-inproc-v4.yml index 00dd5abb3..ecd9f5835 100644 --- a/.github/workflows/smoketest-netherite-inproc-v4.yml +++ b/.github/workflows/smoketest-netherite-inproc-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/Netherite/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 , nytian/sc-hotfix-v3.1.0] paths: - 'src/**' - 'test/SmokeTests/BackendSmokeTests/Netherite/**' diff --git a/.github/workflows/smoketest-node14-v4.yml b/.github/workflows/smoketest-node14-v4.yml index e07197c9d..35177713f 100644 --- a/.github/workflows/smoketest-node14-v4.yml +++ b/.github/workflows/smoketest-node14-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJS/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 , nytian/sc-hotfix-v3.1.0] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durableJS/**' diff --git a/.github/workflows/smoketest-python37-v4.yml b/.github/workflows/smoketest-python37-v4.yml index c3e017db1..3abede5de 100644 --- a/.github/workflows/smoketest-python37-v4.yml +++ b/.github/workflows/smoketest-python37-v4.yml @@ -8,7 +8,7 @@ on: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durablePy/**' pull_request: - branches: [ main, dev, nytian/v3.1.0 ] + branches: [ main, dev, nytian/v3.1.0 , nytian/sc-hotfix-v3.1.0] paths: - 'src/**' - 'test/SmokeTests/OOProcSmokeTests/durablePy/**' diff --git a/.github/workflows/validate-build-analyzer.yml b/.github/workflows/validate-build-analyzer.yml index cef5207e1..3a4654d60 100644 --- a/.github/workflows/validate-build-analyzer.yml +++ b/.github/workflows/validate-build-analyzer.yml @@ -11,6 +11,7 @@ on: branches: - '*' - nytian/v3.1.0 + - nytian/sc-hotfix-v3.1.0 paths-ignore: [ '**.md' ] env: diff --git a/.github/workflows/validate-build-e2e.yml b/.github/workflows/validate-build-e2e.yml index 3ae3c139d..cbbbc4425 100644 --- a/.github/workflows/validate-build-e2e.yml +++ b/.github/workflows/validate-build-e2e.yml @@ -11,6 +11,7 @@ on: branches: - '*' - nytian/v3.1.0 + - nytian/sc-hotfix-v3.1.0 paths-ignore: [ '**.md' ] env: diff --git a/.github/workflows/validate-build.yml b/.github/workflows/validate-build.yml index 2066de31f..29612a95c 100644 --- a/.github/workflows/validate-build.yml +++ b/.github/workflows/validate-build.yml @@ -11,6 +11,7 @@ on: branches: - '*' - nytian/v3.1.0 + - nytian/sc-hotfix-v3.1.0 paths-ignore: [ '**.md' ] env: From 58c8e7ba39a58d78687d56d22f5872cc93033fc1 Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 13:19:38 -0700 Subject: [PATCH 07/12] use java 17 to pass build ci --- test/SmokeTests/OOProcSmokeTests/durableJava/Dockerfile | 2 +- test/SmokeTests/OOProcSmokeTests/durableJava/build.gradle | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/SmokeTests/OOProcSmokeTests/durableJava/Dockerfile b/test/SmokeTests/OOProcSmokeTests/durableJava/Dockerfile index 1a3e329a6..4ace28110 100644 --- a/test/SmokeTests/OOProcSmokeTests/durableJava/Dockerfile +++ b/test/SmokeTests/OOProcSmokeTests/durableJava/Dockerfile @@ -3,7 +3,7 @@ COPY . /root RUN cd /root/test/SmokeTests/OOProcSmokeTests/durableJava && \ dotnet build -o bin -FROM mcr.microsoft.com/azure-functions/java:4-java8 +FROM mcr.microsoft.com/azure-functions/java:4-java17 # Copy the bin folder generated at /root/test/SmokeTests/OOProcSmokeTests/durableJava COPY --from=build-env /root/test/SmokeTests/OOProcSmokeTests/durableJava /home/site/wwwroot diff --git a/test/SmokeTests/OOProcSmokeTests/durableJava/build.gradle b/test/SmokeTests/OOProcSmokeTests/durableJava/build.gradle index b0a7eec03..a14ee3d23 100644 --- a/test/SmokeTests/OOProcSmokeTests/durableJava/build.gradle +++ b/test/SmokeTests/OOProcSmokeTests/durableJava/build.gradle @@ -24,8 +24,8 @@ dependencies { runtimeOnly "io.grpc:grpc-netty-shaded:1.38.0" } -sourceCompatibility = '1.8' -targetCompatibility = '1.8' +sourceCompatibility = '17' +targetCompatibility = '17' compileJava.options.encoding = 'UTF-8' @@ -36,7 +36,7 @@ azurefunctions { region = 'westus' runtime { os = 'Windows' - javaVersion = 'Java 8' + javaVersion = 'Java 17' } auth { type = 'azure_cli' From 767c3f64e21df14158af36b4d33ba0541930ec79 Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 13:25:34 -0700 Subject: [PATCH 08/12] udpate githubworkflow to use java18 --- .github/workflows/smoketest-java8-v4.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoketest-java8-v4.yml b/.github/workflows/smoketest-java8-v4.yml index 92e7bf092..92bb551f7 100644 --- a/.github/workflows/smoketest-java8-v4.yml +++ b/.github/workflows/smoketest-java8-v4.yml @@ -1,4 +1,4 @@ -name: Smoke Test - Java 8 on Functions V4 +name: Smoke Test - Java 17 on Functions V4 on: workflow_dispatch: @@ -18,10 +18,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up JDK 8 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - java-version: '8' + java-version: '17' distribution: 'temurin' - name: Build azure functions sample uses: gradle/gradle-build-action@bc3340afc5e3cc44f2321809ac090d731c13c514 From b130a4a0116bb065e6351db65bdaf7e42f8b7587 Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 13:31:04 -0700 Subject: [PATCH 09/12] upgrade gradle --- .github/workflows/smoketest-java8-v4.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-java8-v4.yml b/.github/workflows/smoketest-java8-v4.yml index 92bb551f7..301595bce 100644 --- a/.github/workflows/smoketest-java8-v4.yml +++ b/.github/workflows/smoketest-java8-v4.yml @@ -26,7 +26,7 @@ jobs: - name: Build azure functions sample uses: gradle/gradle-build-action@bc3340afc5e3cc44f2321809ac090d731c13c514 with: - gradle-version: 6.5 + gradle-version: 7.4 arguments: azureFunctionsPackage -p test/SmokeTests/OOProcSmokeTests/durableJava/ continue-on-error: true - name: Download azure functions java library # TODO: Remove this step once gradle plugin is updated From 4a94eec82eece614e4362af2f4c41fd02f338c65 Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 14:25:33 -0700 Subject: [PATCH 10/12] udpate build --- eng/templates/build.yml | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/eng/templates/build.yml b/eng/templates/build.yml index a14af38ad..1f13235b4 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -131,12 +131,60 @@ jobs: Contents: '**' TargetFolder: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension/' + # Setup Java 17 for building the Java smoke test + - task: JavaToolInstaller@0 + displayName: 'Use Java 17' + inputs: + versionSpec: '17' + jdkArchitectureOption: 'x64' + jdkSourceOption: 'PreInstalled' + # We also need to build the Java smoke test, for CodeQL compliance # We don't need to build the other smoke tests, because they can be analyzed without being compiled, # as they're interpreted languages. # This could be a separate pipeline, but the task is so small that it's paired with the .NET code build # for convenience. - pwsh: | + # Verify Java 17 is installed and set environment + Write-Host "=== Checking Java Installation ===" + java -version + Write-Host "JAVA_HOME before: $env:JAVA_HOME" + + # Find Java 17 installation and set JAVA_HOME explicitly + $java17Path = "" + $possiblePaths = @( + "$env:AGENT_TOOLSDIRECTORY\Java_Temurin-Hotspot\17*\x64", + "$env:AGENT_TOOLSDIRECTORY\jdk\17*\x64", + "C:\Program Files\Java\jdk-17*", + "C:\hostedtoolcache\windows\Java_Temurin-Hotspot\17*\x64" + ) + + foreach ($path in $possiblePaths) { + $resolved = Get-ChildItem $path -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($resolved -and (Test-Path "$($resolved.FullName)\bin\java.exe")) { + $java17Path = $resolved.FullName + break + } + } + + if (-not $java17Path) { + Write-Host "Falling back to current java location" + $javaExe = Get-Command java | Select-Object -ExpandProperty Source + $java17Path = Split-Path (Split-Path $javaExe -Parent) -Parent + } + + $env:JAVA_HOME = $java17Path + $env:PATH = "$java17Path\bin;$env:PATH" + + Write-Host "JAVA_HOME set to: $env:JAVA_HOME" + Write-Host "Java version check:" + & "$env:JAVA_HOME\bin\java.exe" -version + + # Set Gradle options to use the correct Java + $env:GRADLE_OPTS = "-Dorg.gradle.java.home='$env:JAVA_HOME'" + Write-Host "GRADLE_OPTS: $env:GRADLE_OPTS" + + # Build the Java project cd ./test/SmokeTests/OOProcSmokeTests/durableJava/ gradle build ls From 762680aaa003379f84ea1cfba450b79e6212c49e Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 14:55:13 -0700 Subject: [PATCH 11/12] update build --- eng/templates/build.yml | 66 ++++++++++------------------------------- 1 file changed, 16 insertions(+), 50 deletions(-) diff --git a/eng/templates/build.yml b/eng/templates/build.yml index 1f13235b4..fdb4a094e 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -131,6 +131,11 @@ jobs: Contents: '**' TargetFolder: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension/' + # We also need to build the Java smoke test, for CodeQL compliance + # We don't need to build the other smoke tests, because they can be analyzed without being compiled, + # as they're interpreted languages. + # This could be a separate pipeline, but the task is so small that it's paired with the .NET code build + # for convenience. # Setup Java 17 for building the Java smoke test - task: JavaToolInstaller@0 displayName: 'Use Java 17' @@ -139,53 +144,14 @@ jobs: jdkArchitectureOption: 'x64' jdkSourceOption: 'PreInstalled' - # We also need to build the Java smoke test, for CodeQL compliance - # We don't need to build the other smoke tests, because they can be analyzed without being compiled, - # as they're interpreted languages. - # This could be a separate pipeline, but the task is so small that it's paired with the .NET code build - # for convenience. - - pwsh: | - # Verify Java 17 is installed and set environment - Write-Host "=== Checking Java Installation ===" - java -version - Write-Host "JAVA_HOME before: $env:JAVA_HOME" - - # Find Java 17 installation and set JAVA_HOME explicitly - $java17Path = "" - $possiblePaths = @( - "$env:AGENT_TOOLSDIRECTORY\Java_Temurin-Hotspot\17*\x64", - "$env:AGENT_TOOLSDIRECTORY\jdk\17*\x64", - "C:\Program Files\Java\jdk-17*", - "C:\hostedtoolcache\windows\Java_Temurin-Hotspot\17*\x64" - ) - - foreach ($path in $possiblePaths) { - $resolved = Get-ChildItem $path -ErrorAction SilentlyContinue | Select-Object -First 1 - if ($resolved -and (Test-Path "$($resolved.FullName)\bin\java.exe")) { - $java17Path = $resolved.FullName - break - } - } - - if (-not $java17Path) { - Write-Host "Falling back to current java location" - $javaExe = Get-Command java | Select-Object -ExpandProperty Source - $java17Path = Split-Path (Split-Path $javaExe -Parent) -Parent - } - - $env:JAVA_HOME = $java17Path - $env:PATH = "$java17Path\bin;$env:PATH" - - Write-Host "JAVA_HOME set to: $env:JAVA_HOME" - Write-Host "Java version check:" - & "$env:JAVA_HOME\bin\java.exe" -version - - # Set Gradle options to use the correct Java - $env:GRADLE_OPTS = "-Dorg.gradle.java.home='$env:JAVA_HOME'" - Write-Host "GRADLE_OPTS: $env:GRADLE_OPTS" - - # Build the Java project - cd ./test/SmokeTests/OOProcSmokeTests/durableJava/ - gradle build - ls - displayName: 'Build Java OOProc test (for CodeQL compliance)' \ No newline at end of file + # Build Java smoke test using official Gradle task + - task: Gradle@2 + displayName: 'Build Java OOProc test (for CodeQL compliance)' + inputs: + workingDirectory: 'test/SmokeTests/OOProcSmokeTests/durableJava' + gradleOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '17' + jdkArchitectureOption: 'x64' + publishJUnitResults: false + tasks: 'build' \ No newline at end of file From d9aedfdde12905863ff1fa861a89e4099df3728b Mon Sep 17 00:00:00 2001 From: "naiyuantian@microsoft.com" Date: Tue, 19 Aug 2025 17:52:48 -0700 Subject: [PATCH 12/12] Remove java smoke test --- eng/templates/build.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/eng/templates/build.yml b/eng/templates/build.yml index fdb4a094e..0fb9bbe91 100644 --- a/eng/templates/build.yml +++ b/eng/templates/build.yml @@ -131,27 +131,3 @@ jobs: Contents: '**' TargetFolder: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension/' - # We also need to build the Java smoke test, for CodeQL compliance - # We don't need to build the other smoke tests, because they can be analyzed without being compiled, - # as they're interpreted languages. - # This could be a separate pipeline, but the task is so small that it's paired with the .NET code build - # for convenience. - # Setup Java 17 for building the Java smoke test - - task: JavaToolInstaller@0 - displayName: 'Use Java 17' - inputs: - versionSpec: '17' - jdkArchitectureOption: 'x64' - jdkSourceOption: 'PreInstalled' - - # Build Java smoke test using official Gradle task - - task: Gradle@2 - displayName: 'Build Java OOProc test (for CodeQL compliance)' - inputs: - workingDirectory: 'test/SmokeTests/OOProcSmokeTests/durableJava' - gradleOptions: '-Xmx3072m' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '17' - jdkArchitectureOption: 'x64' - publishJUnitResults: false - tasks: 'build' \ No newline at end of file