From 999c8f8d3d1ddb322990e9645563be69547e1f80 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 19 Dec 2024 13:06:01 -0500 Subject: [PATCH] Set run id in update handle (#705) * Add assertion to existing test * Set run ID in update handle --- temporalio/client.py | 2 +- tests/worker/test_workflow.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/temporalio/client.py b/temporalio/client.py index 461ba51c..4b6948fc 100644 --- a/temporalio/client.py +++ b/temporalio/client.py @@ -5412,7 +5412,7 @@ async def start_workflow_update( client=self._client, id=req.request.meta.update_id, workflow_id=input.id, - workflow_run_id=input.run_id, + workflow_run_id=resp.update_ref.workflow_execution.run_id, result_type=input.ret_type, ) if resp.HasField("outcome"): diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index 01b9b6ba..1499d33c 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -4590,6 +4590,8 @@ async def test_workflow_update_separate_handle( wait_for_stage=WorkflowUpdateStage.ACCEPTED, ) + assert update_handle_1.workflow_run_id == handle.first_execution_run_id + # Create another handle and have them both wait for update complete update_handle_2 = client.get_workflow_handle( handle.id, run_id=handle.result_run_id