From 67be8f0f05301667521e9ca4c59e3223163e7272 Mon Sep 17 00:00:00 2001 From: Richard McDaniel Date: Tue, 13 Oct 2026 22:55:26 -0500 Subject: [PATCH] Prepare Python 2.5.14 backfill documentation fix (#150) Co-authored-by: Durable Workflow --- CHANGELOG.md | 6 ++++++ docs/reference/client.md | 24 ++++++++++++++++++++++++ pyproject.toml | 6 +++--- src/durable_workflow/client.py | 4 +++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fde81b..09070a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.5.14] - 2026-10-14 + +### Fixed +- Document schedule backfill as a start-inclusive, end-exclusive window. + An occurrence at the end belongs to the next adjacent window. + ## [2.5.13] - 2026-10-13 ### Fixed diff --git a/docs/reference/client.md b/docs/reference/client.md index 54a53cb..2bb0420 100644 --- a/docs/reference/client.md +++ b/docs/reference/client.md @@ -6,4 +6,28 @@ Workflow authors should normally yield `ctx.call_nexus_service(...)`; the worker uses this client method to execute once and record the durable result or typed service failure. +## Backfill windows + +`Client.backfill_schedule()` includes the start time and excludes the end time: +`[start_time, end_time)`. An occurrence exactly at `end_time` is excluded. + +Adjacent windows share a boundary without overlapping it: + +```python +await client.backfill_schedule( + "daily-orders", + start_time="2026-03-08T07:00:00Z", + end_time="2026-03-08T07:30:00Z", +) +await client.backfill_schedule( + "daily-orders", + start_time="2026-03-08T07:30:00Z", + end_time="2026-03-08T08:00:00Z", +) +``` + +An occurrence at `07:30:00Z` belongs to the second window. Repeating a window +does not start another workflow for an occurrence already admitted by that +schedule. + ::: durable_workflow.client diff --git a/pyproject.toml b/pyproject.toml index 0158f0c..bf96aaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "durable-workflow" -version = "2.5.13" +version = "2.5.14" description = "Python client and worker SDK for Durable Workflow Cloud and self-hosted Server" readme = "README.md" requires-python = ">=3.10" @@ -71,8 +71,8 @@ durable-workflow-replay-conformance = "durable_workflow.replay_conformance:main" durable-workflow-workflow-updates-conformance = "durable_workflow.workflow_updates_conformance:main" [tool.durable-workflow] -product-train = "2.5.13" -registry-version = "2.5.13" +product-train = "2.5.14" +registry-version = "2.5.14" supported-server-versions = "2.5.16" worker-protocol-version = "1.20" control-plane-version = "2" diff --git a/src/durable_workflow/client.py b/src/durable_workflow/client.py index 126cd3f..a59834b 100644 --- a/src/durable_workflow/client.py +++ b/src/durable_workflow/client.py @@ -4825,8 +4825,10 @@ async def backfill_schedule( end_time: str, overlap_policy: str | None = None, ) -> ScheduleBackfillResult: - """Fire a schedule for every would-have-been moment in ``[start_time, end_time]``. + """Fire a schedule for every would-have-been moment in ``[start_time, end_time)``. + The start is inclusive and the end is exclusive. An occurrence equal + to ``end_time`` is excluded and belongs to the next adjacent window. Times are ISO-8601 strings. Useful to replay a period the schedule was paused or to seed historical runs. The returned :class:`ScheduleBackfillResult` reports how many fires were attempted