Skip to content

fix(client): retry WorkflowUpdateHandle::get_result poll#1150

Merged
chris-olszewski merged 2 commits into
masterfrom
olszewski/fix_gh_1149
Mar 13, 2026
Merged

fix(client): retry WorkflowUpdateHandle::get_result poll#1150
chris-olszewski merged 2 commits into
masterfrom
olszewski/fix_gh_1149

Conversation

@chris-olszewski

Copy link
Copy Markdown
Member

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_result would fail with "no outcome".

Checklist

  1. Closes [Bug] WorkflowUpdateHandle::get_result() fails when update takes longer than two minutes #1149

  2. How was this tested:
    Added failing test to verify that get_result succeeds even if first poll doesn't have a result.

  3. Any docs updates needed?
    N/A

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
@chris-olszewski chris-olszewski changed the title fix(client): retry update poll fix(client): retry WorkflowUpdateHandle::get_result poll Mar 12, 2026
@chris-olszewski chris-olszewski marked this pull request as ready for review March 12, 2026 23:33
@chris-olszewski chris-olszewski requested a review from a team as a code owner March 12, 2026 23:33

@Sushisource Sushisource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY!

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this particular one is ~20 seconds, but, that' doesn't really matter much for this fix.

@chris-olszewski chris-olszewski merged commit cf7fcec into master Mar 13, 2026
32 of 34 checks passed
@chris-olszewski chris-olszewski deleted the olszewski/fix_gh_1149 branch March 13, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] WorkflowUpdateHandle::get_result() fails when update takes longer than two minutes

2 participants