Skip to content

Commit 41fae1c

Browse files
authored
Promote Python SDK to 2.0.0 stable (#46)
Co-authored-by: Durable Workflow <support@durable-workflow.com>
1 parent 84e1eee commit 41fae1c

8 files changed

Lines changed: 38 additions & 31 deletions

‎CHANGELOG.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
The Python SDK advances to prerelease `2.0.0-rc.44`. PyPI displays the normalized
10-
PEP 440 identity `2.0.0rc44`. This Avro-only SDK release is qualified with Server
11-
`2.0.0-rc.68`; JSON remains HTTP transport and is no longer a workflow payload
12-
codec.
9+
The Python SDK `2.0.0` promotes the qualified release candidate to the stable
10+
2.0 line. This Avro-only SDK release is supported with Server `2.0.0`; JSON
11+
remains HTTP transport and is not a workflow payload codec.
1312
Earlier SDK versions remain historical releases and are not alternate supported
1413
2.0 baselines; no prerelease compatibility shim is provided.
1514

‎README.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
A Python SDK for the [Durable Workflow server](https://github.com/durable-workflow/server). Speaks the server's language-neutral HTTP/JSON worker protocol — no PHP runtime required.
44

5-
Status: **Release candidate** — this is the Python SDK release candidate in the
6-
Durable Workflow 2.0 train. Core features include workflows, activities,
5+
Status: **Stable 2.0**. Core features include workflows, activities,
76
schedules, signals, timers, child workflows, continue-as-new, side effects,
87
version markers, worker-applied accepted updates, replay verification, the
98
in-process `WorkflowEnvironment` test harness, and invocable activity carriers.

‎docs/index.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ hide:
1111

1212
<div class="dw-hero__copy" markdown="1">
1313

14-
<p class="dw-eyebrow">First-party Python SDK · 2.0 prerelease</p>
14+
<p class="dw-eyebrow">First-party Python SDK · 2.0 stable</p>
1515

1616
# Durable workflows in Python.
1717

@@ -100,7 +100,7 @@ file containing an activity, workflow, worker, and client.
100100
### 1. Start Server
101101

102102
Docker keeps this first run local. Resolve the Server image without copying a
103-
prerelease sequence number into the page:
103+
release version into the page:
104104

105105
```bash
106106
{{ durable_workflow_server_image_resolver }}

‎pyproject.toml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "durable-workflow"
7-
version = "2.0.0-rc.44"
8-
description = "Release candidate Python SDK for the Durable Workflow 2.0 train"
7+
version = "2.0.0"
8+
description = "Python SDK for the Durable Workflow 2.0 platform"
99
readme = "README.md"
1010
requires-python = ">=3.10"
1111
license = "MIT"
@@ -68,9 +68,9 @@ durable-workflow-replay-conformance = "durable_workflow.replay_conformance:main"
6868
durable-workflow-workflow-updates-conformance = "durable_workflow.workflow_updates_conformance:main"
6969

7070
[tool.durable-workflow]
71-
product-train = "2.0.0-rc.44"
72-
registry-version = "2.0.0rc44"
73-
supported-server-versions = "2.0.0-rc.68"
71+
product-train = "2.0.0"
72+
registry-version = "2.0.0"
73+
supported-server-versions = "2.0.0"
7474
worker-protocol-version = "1.19"
7575
control-plane-version = "2"
7676
durable-selection = true

‎scripts/api_reference_release.py‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
RELEASE_EVIDENCE_SCHEMA = "durable-workflow.python-api-reference.release"
4040
QUICKSTART_CONTRACT_SCHEMA = "durable-workflow.docs.v2.quickstart-execution-contract"
4141
QUICKSTART_CONTRACT_URL = "https://durable-workflow.com/quickstart-execution-contract.json"
42+
RELEASE_VERSION_PATTERN = r"[0-9]+\.[0-9]+\.[0-9]+(?:-(?:alpha|beta|rc)\.[0-9]+)?"
4243
SUPPORTED_PRERELEASE_INSTALL_COMMAND = "curl -fsSL https://durable-workflow.com/install-sdk.sh | sh -s -- python"
4344
SUPPORTED_SERVER_IMAGE_RESOLVER_COMMAND = rf'''export DW_SERVER_IMAGE="$(
4445
curl -fsSL "${{DURABLE_WORKFLOW_QUICKSTART_CONTRACT_URL:-{QUICKSTART_CONTRACT_URL}}}" |
@@ -50,8 +51,8 @@
5051
version = server.get("version")
5152
image = server.get("image")
5253
reference = server.get("reference")
53-
if not isinstance(version, str) or re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+-(alpha|beta|rc)\.[0-9]+", version) is None:
54-
raise SystemExit("The public quickstart contract has an invalid Server prerelease.")
54+
if not isinstance(version, str) or re.fullmatch(r"{RELEASE_VERSION_PATTERN}", version) is None:
55+
raise SystemExit("The public quickstart contract has an invalid Server release.")
5556
if not isinstance(image, str) or reference != f"{{image}}:{{version}}":
5657
raise SystemExit("The public quickstart contract has an invalid Server reference.")
5758
print(reference)'
@@ -116,9 +117,6 @@ def load_release_identity(repo_root: Path) -> ReleaseIdentity:
116117
raise ValueError("project.version and tool.durable-workflow.product-train must match")
117118
if normalize_registry_version(identity.version) != identity.registry_version:
118119
raise ValueError("registry-version must be the PEP 440 form of project.version")
119-
if "-" not in identity.version:
120-
raise ValueError("API-reference release identity must remain a prerelease before the 2.0 stable cutover")
121-
122120
runtime_protocol = declared_runtime_protocol_version(
123121
(repo_root / "src" / "durable_workflow" / "client.py").read_text(encoding="utf-8")
124122
)
@@ -160,11 +158,11 @@ def load_qualified_onboarding(payload: object) -> QualifiedOnboarding:
160158
server_version = server.get("version")
161159
server_image = server.get("image")
162160
server_reference = server.get("reference")
163-
prerelease = re.compile(r"[0-9]+\.[0-9]+\.[0-9]+-(?:alpha|beta|rc)\.[0-9]+")
164-
if not isinstance(sdk_version, str) or prerelease.fullmatch(sdk_version) is None:
165-
raise ValueError("Public quickstart contract has an invalid Python SDK prerelease")
166-
if not isinstance(server_version, str) or prerelease.fullmatch(server_version) is None:
167-
raise ValueError("Public quickstart contract has an invalid Server prerelease")
161+
release = re.compile(RELEASE_VERSION_PATTERN)
162+
if not isinstance(sdk_version, str) or release.fullmatch(sdk_version) is None:
163+
raise ValueError("Public quickstart contract has an invalid Python SDK release")
164+
if not isinstance(server_version, str) or release.fullmatch(server_version) is None:
165+
raise ValueError("Public quickstart contract has an invalid Server release")
168166
if not isinstance(server_image, str) or not server_image:
169167
raise ValueError("Public quickstart contract has an invalid Server image")
170168
if server_reference != f"{server_image}:{server_version}":

‎tests/test_api_reference_install.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ def test_contract_change_alone_changes_the_qualified_sdk_server_pair() -> None:
141141
assert changed.server_reference != current.server_reference
142142

143143

144+
def test_stable_contract_selects_the_stable_sdk_server_pair() -> None:
145+
stable = load_qualified_onboarding(quickstart_contract("2.0.0", "2.0.0"))
146+
147+
assert stable == QualifiedOnboarding(
148+
sdk_version="2.0.0",
149+
sdk_registry_version="2.0.0",
150+
server_version="2.0.0",
151+
server_reference="durableworkflow/server:2.0.0",
152+
)
153+
154+
144155
def test_contract_rejects_a_mismatched_server_reference() -> None:
145156
contract = quickstart_contract("2.0.0-rc.101", "2.0.0-rc.201")
146157
artifacts = contract["artifacts"]

‎tests/test_release_docs_source.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
REPO_ROOT = Path(__file__).resolve().parents[1]
77
VALIDATOR = REPO_ROOT / "scripts" / "ci" / "validate-release-docs-source.py"
8-
VERSION = "2.0.0-rc.44"
8+
VERSION = "2.0.0"
99

1010

1111
def git(repo: Path, *arguments: str) -> str:

‎tests/test_release_metadata.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ def source_metadata() -> SourceMetadata:
2525
return SourceMetadata(
2626
commit="a" * 40,
2727
name="durable-workflow",
28-
version="2.0.0-rc.44",
29-
registry_version="2.0.0rc44",
30-
server_version="2.0.0-rc.68",
28+
version="2.0.0",
29+
registry_version="2.0.0",
30+
server_version="2.0.0",
3131
worker_protocol_version="1.19",
32-
summary="Release candidate Python SDK for the Durable Workflow 2.0 train",
32+
summary="Python SDK for the Durable Workflow 2.0 platform",
3333
classifiers=("Programming Language :: Python :: 3",),
3434
readme=(
3535
"# Durable Workflow\n\n"
@@ -45,10 +45,10 @@ def test_worker_release_identity_matches_supported_server_and_protocol() -> None
4545
project = manifest["project"]
4646
release = manifest["tool"]["durable-workflow"]
4747

48-
assert project["version"] == "2.0.0-rc.44"
48+
assert project["version"] == "2.0.0"
4949
assert release["product-train"] == project["version"]
50-
assert release["registry-version"] == "2.0.0rc44"
51-
assert release["supported-server-versions"] == "2.0.0-rc.68"
50+
assert release["registry-version"] == "2.0.0"
51+
assert release["supported-server-versions"] == "2.0.0"
5252
assert release["worker-protocol-version"] == PROTOCOL_VERSION == "1.19"
5353
assert release["durable-selection"] is True
5454
assert release["durable-selection-minimum-worker-protocol-version"] == "1.19"

0 commit comments

Comments
 (0)