From acfb617028319f1f5a5dd3a569a4ae8968d265d9 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:38:19 +0000 Subject: [PATCH 1/2] Prepare Python SDK 2.19.1 release Release the fix that keeps the replay clock closed to code run by cyclic garbage collection (#343, #344). Retarget the installed retry-cap qualification cell to the 2.19.1 candidate. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 4 +++- pyproject.toml | 6 +++--- scripts/ci/activity-retry-cap.md | 2 +- scripts/ci/activity_acceptance_release.py | 2 +- tests/fixtures/published-retry-cap.json | 2 +- tests/test_activity_retry_cap_cell.py | 2 +- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8debb7e..617a79d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: id: retry-candidate env: GH_TOKEN: ${{ github.token }} - run: python .github/scripts/promote_release.py resolve --version 2.19.0 + run: python .github/scripts/promote_release.py resolve --version 2.19.1 - name: Download the approved candidate handoff if: inputs.retry_cap_artifact_source == 'candidate' uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 @@ -110,7 +110,7 @@ jobs: archive: false - name: Verify candidate archive and distribution bytes if: inputs.retry_cap_artifact_source == 'candidate' - run: python .github/scripts/promote_release.py extract --version 2.19.0 + run: python .github/scripts/promote_release.py extract --version 2.19.1 - name: Bootstrap patched pip trust uses: durable-workflow/.github/.github/actions/bootstrap-patched-pip@75587fc33ff40c34f32ef777293dad56bb6f48c7 # clean-trust with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eb48fb..f922540 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.19.1] - 2026-11-18 + ### Fixed -- Code run by Python's cyclic garbage collector can no longer read the business replay clock. When a discarded replay (for example an outcome that was never closed and is only reachable from a reference cycle) is collected, CPython finalizes the objects in that cycle in no specified order. If the discarded workflow generator was finalized before the replay lifetime that owns it, its `finally` block ran outside discard handling and `ctx.replay_now()` on a still-active parent workflow returned the parent's time instead of raising `ReplayClockUnavailable`. Whether this happened depended on when an automatic collection had last run, so it showed up as an intermittent test failure on Python 3.10 (#343). `replay_now()` now raises `ReplayClockUnavailable` for every read made while a collection runs on the reading thread. +- A discarded replay finalized during garbage collection could read the parent workflow's replay clock. Clock reads made while a collection runs now raise `ReplayClockUnavailable`, and recorded history is unchanged (#343, #344). In detail: code run by Python's cyclic garbage collector can no longer read the business replay clock. When a discarded replay (for example an outcome that was never closed and is only reachable from a reference cycle) is collected, CPython finalizes the objects in that cycle in no specified order. If the discarded workflow generator was finalized before the replay lifetime that owns it, its `finally` block ran outside discard handling and `ctx.replay_now()` on a still-active parent workflow returned the parent's time instead of raising `ReplayClockUnavailable`. Whether this happened depended on when an automatic collection had last run, so it showed up as an intermittent test failure on Python 3.10 (#343). `replay_now()` now raises `ReplayClockUnavailable` for every read made while a collection runs on the reading thread. - **Replay safety:** no command, history field or recorded value changes. Only reads made from finalizers or weakref callbacks during a collection are affected, and those never ran at a deterministic point in workflow code. ## [2.19.0] - 2026-11-18 diff --git a/pyproject.toml b/pyproject.toml index ba498de..c13b683 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "durable-workflow" -version = "2.19.0" +version = "2.19.1" description = "Python client and worker SDK for Durable Workflow Cloud and self-hosted Server" readme = "README.md" requires-python = ">=3.10" @@ -79,8 +79,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.19.0" -registry-version = "2.19.0" +product-train = "2.19.1" +registry-version = "2.19.1" supported-server-versions = "2.8.0" supported-server-release-baselines = { "2" = "2.8.0", "3" = "3.0.0" } worker-protocol-version = "1.20" diff --git a/scripts/ci/activity-retry-cap.md b/scripts/ci/activity-retry-cap.md index 89e6f9c..57f5548 100644 --- a/scripts/ci/activity-retry-cap.md +++ b/scripts/ci/activity-retry-cap.md @@ -1,4 +1,4 @@ -The retry-cap case qualifies the exact reviewed 2.19.0 wheel on the published +The retry-cap case qualifies the exact reviewed 2.19.1 wheel on the published Server/Python tuple in `tests/fixtures/published-retry-cap.json`. It uses the existing internal two-container profile, complete hash lock, captured no-site entry, before/after installed inventory and independent ID/label cleanup. diff --git a/scripts/ci/activity_acceptance_release.py b/scripts/ci/activity_acceptance_release.py index d441a23..868b4f7 100644 --- a/scripts/ci/activity_acceptance_release.py +++ b/scripts/ci/activity_acceptance_release.py @@ -8,7 +8,7 @@ from scripts.ci.activity_acceptance_entry import captured_file -VERSION = "2.19.0" +VERSION = "2.19.1" WHEEL = f"durable_workflow-{VERSION}-py3-none-any.whl" SDIST = f"durable_workflow-{VERSION}.tar.gz" diff --git a/tests/fixtures/published-retry-cap.json b/tests/fixtures/published-retry-cap.json index 93464f1..7589c13 100644 --- a/tests/fixtures/published-retry-cap.json +++ b/tests/fixtures/published-retry-cap.json @@ -1,6 +1,6 @@ { "schema": "sdk-python.published-activity-acceptance/v1", - "sdk_version": "2.19.0", + "sdk_version": "2.19.1", "server_image": "ghcr.io/durable-workflow/server@sha256:30ccaf2cea6810a92915a9eb389f1a63ea870818a74c9cc1a321379b07b2d25c", "server_source": "2d1244be4611e1bc4aa4f0d856c708bed17937b4", "server_amd64_manifest": "sha256:6cdcb909b1ca46d10410d7f659fcbd292dbf02be0c337d989b886153c0f3ee56", diff --git a/tests/test_activity_retry_cap_cell.py b/tests/test_activity_retry_cap_cell.py index dffd0c2..17bbb00 100644 --- a/tests/test_activity_retry_cap_cell.py +++ b/tests/test_activity_retry_cap_cell.py @@ -84,7 +84,7 @@ def approval(digest="a" * 64): def test_effective_lock_adds_only_the_approved_sdk_to_the_fixed_dependencies(): result, digest = release.lock(b"pytest==1 --hash=sha256:" + b"c" * 64 + b"\n", approval()) - assert result.endswith(f"durable-workflow==2.19.0 --hash=sha256:{digest}\n".encode()) + assert result.endswith(f"durable-workflow==2.19.1 --hash=sha256:{digest}\n".encode()) assert result.count(b"durable-workflow") == 1 From 83442c9cd160d78c0df9dc7cf89e7a319ad315e9 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:39:22 +0000 Subject: [PATCH 2/2] Approve the reviewed 2.19.1 release candidate Co-Authored-By: Claude Opus 5.5 --- .github/release-candidates/2.19.1.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/release-candidates/2.19.1.json diff --git a/.github/release-candidates/2.19.1.json b/.github/release-candidates/2.19.1.json new file mode 100644 index 0000000..bf7c469 --- /dev/null +++ b/.github/release-candidates/2.19.1.json @@ -0,0 +1,14 @@ +{ + "schema": "sdk-python.reviewed-release/v1", + "version": "2.19.1", + "source_commit": "acfb617028319f1f5a5dd3a569a4ae8968d265d9", + "source_tree": "2e4f4f37ecff871eee09f5e26f256dd170672fdd", + "run_id": 44360890938, + "run_attempt": 1, + "artifact_id": 14453614958, + "artifact_sha256": "528fc421c3966c0daa4c54440ff78666b4bcedcb1cac2ffdbd79413fb9d1a198", + "files": { + "durable_workflow-2.19.1-py3-none-any.whl": "aef3fe486d897ea48cb6c713a418f35c6eea6cd64a0950e98430efed76c8d211", + "durable_workflow-2.19.1.tar.gz": "e486193ee63814fd96f25eeb20e188a0b12118acd88ca6e7e3103f7919142ca2" + } +}