Skip to content

Commit

Permalink
Set run id in update handle (#705)
Browse files Browse the repository at this point in the history
* Add assertion to existing test

* Set run ID in update handle
  • Loading branch information
dandavison authored Dec 19, 2024
1 parent c44a6d8 commit 999c8f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion temporalio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
2 changes: 2 additions & 0 deletions tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 999c8f8

Please sign in to comment.