You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the default dedupe statuses behavior (#622)
* first commit?
* PR comments
* updating documentation
* added implementation to shim client too
* added tests for the shim client
* PR comments
* reverted the logic to not include a reuse policy in the case that dedupe statuses is null (never set by the client. this is different than explicitly making it an empty list)
* updating the tests accordingly
* PR comments
* addressing PR comments
* updated tests to check for new exception type
* slight comment update
* Adding an ArgumentException for invalid dedupe statuses (any running + terminated)
* added support to terminate existing running instances for restart
* addressing copilot comments
* addressing the PR comments and build warnings
* fixed the build errors
* missed a change in comment type in GrpcDurableTaskClient
* missed updating a comment in the tests
* returned the catching of the RpcException with status code cancelled, since even if the server no longer throws an exception like this gRPC can still throw this under the hood
---------
Co-authored-by: Sophia Tevosyan <stevosyan@microsoft.com>
#pragma warning disable CS0618// Type or member is obsolete - Canceled is intentionally included for compatibility
23
23
returnImmutableArray.Create(
24
24
P.OrchestrationStatus.Completed,
25
25
P.OrchestrationStatus.Failed,
26
-
P.OrchestrationStatus.Terminated,
27
-
P.OrchestrationStatus.Canceled);
26
+
P.OrchestrationStatus.Terminated,
27
+
P.OrchestrationStatus.Canceled,
28
+
P.OrchestrationStatus.Pending,
29
+
P.OrchestrationStatus.Running,
30
+
P.OrchestrationStatus.Suspended);
28
31
#pragma warning restore CS0618
29
32
}
30
33
@@ -33,59 +36,60 @@ public static class ProtoUtils
33
36
/// with replaceable statuses (statuses that CAN be replaced).
34
37
/// </summary>
35
38
/// <param name="dedupeStatuses">The orchestration statuses that should NOT be replaced. These are statuses for which an exception should be thrown if an orchestration already exists.</param>
36
-
/// <returns>An OrchestrationIdReusePolicy with replaceable statuses set, or null if all terminal statuses are dedupe statuses.</returns>
39
+
/// <returns>An OrchestrationIdReusePolicy with replaceable statuses set.</returns>
37
40
/// <remarks>
38
41
/// The policy uses "replaceableStatus" - these are statuses that CAN be replaced.
39
42
/// dedupeStatuses are statuses that should NOT be replaced.
40
-
/// So replaceableStatus = all terminal statuses MINUS dedupeStatuses.
43
+
/// So replaceableStatus = all statuses MINUS dedupeStatuses.
0 commit comments