Skip to content

Commit

Permalink
Do not send run IDs with UpdateWithStart requests
Browse files Browse the repository at this point in the history
[fixup after rebase]
  • Loading branch information
dandavison committed Dec 19, 2024
1 parent 10f3026 commit 8c5834b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions temporalio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6018,14 +6018,21 @@ async def _build_update_workflow_execution_request(
input: Union[StartWorkflowUpdateInput, UpdateWithStartUpdateWorkflowInput],
workflow_id: str,
) -> temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest:
run_id = input.run_id if isinstance(input, StartWorkflowUpdateInput) else None
run_id, first_execution_run_id = (
(
input.run_id,
input.first_execution_run_id,
)
if isinstance(input, StartWorkflowUpdateInput)
else (None, None)
)
req = temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest(
namespace=self._client.namespace,
workflow_execution=temporalio.api.common.v1.WorkflowExecution(
workflow_id=workflow_id,
run_id=run_id or "",
),
first_execution_run_id=input.first_execution_run_id or "",
first_execution_run_id=first_execution_run_id or "",
request=temporalio.api.update.v1.Request(
meta=temporalio.api.update.v1.Meta(
update_id=input.update_id or str(uuid.uuid4()),
Expand Down

0 comments on commit 8c5834b

Please sign in to comment.