Skip to content

Preserve global arrival order of continue-as-new carryover events - #278

Merged
Bernd Verst (berndverst) merged 1 commit into
mainfrom
andystaples-preserve-carryover-event-arrival-order
Oct 1, 2026
Merged

Bernd Verst (berndverst) merged 1 commit into
mainfrom
andystaples-preserve-carryover-event-arrival-order

Conversation

@andystaples

@andystaples andystaples commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #277.

  • Preserve global arrival order across event names when continue_as_new(..., save_events=True) carries unconsumed buffered events into the next execution.
  • Retain the existing casefolded per-name FIFO queues, adding an arrival index to each raw payload and sorting only the remaining entries for carryover. The arrival counter is independent of orchestration task IDs.
  • Preserve raw JSON/custom converter behavior, absent/null payloads, replay, explicit cancellation, and save_events=False. Events already delivered to live waits are not carried over.
  • Update all three applicable Unreleased changelogs. Provider behavior depends on the corresponding core SDK fix; package versions and dependency minimums remain unchanged for release coordination.

Track buffered event arrival indexes independently of task IDs and retain per-name FIFO consumption and raw payloads. Add replay, selective consumption, cancellation, converter, and save-events regression coverage.

Fixes #277

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 17:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused fix has regression coverage for its key boundaries, and the review identified no unresolved issues.

Review effort: Balanced
Findings: None

What changed in this PR

This PR fixes the core SDK’s continue-as-new carryover order, which also affects the Azure Managed and Azure Functions providers.

Changes:

  • Record buffered events’ arrival order while retaining per-name FIFO queues and raw payloads.
  • Carry over only unconsumed events in arrival order, with regression coverage for replay and event-consumption cases.
  • Document the user-visible fix in all three applicable changelogs.
File Description
tests/​durabletask/​test_orchestration_executor.py Tests carryover order and payload behavior.
durabletask/​worker.py Tracks arrival order and sorts buffered events for carryover.
durabletask-azuremanaged/​CHANGELOG.md Documents the provider-visible fix.
CHANGELOG.md Documents the core SDK fix.
azure-functions-durable/​CHANGELOG.md Documents the provider-visible fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@berndverst Bernd Verst (berndverst) 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.

Looks good. The arrival counter preserves replay action IDs, per-name FIFO consumption, and raw payloads. The cross-name carryover ordering correction is documented across the affected packages. No public API break or new Python-version requirement.

@berndverst
Bernd Verst (berndverst) merged commit f40ad56 into main Oct 1, 2026
25 checks passed
@berndverst
Bernd Verst (berndverst) deleted the andystaples-preserve-carryover-event-arrival-order branch October 1, 2026 22:42
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.

Preserve global arrival order of external events carried across continue-as-new

3 participants