diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc961a04..6d72ce036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,25 @@ ## (Unreleased) -- Add New Property Properties to TaskOrchestrationContext by @nytian in [#415](https://github.com/microsoft/durabletask-dotnet/pull/415) -- Add automatic retry on gateway timeout in `GrpcDurableTaskClient.WaitForInstanceCompletionAsync` in [#412](https://github.com/microsoft/durabletask-dotnet/pull/412)) -- Add specific logging for NotFound error on worker connection by @halspang in ([#413](https://github.com/microsoft/durabletask-dotnet/pull/413)) -- Add user agent header to gRPC called in ([#417](https://github.com/microsoft/durabletask-dotnet/pull/417)) +## v1.12.0 + +- Activity tag support ([#426](https://github.com/microsoft/durabletask-dotnet/pull/426)) +- Adding Analyzer to build and release ([#444](https://github.com/microsoft/durabletask-dotnet/pull/444)) +- Add ability to filter orchestrations at worker ([#443](https://github.com/microsoft/durabletask-dotnet/pull/443)) +- Removing breaking change for TaskOptions ([#446](https://github.com/microsoft/durabletask-dotnet/pull/446)) + +## v1.11.0 + +- Add New Property Properties to TaskOrchestrationContext ([#415](https://github.com/microsoft/durabletask-dotnet/pull/415)) +- Add automatic retry on gateway timeout in `GrpcDurableTaskClient.WaitForInstanceCompletionAsync` ([#412](https://github.com/microsoft/durabletask-dotnet/pull/412)) +- Add specific logging for NotFound error on worker connection ([#413](https://github.com/microsoft/durabletask-dotnet/pull/413)) +- Add user agent header to gRPC called ([#417](https://github.com/microsoft/durabletask-dotnet/pull/417)) - Enrich User-Agent Header in gRPC Metadata to indicate Client or Worker as caller ([#421](https://github.com/microsoft/durabletask-dotnet/pull/421)) +- Change DTS user agent metadata to avoid overlap with gRPC user agent ([#423](https://github.com/microsoft/durabletask-dotnet/pull/423)) - Add extension methods for registering entities by type ([#427](https://github.com/microsoft/durabletask-dotnet/pull/427)) - Add TaskVersion and utilize it for version overrides when starting orchestrations ([#416](https://github.com/microsoft/durabletask-dotnet/pull/416)) +- Update sub-orchestration default versioning ([#437](https://github.com/microsoft/durabletask-dotnet/pull/437)) +- Distributed Tracing for Entities (Isolated) ([#404](https://github.com/microsoft/durabletask-dotnet/pull/404)) ## v1.10.0 diff --git a/Directory.Packages.props b/Directory.Packages.props index d71af8b63..179d8fd74 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,7 +28,7 @@ - + diff --git a/eng/targets/Release.props b/eng/targets/Release.props index 697fc3f70..bf40e2a27 100644 --- a/eng/targets/Release.props +++ b/eng/targets/Release.props @@ -17,7 +17,7 @@ - 1.11.0 + 1.12.0 diff --git a/src/Abstractions/TaskOptions.cs b/src/Abstractions/TaskOptions.cs index 8d4fbd63a..f8e527fe1 100644 --- a/src/Abstractions/TaskOptions.cs +++ b/src/Abstractions/TaskOptions.cs @@ -14,9 +14,9 @@ public record TaskOptions /// Initializes a new instance of the class. /// /// The task retry options. - public TaskOptions(TaskRetryOptions? retry = null) + public TaskOptions(TaskRetryOptions? retry) + : this(retry, null) { - this.Retry = retry; } /// diff --git a/test/Abstractions.Tests/TaskOptionsTests.cs b/test/Abstractions.Tests/TaskOptionsTests.cs new file mode 100644 index 000000000..fe4a101e0 --- /dev/null +++ b/test/Abstractions.Tests/TaskOptionsTests.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.DurableTask.Tests; + +public class TaskOptionsTests +{ + [Fact] + public void Empty_Ctors_Okay() + { + TaskOptions options = new(); + options.Retry.Should().BeNull(); + options.Tags.Should().BeNull(); + + SubOrchestrationOptions subOptions = new(); + subOptions.Retry.Should().BeNull(); + subOptions.Tags.Should().BeNull(); + subOptions.InstanceId.Should().BeNull(); + + StartOrchestrationOptions startOptions = new(); + startOptions.Version.Should().BeNull(); + startOptions.InstanceId.Should().BeNull(); + startOptions.StartAt.Should().BeNull(); + startOptions.Tags.Should().BeEmpty(); + } + + [Fact] + public void SubOrchestrationOptions_InstanceId_Correct() + { + string instanceId = Guid.NewGuid().ToString(); + SubOrchestrationOptions subOptions = new(new TaskOptions(), instanceId); + instanceId.Equals(subOptions.InstanceId).Should().BeTrue(); + + string subInstanceId = Guid.NewGuid().ToString(); + subOptions = new(new SubOrchestrationOptions(instanceId: subInstanceId)); + subInstanceId.Equals(subOptions.InstanceId).Should().BeTrue(); + + subOptions = new(new SubOrchestrationOptions(instanceId: subInstanceId), instanceId); + instanceId.Equals(subOptions.InstanceId).Should().BeTrue(); + } +}