Skip to content

Fix orchestration discriminator in single-instance purge requests - #279

Open
andystaples wants to merge 2 commits into
mainfrom
andystaples-correct-orchestration-purge-discriminato
Open

andystaples wants to merge 2 commits into
mainfrom
andystaples-correct-orchestration-purge-discriminato

Conversation

@andystaples

@andystaples andystaples commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #276.

Set isOrchestration=True on PurgeInstancesRequest in both synchronous and asynchronous purge_orchestration() methods. The previously omitted Boolean defaulted to false, the entity discriminator. This corrects the wire request; it does not imply every backend previously rejected the request or failed deletion. Equivalent correction: microsoft/durabletask-go#165.

Add request-level regressions covering both core clients, both Azure Managed clients, both Azure Functions clients, and the Functions purge_instance_history() compatibility alias. Cover default recursion and explicit true/false overrides, deletion-count and three-state completion conversion, and unchanged RPC exception propagation. Polling, timeouts, completion semantics, and worker behavior are unchanged.

Update all three applicable Unreleased changelogs.

Set isOrchestration on sync and async purge requests, cover inherited provider APIs and compatibility alias, and document the correction.

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:54

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 targeted protocol correction is correct, comprehensively tested, and appropriately documented.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes #276 by correctly identifying single-instance purge requests as orchestration purges.

Changes:

  • Sets isOrchestration=True for synchronous and asynchronous clients.
  • Adds regression coverage across core and provider clients.
  • Documents the fix in all applicable changelogs.
File Description
durabletask/​client.py Corrects both purge request paths.
tests/​durabletask/​test_purge.py Tests requests, results, recursion, and errors.
tests/​durabletask-azuremanaged/​test_dts_purge.py Verifies inherited Azure Managed behavior.
tests/​azure-functions-durable/​test_client_compat.py Verifies Functions clients and compatibility alias.
CHANGELOG.md Documents the core fix.
durabletask-azuremanaged/​CHANGELOG.md Documents provider impact.
azure-functions-durable/​CHANGELOG.md Documents Functions provider impact.

💡 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. This corrects the orchestration discriminator in both client paths while preserving signatures, recursive defaults, result semantics, and RPC error propagation. Provider release coordination is documented, with no public API break or new Python-version requirement.

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.

Set isOrchestration on sync and async single-instance purge requests

3 participants