Summary
The protobuf PurgeInstanceFilter includes a timeout duration, and the .NET Durable Task client exposes it through PurgeInstancesFilter.Timeout. Python's filtered purge API does not expose or serialize this field.
Motivation
A timeout allows large purge operations to stop after a caller-defined interval and return partial progress through the existing PurgeInstancesResult.is_complete result. Without it, Python callers cannot bound the duration of a filtered purge even when the backend supports that protocol behavior.
Expected parity
Add an optional timeout to the sync and async filtered purge APIs and serialize it into PurgeInstanceFilter.timeout. The API should validate that a supplied timeout is positive, matching .NET behavior.
.NET references:
Acceptance criteria
- Sync and async filtered purge methods accept an optional timeout.
- The timeout is serialized as a protobuf duration.
- Non-positive values are rejected with a clear argument error.
- Omitting the timeout preserves existing behavior.
- Partial completion remains observable through
PurgeInstancesResult.is_complete.
- Unit tests cover populated, omitted, and invalid timeout values.
Summary
The protobuf
PurgeInstanceFilterincludes atimeoutduration, and the .NET Durable Task client exposes it throughPurgeInstancesFilter.Timeout. Python's filtered purge API does not expose or serialize this field.Motivation
A timeout allows large purge operations to stop after a caller-defined interval and return partial progress through the existing
PurgeInstancesResult.is_completeresult. Without it, Python callers cannot bound the duration of a filtered purge even when the backend supports that protocol behavior.Expected parity
Add an optional timeout to the sync and async filtered purge APIs and serialize it into
PurgeInstanceFilter.timeout. The API should validate that a supplied timeout is positive, matching .NET behavior..NET references:
PurgeInstancesFilterGrpcDurableTaskClient.PurgeAllInstancesAsyncAcceptance criteria
PurgeInstancesResult.is_complete.