Skip to content

fix single-instance orchestration purge requests - #165

Merged
Tomer Rosenthal (torosent) merged 1 commit into
mainfrom
torosent-single-instance-purge
Sep 29, 2026
Merged

Tomer Rosenthal (torosent) merged 1 commit into
mainfrom
torosent-single-instance-purge

Conversation

@torosent

@torosent Tomer Rosenthal (torosent) commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

The problem

PurgeOrchestrationState sent a single-instance purge request without setting IsOrchestration=true. The protocol uses this flag to distinguish orchestrations from entities, so the request carried the wrong default discriminator.

The pinned DTS emulator accepted the old request and deleted the orchestration in our test. The reproduced defect is the missing wire field, not proof that every deployed service rejects the request. The old request was not tested against live DTS.

The fix

  • Explicitly identify single-instance requests as orchestration purges.
  • Add request-level regression coverage and a focused service test that checks actual deletion while an unrelated owned control survives.

What this means for purging

Recursion options and error behavior stay the same. Default purges remain nonrecursive, and WithRecursivePurge still controls child deletion. Purge completion handling is unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@torosent
Tomer Rosenthal (torosent) marked this pull request as ready for review September 29, 2026 16:11
Copilot AI balanced review requested due to automatic review settings September 29, 2026 16:11

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 protocol fix is correct and covered by both request-level and end-to-end regression tests.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes single-instance orchestration purges by setting the required protocol discriminator.

Changes:

  • Sets IsOrchestration on single-instance purge requests.
  • Adds request-level and DTS emulator regression tests.
  • Verifies existing recursive and error behavior.
File Description
client/​client_grpc.go Sets the orchestration purge discriminator.
client/​client_grpc_management_test.go Tests wire fields and error handling.
tests/​durabletaskscheduler/​dts_emulator_test.go Verifies targeted deletion against DTS.

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

@torosent
Tomer Rosenthal (torosent) merged commit dedd7f6 into main Sep 29, 2026
9 checks passed
@torosent
Tomer Rosenthal (torosent) deleted the torosent-single-instance-purge branch September 29, 2026 21:47
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.

3 participants