diff --git a/.github/workflows/E2ETest.yml b/.github/workflows/E2ETest.yml
index 5591e8d2c..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 ]
+ 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 ]
+ 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 6cb68940e..67a0c59c6 100644
--- a/.github/workflows/codeQL.yml
+++ b/.github/workflows/codeQL.yml
@@ -6,9 +6,9 @@ name: "CodeQL"
on:
push:
- branches: [ "main", "*" ] # 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", "*"] # 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 f1fa0d6f2..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 ]
+ branches: [ main, dev, nytian/v3.1.0, nytian/sc-hotfix-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..301595bce 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:
@@ -8,7 +8,7 @@ on:
- 'src/**'
- 'test/SmokeTests/OOProcSmokeTests/durableJava/**'
pull_request:
- branches: [ main, dev ]
+ branches: [ main, dev, nytian/v3.1.0 , nytian/sc-hotfix-v3.1.0]
paths:
- 'src/**'
- 'test/SmokeTests/OOProcSmokeTests/durableJava/**'
@@ -18,15 +18,15 @@ 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
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
diff --git a/.github/workflows/smoketest-mssql-inproc-v4.yml b/.github/workflows/smoketest-mssql-inproc-v4.yml
index e2b25adab..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 ]
+ 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 c8d62c1d7..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 ]
+ 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 3078b8d10..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 ]
+ 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 70b7b5378..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 ]
+ 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 22afaf09d..3a4654d60 100644
--- a/.github/workflows/validate-build-analyzer.yml
+++ b/.github/workflows/validate-build-analyzer.yml
@@ -5,10 +5,13 @@ on:
branches:
- main
- dev
+ - nytian/v3.1.0
paths-ignore: [ '**.md' ]
pull_request:
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 935a33072..cbbbc4425 100644
--- a/.github/workflows/validate-build-e2e.yml
+++ b/.github/workflows/validate-build-e2e.yml
@@ -5,10 +5,13 @@ on:
branches:
- main
- dev
+ - nytian/v3.1.0
paths-ignore: [ '**.md' ]
pull_request:
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 de6cf0360..29612a95c 100644
--- a/.github/workflows/validate-build.yml
+++ b/.github/workflows/validate-build.yml
@@ -5,10 +5,13 @@ on:
branches:
- main
- dev
+ - nytian/v3.1.0
paths-ignore: [ '**.md' ]
pull_request:
branches:
- '*'
+ - nytian/v3.1.0
+ - nytian/sc-hotfix-v3.1.0
paths-ignore: [ '**.md' ]
env:
diff --git a/eng/templates/build.yml b/eng/templates/build.yml
index a14af38ad..0fb9bbe91 100644
--- a/eng/templates/build.yml
+++ b/eng/templates/build.yml
@@ -131,13 +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.
- - pwsh: |
- cd ./test/SmokeTests/OOProcSmokeTests/durableJava/
- gradle build
- ls
- displayName: 'Build Java OOProc test (for CodeQL compliance)'
\ No newline at end of file
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/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)
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
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'