Skip to content

Commit 6329ae4

Browse files
committed
Don't include workflow_id in uws update interceptor input
1 parent b60c0f1 commit 6329ae4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

temporalio/client.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,6 @@ async def _start_update_with_start(
976976
update_name = str(update)
977977

978978
update_input = UpdateWithStartUpdateWorkflowInput(
979-
id=start_workflow_operation._start_workflow_input.id,
980979
update_id=id,
981980
update=update_name,
982981
args=temporalio.common._arg_or_args(arg, args),
@@ -5082,7 +5081,6 @@ class StartWorkflowUpdateInput:
50825081
class UpdateWithStartUpdateWorkflowInput:
50835082
"""Update input for :py:meth:`OutboundInterceptor.start_workflow_update_with_start`."""
50845083

5085-
id: str
50865084
update_id: Optional[str]
50875085
update: str
50885086
args: Sequence[Any]
@@ -5779,7 +5777,8 @@ async def terminate_workflow(self, input: TerminateWorkflowInput) -> None:
57795777
async def start_workflow_update(
57805778
self, input: StartWorkflowUpdateInput
57815779
) -> WorkflowUpdateHandle[Any]:
5782-
req = await self._build_update_workflow_execution_request(input)
5780+
workflow_id = input.id
5781+
req = await self._build_update_workflow_execution_request(input, workflow_id)
57835782
# Repeatedly try to invoke UpdateWorkflowExecution until the update reaches user-provided
57845783
# wait stage or is at least ACCEPTED (as of the time of this writing,
57855784
# the user cannot specify sooner than ACCEPTED)
@@ -5813,7 +5812,7 @@ async def start_workflow_update(
58135812
handle: WorkflowUpdateHandle[Any] = WorkflowUpdateHandle(
58145813
client=self._client,
58155814
id=req.request.meta.update_id,
5816-
workflow_id=input.id,
5815+
workflow_id=workflow_id,
58175816
# TODO: Why don't we use the run ID from the update response here?
58185817
workflow_run_id=input.run_id,
58195818
result_type=input.ret_type,
@@ -5827,12 +5826,13 @@ async def start_workflow_update(
58275826
async def _build_update_workflow_execution_request(
58285827
self,
58295828
input: Union[StartWorkflowUpdateInput, UpdateWithStartUpdateWorkflowInput],
5829+
workflow_id: str,
58305830
) -> temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest:
58315831
run_id = input.run_id if isinstance(input, StartWorkflowUpdateInput) else None
58325832
req = temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest(
58335833
namespace=self._client.namespace,
58345834
workflow_execution=temporalio.api.common.v1.WorkflowExecution(
5835-
workflow_id=input.id,
5835+
workflow_id=workflow_id,
58365836
run_id=run_id or "",
58375837
),
58385838
request=temporalio.api.update.v1.Request(
@@ -5872,7 +5872,9 @@ async def start_workflow_update_with_start(
58725872
start_input
58735873
)
58745874
)
5875-
update_req = await self._build_update_workflow_execution_request(update_input)
5875+
update_req = await self._build_update_workflow_execution_request(
5876+
update_input, workflow_id=start_input.id
5877+
)
58765878
multiop_req = temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest(
58775879
namespace=self._client.namespace,
58785880
operations=[

0 commit comments

Comments
 (0)