Skip to content

Test sending of paginated workflow task completions - #3178

Open
jmaeagle99 wants to merge 1 commit into
fix-wft-pagination-retry-optionsfrom
wft-pagination-tests
Open

jmaeagle99 wants to merge 1 commit into
fix-wft-pagination-retry-optionsfrom
wft-pagination-tests

Conversation

@jmaeagle99

Copy link
Copy Markdown
Contributor

What changed?

Added WorkflowWorkerCompletionPaginationTest, which runs one workflow task through a real WorkflowWorker with a mocked service and checks every RespondWorkflowTaskCompleted request:

  • Intermediate pages are sent in order, all sharing the task token, before the final page. The final page carries the messages and no commands.
  • When the namespace doesn't support pagination, the completion is sent as one request.
  • Buffer loss on the final page, or on an intermediate page, resends every page from page 0.
  • Other errors (NOT_FOUND for a stale token) are not resent.
  • Worker shutdown ends the buffer-loss resend loop.
  • Each attempt sends a lost-buffer page exactly once, so the gRPC retryer never retries it on its
    own.

The harness waits until the task's slot is released before shutting the worker down, because shutdown ends the resend loop early.

Why?

The existing tests covered only WorkflowTaskCompletionPaginator.paginate(). The send and resend logic in WorkflowWorker had no unit coverage, which is how the bug fixed in #3177 shipped. The integration test enabled by that PR covers only the success path.

Checklist

  1. How this was tested: Each test was checked against a deliberately broken send loop, and each one failed.

  2. Any docs updates needed? No, test only.

@jmaeagle99
jmaeagle99 added this pull request to stack #3179 October 29, 2026 17:45
@jmaeagle99 jmaeagle99 added the skip-changelog PR changes do not require changelog updates label Oct 29, 2026
@jmaeagle99
jmaeagle99 requested a review from a team as a code owner October 29, 2026 17:45
Cover the paginated send path in WorkflowWorker, which previously had
no unit tests: intermediate pages are sent in order before the final
page, a completion is sent whole when the namespace does not support
pagination, buffer loss on any page resends every page from the
first, other errors and worker shutdown end the resend loop, and the
gRPC retryer never retries a lost buffer on its own.
@jmaeagle99
jmaeagle99 force-pushed the wft-pagination-tests branch from 80f71e0 to 120d9a4 Compare October 30, 2026 22:11

This branch has not been deployed

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

Labels

skip-changelog PR changes do not require changelog updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants