Keep Workflow Streams publishing after transient errors - #1811
Conversation
Signed-off-by: 1fanwang <1fannnw@gmail.com>
|
Two findings from my review:
Validation on the PR head: the focused regression passed, and the complete Workflow Streams test file passed ( |
Signed-off-by: 1fanwang <1fannnw@gmail.com>
|
Done in 7213ce2. Retry scope now matches SDK Core, codec and oversized-message failures propagate, and the changelog is updated. |
After one transient signal error, a long-lived Workflow Streams publisher stopped sending later items. Delivery resumed only when callers flushed explicitly or exited the client context.
The flusher now retries service RPC statuses that SDK Core classifies as retryable, so buffered items resume delivery on the next interval without caller action. Payload conversion failures, non-retryable RPC statuses, oversized-message errors, and an expired retry window still propagate. The pending batch remains ordered ahead of newly buffered items.
Testing
uv run pytest tests/contrib/workflow_streams/test_workflow_streams.py -q \ -k 'background_flusher_retries_failed_signal or background_flusher_propagates_payload_codec_error or background_flusher_propagates_message_too_large' uv run pytest tests/contrib/workflow_streams/test_workflow_streams.py -qRaw logs