Skip to content

Commit f7b8ded

Browse files
authored
Unblock UseExisting conflict policy for Nexux WorkflowRunOperation (#2440)
1 parent 334e129 commit f7b8ded

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

temporal-sdk/src/main/java/io/temporal/internal/common/InternalUtils.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222

2323
import com.google.common.base.Defaults;
2424
import io.nexusrpc.Header;
25-
import io.nexusrpc.handler.HandlerException;
2625
import io.nexusrpc.handler.ServiceImplInstance;
2726
import io.temporal.api.common.v1.Callback;
2827
import io.temporal.api.enums.v1.TaskQueueKind;
29-
import io.temporal.api.enums.v1.WorkflowIdConflictPolicy;
3028
import io.temporal.api.taskqueue.v1.TaskQueue;
3129
import io.temporal.client.OnConflictOptions;
3230
import io.temporal.client.WorkflowOptions;
@@ -37,7 +35,6 @@
3735
import io.temporal.internal.client.NexusStartWorkflowRequest;
3836
import java.util.Arrays;
3937
import java.util.Map;
40-
import java.util.Objects;
4138
import java.util.TreeMap;
4239
import java.util.stream.Collectors;
4340
import org.slf4j.Logger;
@@ -155,16 +152,6 @@ public static WorkflowStub createNexusBoundStub(
155152
.setAttachCompletionCallbacks(true)
156153
.build());
157154

158-
// TODO(klassenq) temporarily blocking conflict policy USE_EXISTING.
159-
if (Objects.equals(
160-
WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING,
161-
options.getWorkflowIdConflictPolicy())) {
162-
throw new HandlerException(
163-
HandlerException.ErrorType.INTERNAL,
164-
new IllegalArgumentException(
165-
"Workflow ID conflict policy UseExisting is not supported for Nexus WorkflowRunOperation."),
166-
HandlerException.RetryBehavior.NON_RETRYABLE);
167-
}
168155
return stub.newInstance(nexusWorkflowOptions.build());
169156
}
170157

temporal-sdk/src/test/java/io/temporal/workflow/nexus/WorkflowHandleUseExistingOnConflictCancelTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import java.util.UUID;
3939
import org.junit.*;
4040

41-
@Ignore("Skipping until we can support USE_EXISTING")
4241
public class WorkflowHandleUseExistingOnConflictCancelTest {
4342
@Rule
4443
public SDKTestWorkflowRule testWorkflowRule =

temporal-sdk/src/test/java/io/temporal/workflow/nexus/WorkflowHandleUseExistingOnConflictTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import java.util.UUID;
3737
import org.junit.*;
3838

39-
@Ignore("Skipping until we can support USE_EXISTING")
4039
public class WorkflowHandleUseExistingOnConflictTest {
4140
@Rule
4241
public SDKTestWorkflowRule testWorkflowRule =

0 commit comments

Comments
 (0)