Skip to content

Commit 8c5834b

Browse files
committed
Do not send run IDs with UpdateWithStart requests
[fixup after rebase]
1 parent 10f3026 commit 8c5834b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

temporalio/client.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6018,14 +6018,21 @@ async def _build_update_workflow_execution_request(
60186018
input: Union[StartWorkflowUpdateInput, UpdateWithStartUpdateWorkflowInput],
60196019
workflow_id: str,
60206020
) -> temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest:
6021-
run_id = input.run_id if isinstance(input, StartWorkflowUpdateInput) else None
6021+
run_id, first_execution_run_id = (
6022+
(
6023+
input.run_id,
6024+
input.first_execution_run_id,
6025+
)
6026+
if isinstance(input, StartWorkflowUpdateInput)
6027+
else (None, None)
6028+
)
60226029
req = temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest(
60236030
namespace=self._client.namespace,
60246031
workflow_execution=temporalio.api.common.v1.WorkflowExecution(
60256032
workflow_id=workflow_id,
60266033
run_id=run_id or "",
60276034
),
6028-
first_execution_run_id=input.first_execution_run_id or "",
6035+
first_execution_run_id=first_execution_run_id or "",
60296036
request=temporalio.api.update.v1.Request(
60306037
meta=temporalio.api.update.v1.Meta(
60316038
update_id=input.update_id or str(uuid.uuid4()),

0 commit comments

Comments
 (0)