fix(client): retry WorkflowUpdateHandle::get_result poll#1150
Merged
chris-olszewski merged 2 commits intomasterfrom Mar 13, 2026
Merged
fix(client): retry WorkflowUpdateHandle::get_result poll#1150chris-olszewski merged 2 commits intomasterfrom
WorkflowUpdateHandle::get_result poll#1150chris-olszewski merged 2 commits intomasterfrom
Conversation
WorkflowUpdateHandle::get_result() fails with "Update poll returned no outcome" when the update takes longer than the server's internal long-poll timeout (~60s). The server returns a response with outcome: None when its long-poll expires, but get_result makes only a single poll_workflow_execution_update call and gives up. This test uses a fake gRPC server to simulate the long-poll timeout scenario: UpdateWorkflowExecution returns no outcome, the first PollWorkflowExecutionUpdate also returns no outcome, and only the second poll returns a successful result. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> test squash
The server's internal long-poll for PollWorkflowExecutionUpdate expires after ~60s, returning a response with outcome: None. Previously, get_result() made a single poll call and failed with "Update poll returned no outcome" if that happened. Wrap the poll in a loop that retries when the server returns no outcome, matching the behavior of other SDKs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> fix squash
WorkflowUpdateHandle::get_result poll Sushisource approved these changes Mar 13, 2026
| workflow_execution: Some(ProtoWorkflowExecution { | ||
| workflow_id: self.workflow_id.clone(), | ||
| run_id: self.run_id.clone().unwrap_or_default(), | ||
| // The server's internal long-poll timeout (~60s) may expire before the update |
Member
There was a problem hiding this comment.
I believe this particular one is ~20 seconds, but, that' doesn't really matter much for this fix.
This was referenced Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Add a loop around the poll in
WorkflowUpdateHandle::get_result()Why?
If an update took longer than the server's long poll timeout,
get_resultwould fail with "no outcome".Checklist
Closes [Bug] WorkflowUpdateHandle::get_result() fails when update takes longer than two minutes #1149
How was this tested:
Added failing test to verify that
get_resultsucceeds even if first poll doesn't have a result.Any docs updates needed?
N/A