Summary
The protobuf SuspendRequest and ResumeRequest messages both include an optional reason field, and the .NET Durable Task client exposes that field through its suspend and resume APIs. Python currently sends only instanceId, so callers cannot record why an orchestration was suspended or resumed.
Current behavior
Both the synchronous and asynchronous Python clients construct these requests without reason:
pb.SuspendRequest(instanceId=instance_id)
pb.ResumeRequest(instanceId=instance_id)
The public methods likewise accept only instance_id.
Expected parity
Add an optional keyword-only reason: str | None = None parameter to the sync and async suspend/resume methods and serialize it into the corresponding protobuf request.
.NET reference:
Acceptance criteria
- Sync and async suspend methods accept an optional reason.
- Sync and async resume methods accept an optional reason.
- Reasons are serialized into
SuspendRequest.reason and ResumeRequest.reason.
- Omitting a reason preserves existing behavior.
- Unit tests cover populated and omitted reasons.
Summary
The protobuf
SuspendRequestandResumeRequestmessages both include an optionalreasonfield, and the .NET Durable Task client exposes that field through its suspend and resume APIs. Python currently sends onlyinstanceId, so callers cannot record why an orchestration was suspended or resumed.Current behavior
Both the synchronous and asynchronous Python clients construct these requests without
reason:The public methods likewise accept only
instance_id.Expected parity
Add an optional keyword-only
reason: str | None = Noneparameter to the sync and async suspend/resume methods and serialize it into the corresponding protobuf request..NET reference:
DurableTaskClient.SuspendInstanceAsyncandResumeInstanceAsyncGrpcDurableTaskClientrequest serializationAcceptance criteria
SuspendRequest.reasonandResumeRequest.reason.