From 89a5fef9f16b4c45ea2d9a2654d6ac98397d4106 Mon Sep 17 00:00:00 2001 From: Sophia Tevosyan Date: Thu, 10 Jul 2025 15:10:47 -0700 Subject: [PATCH 1/7] removed optional parameter for first TaskOptions constructor, now it is non-optional --- src/Abstractions/TaskOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Abstractions/TaskOptions.cs b/src/Abstractions/TaskOptions.cs index 8d4fbd63..136adf17 100644 --- a/src/Abstractions/TaskOptions.cs +++ b/src/Abstractions/TaskOptions.cs @@ -14,7 +14,7 @@ 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 = retry; } From 1d0dbcf1862926290dda01692205101207753fd7 Mon Sep 17 00:00:00 2001 From: Sophia Tevosyan Date: Thu, 10 Jul 2025 16:37:37 -0700 Subject: [PATCH 2/7] updating package version --- eng/targets/Release.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/targets/Release.props b/eng/targets/Release.props index 697fc3f7..bf40e2a2 100644 --- a/eng/targets/Release.props +++ b/eng/targets/Release.props @@ -17,7 +17,7 @@ - 1.11.0 + 1.12.0 From 2fce7157c0636dd0eab185b07e0e718779a9292d Mon Sep 17 00:00:00 2001 From: Sophia Tevosyan Date: Thu, 10 Jul 2025 17:06:57 -0700 Subject: [PATCH 3/7] added changelog updates --- CHANGELOG.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc961a0..e207a76a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,24 @@ ## (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)) +## v1.12.0 + +- Activity tag support by @YunchuWang in ([#426](https://github.com/microsoft/durabletask-dotnet/pull/426)) +- Adding Analyzer to build and release by ([#444](https://github.com/microsoft/durabletask-dotnet/pull/444)) +- Add ability to filter orchestrations at worker by ([#443](https://github.com/microsoft/durabletask-dotnet/pull/443)) + +## v1.11.0 + +- 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)) - 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 by ([#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 From 266749b61a92309124380e83a0d619c67158cfff Mon Sep 17 00:00:00 2001 From: Sophia Tevosyan Date: Thu, 10 Jul 2025 17:08:27 -0700 Subject: [PATCH 4/7] added updated reference to dt.core package 3.3.0 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9a87896a..8388030f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,7 +28,7 @@ - + From 582e3743dd6ef7b1d887d1a3a0d33ffddc64031f Mon Sep 17 00:00:00 2001 From: Sophia Tevosyan Date: Thu, 10 Jul 2025 17:22:01 -0700 Subject: [PATCH 5/7] fixing changelog --- CHANGELOG.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e207a76a..6d72ce03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,18 +4,19 @@ ## v1.12.0 -- Activity tag support by @YunchuWang in ([#426](https://github.com/microsoft/durabletask-dotnet/pull/426)) -- Adding Analyzer to build and release by ([#444](https://github.com/microsoft/durabletask-dotnet/pull/444)) -- Add ability to filter orchestrations at worker by ([#443](https://github.com/microsoft/durabletask-dotnet/pull/443)) +- 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 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)) +- 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 by ([#423](https://github.com/microsoft/durabletask-dotnet/pull/423)) +- 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)) From 0c5d210c9890700df4305ed420eee606724a7d97 Mon Sep 17 00:00:00 2001 From: Sophia Tevosyan Date: Fri, 11 Jul 2025 13:10:13 -0700 Subject: [PATCH 6/7] adding tests that are not complete for now --- test/Abstractions.Tests/TaskOptionsTests.cs | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 test/Abstractions.Tests/TaskOptionsTests.cs diff --git a/test/Abstractions.Tests/TaskOptionsTests.cs b/test/Abstractions.Tests/TaskOptionsTests.cs new file mode 100644 index 00000000..7864191b --- /dev/null +++ b/test/Abstractions.Tests/TaskOptionsTests.cs @@ -0,0 +1,42 @@ +// 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_Overriden() + { + string instanceId = Guid.NewGuid().ToString(); + SubOrchestrationOptions subOptions = new(new TaskOptions(), instanceId); + 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(); + } +} From 33d1a13fa3defa8c3956a7346a9ce130e94037bb Mon Sep 17 00:00:00 2001 From: Sophia Tevosyan Date: Fri, 11 Jul 2025 14:42:16 -0700 Subject: [PATCH 7/7] added tests --- src/Abstractions/TaskOptions.cs | 2 +- test/Abstractions.Tests/TaskOptionsTests.cs | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Abstractions/TaskOptions.cs b/src/Abstractions/TaskOptions.cs index 136adf17..f8e527fe 100644 --- a/src/Abstractions/TaskOptions.cs +++ b/src/Abstractions/TaskOptions.cs @@ -15,8 +15,8 @@ public record TaskOptions /// /// The task retry options. public TaskOptions(TaskRetryOptions? retry) + : this(retry, null) { - this.Retry = retry; } /// diff --git a/test/Abstractions.Tests/TaskOptionsTests.cs b/test/Abstractions.Tests/TaskOptionsTests.cs index 7864191b..fe4a101e 100644 --- a/test/Abstractions.Tests/TaskOptionsTests.cs +++ b/test/Abstractions.Tests/TaskOptionsTests.cs @@ -25,18 +25,17 @@ public void Empty_Ctors_Okay() } [Fact] - public void SubOrchestrationOptions_InstanceId_Overriden() + public void SubOrchestrationOptions_InstanceId_Correct() { string instanceId = Guid.NewGuid().ToString(); SubOrchestrationOptions subOptions = new(new TaskOptions(), instanceId); - subOptions.Retry.Should().BeNull(); - subOptions.Tags.Should().BeNull(); - subOptions.InstanceId.Should().BeNull(); + instanceId.Equals(subOptions.InstanceId).Should().BeTrue(); - StartOrchestrationOptions startOptions = new(); - startOptions.Version.Should().BeNull(); - startOptions.InstanceId.Should().BeNull(); - startOptions.StartAt.Should().BeNull(); - startOptions.Tags.Should().BeEmpty(); + 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(); } }