Skip to content

Commit

Permalink
Merge pull request #2724 from Azure/dev
Browse files Browse the repository at this point in the history
Merge dev to main for v2.13.1 release
  • Loading branch information
nytian authored Jan 12, 2024
2 parents 3dd943b + f4ec21a commit 3784988
Show file tree
Hide file tree
Showing 21 changed files with 792 additions and 32 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/smoketest-mssql-inproc-v4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Smoke Test - .NET in-proc w/ MSSQL on Functions V4

on:
push:
branches: [ main, dev ]
paths:
- 'src/**'
- 'test/SmokeTests/BackendSmokeTests/MSSQL/**'
pull_request:
branches: [ main, dev ]
paths:
- 'src/**'
- 'test/SmokeTests/BackendSmokeTests/MSSQL/**'

jobs:
build:

runs-on: ubuntu-latest
env:
SA_PASSWORD: NotASecret!12

steps:
- uses: actions/checkout@v4

- name: Run V4 .NET in-proc w/ MSSQL Smoke Test
run: test/SmokeTests/e2e-test.ps1 -DockerfilePath test/SmokeTests/BackendSmokeTests/MSSQL/Dockerfile -HttpStartPath api/DurableFunctionsHttpStart -ContainerName MSSQLApp -SetupSQLServer
shell: pwsh
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Durable Functions supports a subset of languages supported by Azure Functions:
| C# | Generally available - [get started](https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-create-first-csharp) | [Azure/azure-functions-durable-extension](https://github.com/Azure/azure-functions-durable-extension) |
| JavaScript | Generally available - [get started](https://docs.microsoft.com/azure/azure-functions/durable/quickstart-js-vscode) | [Azure/azure-functions-durable-js](https://github.com/Azure/azure-functions-durable-js) |
| Python | Generally available - [get started](https://docs.microsoft.com/azure/azure-functions/durable/quickstart-python-vscode) | [Azure/azure-functions-durable-python](https://github.com/Azure/azure-functions-durable-python) |
| PowerShell | Generally available - [get started](https://docs.microsoft.com/en-us/azure/azure-functions/durable/quickstart-powershell-vscode) | [Azure/azure-functions-powershell-worker](https://github.com/Azure/azure-functions-powershell-worker) |
| Java | Public Preview | [Microsoft/durabletask-java](https://github.com/microsoft/durabletask-java) |
| PowerShell | Generally available - [get started](https://docs.microsoft.com/azure/azure-functions/durable/quickstart-powershell-vscode) | [Azure/azure-functions-powershell-worker](https://github.com/Azure/azure-functions-powershell-worker) |
| Java | Generally available - [get started](https://learn.microsoft.com/azure/azure-functions/durable/quickstart-java?tabs=bash&pivots=create-option-vscode) | [Microsoft/durabletask-java](https://github.com/microsoft/durabletask-java) |

Each language has its own language-specific SDK and programming model. Regardless of which language you use, the extension in this repo must be installed to enable the Durable Functions triggers.

Expand Down
180 changes: 180 additions & 0 deletions azure-pipelines-release-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# This is a copy of azure-pipelines-release.yml except that it triggers nightly.
# We want a copy so we can distinguish between nightly artifacts (which may trigger nightly perf tests) and artifacts built on-demand

schedules:
- cron: '0 8 * * *'
displayName: Daily midnight (PDT) build
branches:
include:
- dev

trigger: none
pr: none

pool:
name: '1ES-Hosted-DurableTaskFramework'
demands:
- ImageOverride -equals MMS2022TLS

variables:

- name: PackageSuffix
value: 'ci.$(Build.BuildNumber)' # the "ci" section is to denote this payload is automatically released by the CI
steps:

# Configure all the .NET SDK versions we need
- task: UseDotNet@2
displayName: 'Use the .NET Core 2.1 SDK (required for build signing)'
inputs:
packageType: 'sdk'
version: '2.1.x'

- task: UseDotNet@2
displayName: 'Use the .NET Core 3.1 SDK'
inputs:
packageType: 'sdk'
version: '3.1.x'

- task: UseDotNet@2
displayName: 'Use the .NET 6 SDK'
inputs:
packageType: 'sdk'
version: '6.0.x'

# Use NuGet
- task: NuGetToolInstaller@1
displayName: 'Use NuGet '

# dotnet restore
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '**/**/*.csproj'
feedsToUse: config
nugetConfigPath: 'nuget.config'

# Build durable-extension
- task: VSBuild@1
displayName: 'Build Durable Extension'
inputs:
solution: '**/WebJobs.Extensions.DurableTask.sln'
vsVersion: "16.0"
configuration: Release

# Authenticode sign all the DLLs with the Microsoft certificate.
- task: EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'src/WebJobs.Extensions.DurableTask/bin/Release'
Pattern: '*DurableTask.dll'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'

# SBOM generator task for additional supply chain protection
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'Manifest Generator '
inputs:
BuildDropPath: '$(System.DefaultWorkingDirectory)'

# dotnet pack
# Packaging needs to be a separate step from build.
# This will automatically pick up the signed DLLs.
- task: DotNetCoreCLI@2
displayName: 'dotnet pack WebJobs.Extensions.DurableTask.csproj'
inputs:
command: pack
packagesToPack: 'src/**/WebJobs.Extensions.DurableTask.csproj'
configuration: Release
packDirectory: 'azure-functions-durable-extension'
nobuild: true

# Remove redundant symbol package(s)
- script: |
echo *** Searching for .symbols.nupkg files to delete...
dir /s /b *.symbols.nupkg
echo *** Deleting .symbols.nupkg files...
del /S /Q *.symbols.nupkg
echo *** Listing remaining packages
dir /s /b *.nupkg
displayName: 'Remove Redundant Symbols Package(s)'
continueOnError: true

# Digitally sign all the nuget packages with the Microsoft certificate.
# This appears to be an in-place signing job, which is convenient.
- task: EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: '$(System.DefaultWorkingDirectory)'
Pattern: '*.nupkg'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetSign",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'

# zip .NET in-proc perf tests
- task: DotNetCoreCLI@2
displayName: 'Zip .NET in-proc perf tests'
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(System.DefaultWorkingDirectory)/test/PerfTests/DFPerfTests/**/*.csproj'
arguments: '-o $(System.DefaultWorkingDirectory)/test/PerfTests/DFPerfTests/Output'
zipAfterPublish: true
modifyOutputPath: true

# Move zip'ed .NET in-proc perf tests to the ADO publishing directory
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/test/PerfTests/DFPerfTests/Output/'
Contents: '**'
TargetFolder: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension/'

# Make the nuget packages available for download in the ADO portal UI
- publish: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension'
displayName: 'Publish nuget packages to Artifacts'
artifact: PackageOutput
29 changes: 29 additions & 0 deletions azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ pool:
demands:
- ImageOverride -equals MMS2022TLS

variables:

- name: PackageSuffix
# if source branch is not `dev` then we're generating a release based on a feature branch
# In that case, we populate the environment variable "PackageSuffix" accordingly
${{ if ne(variables['Build.SourceBranchName'], 'dev') }}:
value: 'pr.$(Build.BuildNumber)' # the "pr" section is to denote this code is a candidate to be PR'ed
${{ else }}:
value: ''


steps:

# Configure all the .NET SDK versions we need
Expand Down Expand Up @@ -142,6 +153,24 @@ steps:
MaxConcurrency: '50'
MaxRetryAttempts: '5'

# zip .NET in-proc perf tests
- task: DotNetCoreCLI@2
displayName: 'Zip .NET in-proc perf tests'
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(System.DefaultWorkingDirectory)/test/PerfTests/DFPerfTests/**/*.csproj'
arguments: '-o $(System.DefaultWorkingDirectory)/test/PerfTests/DFPerfTests/Output'
zipAfterPublish: true
modifyOutputPath: true

# Move zip'ed .NET in-proc perf tests to the ADO publishing directory
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/test/PerfTests/DFPerfTests/Output/'
Contents: '**'
TargetFolder: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension/'

# Make the nuget packages available for download in the ADO portal UI
- publish: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension'
displayName: 'Publish nuget packages to Artifacts'
Expand Down
10 changes: 6 additions & 4 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Release Notes

## Microsoft.Azure.Functions.Worker.Extensions.DurableTask <version>
## Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.1.1

### New Features

- Add `CreateCheckStatusResponseAsync` APIs. (https://github.com/Azure/azure-functions-durable-extension/pull/2722)

### Bug Fixes

- Fix issue with isolated entities: custom deserialization was not working because IServices was not passed along (https://github.com/Azure/azure-functions-durable-extension/pull/2686)
- Fix issue with `string` activity input having extra quotes (https://github.com/Azure/azure-functions-durable-extension/pull/2708)

### Breaking Changes

### Dependency Updates
Expand All @@ -16,9 +21,6 @@

### Bug Fixes

- Fix issue where json token input (not a json object) was unwrapped before sending to an out-of-proc worker. This could then lead to deserialization issues as the wrapping quotes were missing. (Applies to dotnet-isolated and java only)
- Fix failed orchestration/entities not showing up as function invocation failures. (Applies to dotnet-isolated and java only)

### Breaking Changes

### Dependency Updates
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<RootNamespace>Microsoft.Azure.WebJobs.Extensions.DurableTask</RootNamespace>
<MajorVersion>2</MajorVersion>
<MinorVersion>13</MinorVersion>
<PatchVersion>0</PatchVersion>
<Version>$(MajorVersion).$(MinorVersion).$(PatchVersion)</Version>
<PatchVersion>1</PatchVersion>
<VersionSuffix>$(PackageSuffix)</VersionSuffix>
<FileVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion)</FileVersion>
<AssemblyVersion>$(MajorVersion).0.0.0</AssemblyVersion>
<Company>Microsoft Corporation</Company>
Expand All @@ -21,6 +21,14 @@
<NoWarn>NU5125;SA0001</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="$(VersionSuffix) == ''">
<Version>$(MajorVersion).$(MinorVersion).$(PatchVersion)</Version>
</PropertyGroup>
<PropertyGroup Condition="$(VersionSuffix) != ''">
<Version>$(MajorVersion).$(MinorVersion).$(PatchVersion)-$(VersionSuffix)</Version>
</PropertyGroup>


<!-- NuGet Publishing Metadata -->
<PropertyGroup>
<Title>Azure Functions Durable Task Extension</Title>
Expand Down Expand Up @@ -105,7 +113,7 @@

<!-- Common dependencies across all targets -->
<ItemGroup>
<PackageReference Include="Microsoft.Azure.DurableTask.Core" Version="2.16.0" />
<PackageReference Include="Microsoft.Azure.DurableTask.Core" Version="2.16.1" />
<PackageReference Include="Microsoft.Azure.DurableTask.AzureStorage" Version="1.17.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask.Analyzers" Version="0.5.*" />
<!-- Build-time dependencies -->
Expand Down
41 changes: 41 additions & 0 deletions src/Worker.Extensions.DurableTask/ActivityInputConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using System.Threading.Tasks;
using Microsoft.Azure.Functions.Worker.Converters;
using Microsoft.DurableTask.Worker;
using Microsoft.Extensions.Options;

namespace Microsoft.Azure.Functions.Worker.Extensions.DurableTask;

internal class ActivityInputConverter : IInputConverter
{
private readonly DurableTaskWorkerOptions options;

public ActivityInputConverter(IOptions<DurableTaskWorkerOptions> options)
{
this.options = options?.Value ?? throw new ArgumentNullException(nameof(options));
}

public ValueTask<ConversionResult> ConvertAsync(ConverterContext context)
{
if (context is null)
{
throw new ArgumentNullException(nameof(context));
}

if (context.Source is null)
{
return new(ConversionResult.Success(null));
}

if (context.Source is not string source)
{
throw new InvalidOperationException($"Expected converter source to be a string, received {context.Source?.GetType()}.");
}

object? value = this.options.DataConverter.Deserialize(source, context.TargetType);
return new(ConversionResult.Success(value));
}
}
4 changes: 4 additions & 0 deletions src/Worker.Extensions.DurableTask/ActivityTriggerAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

using System;
using System.Diagnostics;
using Microsoft.Azure.Functions.Worker.Converters;
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;
using Microsoft.Azure.Functions.Worker.Extensions.DurableTask;

namespace Microsoft.Azure.Functions.Worker;

Expand All @@ -12,6 +14,8 @@ namespace Microsoft.Azure.Functions.Worker;
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[DebuggerDisplay("{Activity}")]
[InputConverter(typeof(ActivityInputConverter))]
[ConverterFallbackBehavior(ConverterFallbackBehavior.Disallow)]
public sealed class ActivityTriggerAttribute : TriggerBindingAttribute
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Worker.Extensions.DurableTask/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
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", "2.13.0")]
[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.DurableTask", "2.13.1")]
Loading

0 comments on commit 3784988

Please sign in to comment.