Skip to content

Commit 9378f9c

Browse files
authored
Merge branch 'main' into copilot/add-helplinkuri-to-diagnostics
2 parents cd07cd7 + 310c8e9 commit 9378f9c

File tree

51 files changed

+2795
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2795
-72
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Summary
2+
## What changed?
3+
-
4+
5+
## Why is this change needed?
6+
-
7+
8+
## Issues / work items
9+
- Resolves #
10+
- Related #
11+
12+
---
13+
14+
# Project checklist
15+
- [ ] Release notes are not required for the next release
16+
- [ ] Otherwise: Notes added to `release_notes.md`
17+
- [ ] Backport is not required
18+
- [ ] Otherwise: Backport tracked by issue/PR #issue_or_pr
19+
- [ ] All required tests have been added/updated (unit tests, E2E tests)
20+
- [ ] Breaking change?
21+
- [ ] If yes:
22+
- Impact:
23+
- Migration guidance:
24+
---
25+
26+
# AI-assisted code disclosure (required)
27+
## Was an AI tool used? (select one)
28+
- [ ] No
29+
- [ ] Yes, AI helped write parts of this PR (e.g., GitHub Copilot)
30+
- [ ] Yes, an AI agent generated most of this PR
31+
32+
If AI was used:
33+
- Tool(s):
34+
- AI-assisted areas/files:
35+
- What you changed after AI output:
36+
37+
AI verification (required if AI was used):
38+
- [ ] I understand the code and can explain it
39+
- [ ] I verified referenced APIs/types exist and are correct
40+
- [ ] I reviewed edge cases/failure paths (timeouts, retries, cancellation, exceptions)
41+
- [ ] I reviewed concurrency/async behavior
42+
- [ ] I checked for unintended breaking or behavior changes
43+
44+
---
45+
46+
# Testing
47+
## Automated tests
48+
- Result: Passed / Failed (link logs if failed)
49+
50+
## Manual validation (only if runtime/behavior changed)
51+
- Environment (OS, .NET version, components):
52+
- Steps + observed results:
53+
1.
54+
2.
55+
3.
56+
- Evidence (optional):
57+
58+
---
59+
60+
# Notes for reviewers
61+
- N/A
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Azure Functions Smoke Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'feature/**'
8+
paths-ignore: [ '**.md' ]
9+
pull_request:
10+
paths-ignore: [ '**.md' ]
11+
workflow_dispatch:
12+
13+
jobs:
14+
smoke-tests:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v3
23+
with:
24+
dotnet-version: '8.0.x'
25+
26+
- name: Setup .NET from global.json
27+
uses: actions/setup-dotnet@v3
28+
with:
29+
global-json-file: global.json
30+
31+
- name: Restore dependencies
32+
run: dotnet restore test/AzureFunctionsSmokeTests/AzureFunctionsSmokeTests.csproj
33+
34+
- name: Run smoke tests
35+
run: |
36+
cd test/AzureFunctionsSmokeTests
37+
pwsh -File run-smoketests.ps1
38+
39+
- name: Upload smoke test logs on failure
40+
if: failure()
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: smoke-test-logs
44+
path: test/AzureFunctionsSmokeTests/logs/
45+
if-no-files-found: ignore

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
# Changelog
1+
# Changelog
2+
3+
## v1.18.1
4+
- Support dedup status when starting orchestration by wangbill ([#542](https://github.com/microsoft/durabletask-dotnet/pull/542))
5+
- Add 404 exception handling in blobpayloadstore.downloadasync by Copilot ([#534](https://github.com/microsoft/durabletask-dotnet/pull/534))
6+
- Bump analyzers version to 0.2.0 by Copilot ([#552](https://github.com/microsoft/durabletask-dotnet/pull/552))
7+
- Add integration tests for exception type handling by Copilot ([#544](https://github.com/microsoft/durabletask-dotnet/pull/544))
8+
- Add roslyn analyzer to detect calls to non-existent functions (name mismatch) by Copilot ([#530](https://github.com/microsoft/durabletask-dotnet/pull/530))
9+
- Remove preview suffix by Copilot ([#541](https://github.com/microsoft/durabletask-dotnet/pull/541))
10+
- Add xml documentation with see cref links to generated code for better ide navigation by Copilot ([#535](https://github.com/microsoft/durabletask-dotnet/pull/535))
11+
- Add entity source generation support for durable functions by Copilot ([#533](https://github.com/microsoft/durabletask-dotnet/pull/533))
212

313
## v1.18.0
414
- Add taskentity support to durabletasksourcegenerator by Copilot ([#517](https://github.com/microsoft/durabletask-dotnet/pull/517))

Directory.Packages.props

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<PackageVersion Include="Azure.Identity" Version="1.17.1" />
2626
<PackageVersion Include="Azure.Storage.Blobs" Version="12.26.0" />
2727
<PackageVersion Include="Microsoft.Azure.Functions.Worker" Version="2.51.0" />
28+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.3.0" />
29+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.7" />
2830
</ItemGroup>
2931

3032
<!-- DurableTask Packages -->
@@ -40,7 +42,7 @@
4042
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
4143
</ItemGroup>
4244
<ItemGroup>
43-
<PackageVersion Include="Google.Protobuf" Version="3.33.1" />
45+
<PackageVersion Include="Google.Protobuf" Version="3.33.2" />
4446
<PackageVersion Include="Grpc.Core" Version="2.46.6" />
4547
<PackageVersion Include="Grpc.Net.Client" Version="2.67.0" />
4648
<PackageVersion Include="Grpc.Tools" Version="2.76.0" />
@@ -63,12 +65,12 @@
6365
<!-- Testing Frameworks & Analysis Packages -->
6466
<ItemGroup>
6567
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
66-
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
68+
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
6769
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.34.1"/>
6870
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
6971
<PackageVersion Include="Moq" Version="4.20.72" />
7072
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
71-
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
73+
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
7274
<PackageVersion Include="xunit" Version="2.9.2" />
7375
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
7476
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2"/>

Microsoft.DurableTask.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScheduledTasks.Tests", "tes
9393
EndProject
9494
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LargePayloadConsoleApp", "samples\LargePayloadConsoleApp\LargePayloadConsoleApp.csproj", "{6EB9D002-62C8-D6C1-62A8-14C54CA6DBBC}"
9595
EndProject
96+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExceptionPropertiesSample", "samples\ExceptionPropertiesSample\ExceptionPropertiesSample.csproj", "{7C3ECBCE-BEFB-4982-842E-B654BB6B6285}"
97+
EndProject
9698
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureBlobPayloads", "src\Extensions\AzureBlobPayloads\AzureBlobPayloads.csproj", "{FE1DA748-D6DB-E168-BC42-6DBBCEAF229C}"
9799
EndProject
98100
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InProcessTestHost", "src\InProcessTestHost\InProcessTestHost.csproj", "{5F1E1662-D2D1-4325-BFE3-6AE23A8A4D7E}"
@@ -261,6 +263,10 @@ Global
261263
{6EB9D002-62C8-D6C1-62A8-14C54CA6DBBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
262264
{6EB9D002-62C8-D6C1-62A8-14C54CA6DBBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
263265
{6EB9D002-62C8-D6C1-62A8-14C54CA6DBBC}.Release|Any CPU.Build.0 = Release|Any CPU
266+
{7C3ECBCE-BEFB-4982-842E-B654BB6B6285}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
267+
{7C3ECBCE-BEFB-4982-842E-B654BB6B6285}.Debug|Any CPU.Build.0 = Debug|Any CPU
268+
{7C3ECBCE-BEFB-4982-842E-B654BB6B6285}.Release|Any CPU.ActiveCfg = Release|Any CPU
269+
{7C3ECBCE-BEFB-4982-842E-B654BB6B6285}.Release|Any CPU.Build.0 = Release|Any CPU
264270
{FE1DA748-D6DB-E168-BC42-6DBBCEAF229C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
265271
{FE1DA748-D6DB-E168-BC42-6DBBCEAF229C}.Debug|Any CPU.Build.0 = Debug|Any CPU
266272
{FE1DA748-D6DB-E168-BC42-6DBBCEAF229C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -313,6 +319,7 @@ Global
313319
{5F1E1662-D2D1-4325-BFE3-6AE23A8A4D7E} = {8AFC9781-F6F1-4696-BB4A-9ED7CA9D612B}
314320
{B894780C-338F-475E-8E84-56AFA8197A06} = {E5637F81-2FB9-4CD7-900D-455363B142A7}
315321
{6EB9D002-62C8-D6C1-62A8-14C54CA6DBBC} = {EFF7632B-821E-4CFC-B4A0-ED4B24296B17}
322+
{7C3ECBCE-BEFB-4982-842E-B654BB6B6285} = {EFF7632B-821E-4CFC-B4A0-ED4B24296B17}
316323
{FE1DA748-D6DB-E168-BC42-6DBBCEAF229C} = {8AFC9781-F6F1-4696-BB4A-9ED7CA9D612B}
317324
EndGlobalSection
318325
GlobalSection(ExtensibilityGlobals) = postSolution

eng/targets/Release.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</PropertyGroup>
1818

1919
<PropertyGroup>
20-
<VersionPrefix>1.18.0</VersionPrefix>
20+
<VersionPrefix>1.18.1</VersionPrefix>
2121
<VersionSuffix></VersionSuffix>
2222
</PropertyGroup>
2323

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "10.0.100",
3+
"version": "10.0.101",
44
"rollForward": "latestFeature"
55
},
66
"msbuild-sdks": {

samples/AzureFunctionsApp/AzureFunctionsApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23+
<PackageReference Include="Google.Protobuf" VersionOverride="3.33.2" />
2324
<None Update="host.json">
2425
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2526
</None>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
using Microsoft.DurableTask.Worker;
5+
6+
namespace ExceptionPropertiesSample;
7+
8+
/// <summary>
9+
/// Custom exception properties provider that extracts additional properties from exceptions
10+
/// to include in TaskFailureDetails for better diagnostics and error handling.
11+
/// </summary>
12+
public class CustomExceptionPropertiesProvider : IExceptionPropertiesProvider
13+
{
14+
/// <summary>
15+
/// Extracts custom properties from exceptions to enrich failure details.
16+
/// </summary>
17+
/// <param name="exception">The exception to extract properties from.</param>
18+
/// <returns>
19+
/// A dictionary of custom properties to include in the FailureDetails,
20+
/// or null if no properties should be added for this exception type.
21+
/// </returns>
22+
public IDictionary<string, object?>? GetExceptionProperties(Exception exception)
23+
{
24+
return exception switch
25+
{
26+
BusinessValidationException businessEx => new Dictionary<string, object?>
27+
{
28+
["ErrorCode"] = businessEx.ErrorCode,
29+
["StatusCode"] = businessEx.StatusCode,
30+
["Metadata"] = businessEx.Metadata,
31+
},
32+
ArgumentOutOfRangeException argEx => new Dictionary<string, object?>
33+
{
34+
["ParameterName"] = argEx.ParamName ?? string.Empty,
35+
["ActualValue"] = argEx.ActualValue?.ToString() ?? string.Empty,
36+
},
37+
ArgumentNullException argNullEx => new Dictionary<string, object?>
38+
{
39+
["ParameterName"] = argNullEx.ParamName ?? string.Empty,
40+
},
41+
_ => null // No custom properties for other exception types
42+
};
43+
}
44+
}
45+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
namespace ExceptionPropertiesSample;
5+
6+
/// <summary>
7+
/// Custom business exception that includes additional properties for better error diagnostics.
8+
/// </summary>
9+
public class BusinessValidationException : Exception
10+
{
11+
public BusinessValidationException(
12+
string message,
13+
string? errorCode = null,
14+
int? statusCode = null,
15+
Dictionary<string, object?>? metadata = null)
16+
: base(message)
17+
{
18+
this.ErrorCode = errorCode;
19+
this.StatusCode = statusCode;
20+
this.Metadata = metadata ?? new Dictionary<string, object?>();
21+
}
22+
23+
/// <summary>
24+
/// Gets the error code associated with this validation failure.
25+
/// </summary>
26+
public string? ErrorCode { get; }
27+
28+
/// <summary>
29+
/// Gets the HTTP status code that should be returned for this error.
30+
/// </summary>
31+
public int? StatusCode { get; }
32+
33+
/// <summary>
34+
/// Gets additional metadata about the validation failure.
35+
/// </summary>
36+
public Dictionary<string, object?> Metadata { get; }
37+
}
38+

0 commit comments

Comments
 (0)