File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2606,6 +2606,8 @@ def __init__(
26062606 name , result_type_from_run_fn = (
26072607 temporalio .workflow ._Definition .get_name_and_result_type (workflow )
26082608 )
2609+ if id_conflict_policy == temporalio .common .WorkflowIDConflictPolicy .UNSPECIFIED :
2610+ raise ValueError ("WorkflowIDConflictPolicy is required" )
26092611
26102612 self ._start_workflow_input = UpdateWithStartStartWorkflowInput (
26112613 workflow = name ,
Original file line number Diff line number Diff line change @@ -496,3 +496,22 @@ async def test_update_with_start_client_outbound_interceptor(
496496
497497 wf_handle = await start_op .workflow_handle ()
498498 assert await wf_handle .result () == "intercepted-workflow-arg"
499+
500+
501+ def test_with_start_workflow_operation_requires_conflict_policy ():
502+ with pytest .raises (ValueError ):
503+ WithStartWorkflowOperation (
504+ WorkflowForUpdateWithStartTest .run ,
505+ 0 ,
506+ id = "wid-1" ,
507+ id_conflict_policy = WorkflowIDConflictPolicy .UNSPECIFIED ,
508+ task_queue = "test-queue" ,
509+ )
510+
511+ with pytest .raises (TypeError ):
512+ WithStartWorkflowOperation ( # type: ignore
513+ WorkflowForUpdateWithStartTest .run ,
514+ 0 ,
515+ id = "wid-1" ,
516+ task_queue = "test-queue" ,
517+ )
You can’t perform that action at this time.
0 commit comments