Skip to content

Add suspend and resume reasons - #250

Merged
andystaples merged 6 commits into
mainfrom
andystaples-suspend-resume-reasons
Sep 1, 2026
Merged

Add suspend and resume reasons#250
andystaples merged 6 commits into
mainfrom
andystaples-suspend-resume-reasons

Conversation

@andystaples

Copy link
Copy Markdown
Contributor

Summary

  • add optional keyword-only reason arguments to sync and async suspend/resume APIs
  • serialize lifecycle reasons into the corresponding protobuf requests
  • forward Durable Functions v1 compatibility reasons instead of discarding them

Closes #223

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 941fc052-b910-42af-93fa-4f00138813ab
Copilot AI lite review requested due to automatic review settings August 10, 2026 16:21

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.

Pull request overview

This PR adds suspend/resume “reason” parity with the .NET client across the core Durable Task Python clients and the Azure Functions Durable compatibility client, ensuring the optional reason is serialized and preserved.

Changes:

  • Added keyword-only optional reason parameters to sync/async suspend_orchestration and resume_orchestration APIs and serialized them into the protobuf requests.
  • Updated Azure Functions Durable v1-compat suspend() / resume() deprecated aliases to forward the provided reason.
  • Added unit tests and changelog entries covering both populated and omitted reasons.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
durabletask/client.py Adds optional keyword-only reason to suspend/resume APIs and serializes it into SuspendRequest/ResumeRequest.
tests/durabletask/test_client.py Adds tests validating reason serialization and omission behavior for sync and async clients.
tests/azure-functions-durable/test_client_compat.py Updates compat tests to ensure deprecated v1 methods forward reason to the new APIs.
azure-functions-durable/azure/durable_functions/client.py Forwards v1 deprecated reason argument to durabletask suspend/resume APIs instead of discarding it.
CHANGELOG.md Documents the new optional suspend/resume reason parameters in the core SDK changelog under Unreleased.
azure-functions-durable/CHANGELOG.md Documents the v1 compat fix to forward suspend/resume reasons under Unreleased.
Suppressed comments (1)

tests/durabletask/test_client.py:1279

  • Test name grammar: "include" should be "includes" (third-person singular) for readability/consistency.
async def test_async_suspend_resume_orchestration_include_optional_reason():

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

Comment thread tests/durabletask/test_client.py Outdated
andystaples and others added 2 commits August 10, 2026 10:29
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 941fc052-b910-42af-93fa-4f00138813ab

@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.

Please address the inline compatibility, in-memory backend, and package changelog gaps before merging.

Comment thread azure-functions-durable/azure/durable_functions/client.py
Comment thread durabletask/client.py
Comment thread CHANGELOG.md
andystaples and others added 3 commits August 13, 2026 10:42
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 941fc052-b910-42af-93fa-4f00138813ab
Updated instructions for creating a dedicated release PR to ensure proper versioning and compatibility.

@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.

Second-pass review of 54bd23c completed. The prior dependency-release, in-memory history, and Azure Managed changelog findings are resolved, and no new actionable issues were found. Targeted sync/async and compatibility tests, affected-file Flake8, strict source Pyright, and packaged-type Pyright checks pass.

@andystaples
andystaples merged commit 9a660a1 into main Sep 1, 2026
25 checks passed
@andystaples
andystaples deleted the andystaples-suspend-resume-reasons branch September 1, 2026 16:13
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.

Add suspend and resume reason parity with .NET

3 participants