Skip to content

Use server-blocking WaitForInstnace* RPCs instead of client polling#1843

Merged
WhitWaldo merged 2 commits into
masterfrom
fix/workflow-wait-server-blocking
Jun 5, 2026
Merged

Use server-blocking WaitForInstnace* RPCs instead of client polling#1843
WhitWaldo merged 2 commits into
masterfrom
fix/workflow-wait-server-blocking

Conversation

@WhitWaldo

@WhitWaldo WhitWaldo commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Description

Continuation of the work at #1839

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1838

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

paulstadler-mesh and others added 2 commits June 5, 2026 05:32
…lient polling

WaitForWorkflowStartAsync and WaitForWorkflowCompletionAsync polled GetInstance
on a fixed 500ms/1s cadence. The sidecar already exposes server-blocking
WaitForInstanceStart / WaitForInstanceCompletion RPCs that return the moment the
instance reaches the target state, and the go-sdk (via durabletask-go) already
uses them. This switches both methods to the blocking RPCs, wrapped in an
exponential-backoff retry that re-issues on transient interruptions
(DeadlineExceeded / Unavailable) and propagates cancellation, mirroring
durabletask-go's client. Calls continue to flow through CreateCallOptions so the
dapr-api-token is honored.

Removes the now-dead client-poll tests and adds coverage for the blocking RPC
path, transient-error retry, non-transient propagation, and cancellation.

Fixes #1838

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Paul Stadler <paul.stadler@meshconnect.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.46%. Comparing base (7dda8b3) to head (813cf24).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1843   +/-   ##
=======================================
  Coverage   63.46%   63.46%           
=======================================
  Files         312      312           
  Lines        9279     9279           
  Branches     1101     1101           
=======================================
  Hits         5889     5889           
  Misses       3130     3130           
  Partials      260      260           
Flag Coverage Δ
net10.0 63.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WaitForWorkflowCompletionAsync / WaitForWorkflowStartAsync client-poll instead of using the server-blocking WaitForInstance* RPCs (go-sdk does)

2 participants