diff --git a/.github/release-candidates/2.21.0.json b/.github/release-candidates/2.21.0.json new file mode 100644 index 0000000..4e45009 --- /dev/null +++ b/.github/release-candidates/2.21.0.json @@ -0,0 +1,14 @@ +{ + "schema": "sdk-python.reviewed-release/v1", + "version": "2.21.0", + "source_commit": "1f750962968ff7a1dff2a854ee876192c5b3182e", + "source_tree": "39ed671b07b1d7034c117b793917a85858eb8d93", + "run_id": 44863688217, + "run_attempt": 1, + "artifact_id": 14690931819, + "artifact_sha256": "e8f4b8bf0cb669a7a15e53ded73002afe472d1ad0dd553a5d2e3d787fd862399", + "files": { + "durable_workflow-2.21.0-py3-none-any.whl": "13c4f22d3d9740291c0e33e2b9c3da7b6316b34775fc1222b556cc75d3a9b385", + "durable_workflow-2.21.0.tar.gz": "bcc1cfc67ddf25e65ae706e853d83282aed36b88cb8dc1e32495bfcbaaf37150" + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 475734d..41508e8 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.20.0 + run: python .github/scripts/promote_release.py resolve --version 2.21.0 - 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.20.0 + run: python .github/scripts/promote_release.py extract --version 2.21.0 - name: Bootstrap patched pip trust uses: durable-workflow/.github/.github/actions/bootstrap-patched-pip@75587fc33ff40c34f32ef777293dad56bb6f48c7 # clean-trust with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 33fd0a3..920ed13 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -175,13 +175,16 @@ jobs: REVIEWED_SDIST_SHA256: ${{ steps.candidate.outputs.sdist-sha256 }} run: | set -euo pipefail + shopt -s dotglob nullglob + files=(dist/*) + test "${#files[@]}" -eq 2 + for path in "${files[@]}"; do + test -f "$path" && test ! -L "$path" + done if [ "$PROMOTE_REVIEWED" = true ]; then [[ "$RELEASE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] [[ "$REVIEWED_WHEEL_SHA256" =~ ^[0-9a-f]{64}$ ]] [[ "$REVIEWED_SDIST_SHA256" =~ ^[0-9a-f]{64}$ ]] - shopt -s dotglob nullglob - files=(dist/*) - test "${#files[@]}" -eq 2 wheel="dist/durable_workflow-${RELEASE_VERSION}-py3-none-any.whl" sdist="dist/durable_workflow-${RELEASE_VERSION}.tar.gz" test -f "$wheel" && test ! -L "$wheel" @@ -189,7 +192,7 @@ jobs: printf '%s %s\n%s %s\n' \ "$REVIEWED_WHEEL_SHA256" "$wheel" "$REVIEWED_SDIST_SHA256" "$sdist" | sha256sum --check --strict - fi - tar -cf dist-handoff.tar -C dist . + tar -cf dist-handoff.tar -C dist -- "${files[@]#dist/}" - name: Bind the privileged PyPI handoff identity and digest id: privileged-handoff diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ddd4bf..4f6782b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.21.0] - 2026-11-21 + ### Added - Opt-in first-recorded-failure selection for `all()` groups (`yield [...]`), as a two-phase rollout (#307). With `Worker(..., record_parallel_failure_order=True)` or `DURABLE_WORKFLOW_RECORD_PARALLEL_FAILURE_ORDER=true`, a new run records the version marker `durable_workflow.parallel_failure_order` (version 1) directly before its first group that contains an activity or child workflow. A marked run raises the failure recorded first in history, even when every member had settled before the workflow resumed. Workers up to 2.20.0 raise the lowest-position failure in that case, so the exception a workflow caught depended on whether its task ran before or after the other members finished. The first recorded failure is still raised as soon as it is recorded, and the other members keep running, are not cancelled, and have their outcomes ignored. Ties follow durable event order, as the shared parallel-group contract specifies. Workflow's embedded engine compares millisecond timestamps and then member index, so failures recorded in the same millisecond can be chosen differently (durable-workflow/.github#415). Any other value of the environment variable is refused when the `Worker` is created. diff --git a/pyproject.toml b/pyproject.toml index 7c66848..20398bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "durable-workflow" -version = "2.20.0" +version = "2.21.0" 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.20.0" -registry-version = "2.20.0" +product-train = "2.21.0" +registry-version = "2.21.0" 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 1989561..3a463b8 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.20.0 wheel on the published +The retry-cap case qualifies the exact reviewed 2.21.0 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 fb7708e..4bf092a 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.20.0" +VERSION = "2.21.0" 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 d434eac..1a5b1ba 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.20.0", + "sdk_version": "2.21.0", "server_image": "ghcr.io/durable-workflow/server@sha256:f7f84884ff178e36b6536237f9f31eb006ed050feac3028106af736bc01d19de", "server_source": "fdb6c4f63d0e1923b4b93a253699fc12d064bb10", "server_amd64_manifest": "sha256:0d0db083943ab6d56ba66010f2fea1fe1dbebbede60b87f7bde2d5f9cd28e709", diff --git a/tests/test_activity_retry_cap_cell.py b/tests/test_activity_retry_cap_cell.py index 1c05906..dbbf9d5 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.20.0 --hash=sha256:{digest}\n".encode()) + assert result.endswith(f"durable-workflow==2.21.0 --hash=sha256:{digest}\n".encode()) assert result.count(b"durable-workflow") == 1