Skip to content

Add timeout support for filtered orchestration purge #224

Description

@andystaples

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions