durable-workflow 0.4.95__tar.gz → 0.4.96__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {durable_workflow-0.4.95/src/durable_workflow.egg-info → durable_workflow-0.4.96}/PKG-INFO +1 -1
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/pyproject.toml +1 -1
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/client.py +13 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96/src/durable_workflow.egg-info}/PKG-INFO +1 -1
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_client.py +30 -1
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_sync.py +22 -1
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/LICENSE +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/README.md +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/setup.cfg +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/__init__.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/_avro.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/activity.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/auth_composition.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/errors.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/external_storage.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/external_task_input.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/external_task_result.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/history_bundle_verify.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/interceptors.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/invocable.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/metrics.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/nexus.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/py.typed +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/python_conformance.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/replay_conformance.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/replay_verify.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/retry_policy.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/serializer.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/sync.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/testing.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/worker.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/workflow.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/workflow_updates_conformance.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/SOURCES.txt +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/dependency_links.txt +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/entry_points.txt +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/requires.txt +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/top_level.txt +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_activity_context.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_auth_composition.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_control_plane_parity_fixtures.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_errors.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_external_storage.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_external_task_input.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_external_task_result.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_golden_history_replay.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_history_bundle_verify.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_history_event_contract.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_invocable.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_metrics.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_order_processing_example.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_public_boundary_scanner.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_python_conformance.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_queries.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_readme_quickstart.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_release_docs_audit_workflow.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_replay.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_replay_conformance.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_replay_verify.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_retry_policy.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_schedules.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_serializer.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_signals.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_sleep.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_standalone_activity_client.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_testing_harness.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_updates.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_wait_condition.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_worker.py +0 -0
- {durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_workflow_updates_conformance.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "durable-workflow"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.96"
|
|
8
8
|
description = "Python SDK for the Durable Workflow server (language-neutral HTTP protocol)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -164,6 +164,8 @@ class WorkflowExecution:
|
|
|
164
164
|
input: Any = None
|
|
165
165
|
output: Any = None
|
|
166
166
|
payload_codec: str | None = None
|
|
167
|
+
memo: dict[str, Any] | None = None
|
|
168
|
+
search_attributes: dict[str, Any] | None = None
|
|
167
169
|
|
|
168
170
|
|
|
169
171
|
@dataclass
|
|
@@ -2386,6 +2388,10 @@ class Client:
|
|
|
2386
2388
|
input=input_val,
|
|
2387
2389
|
output=output_val,
|
|
2388
2390
|
payload_codec=data.get("payload_codec"),
|
|
2391
|
+
memo=data.get("memo") if isinstance(data.get("memo"), dict) else None,
|
|
2392
|
+
search_attributes=(
|
|
2393
|
+
data.get("search_attributes") if isinstance(data.get("search_attributes"), dict) else None
|
|
2394
|
+
),
|
|
2389
2395
|
)
|
|
2390
2396
|
|
|
2391
2397
|
async def list_workflows(
|
|
@@ -2425,6 +2431,13 @@ class Client:
|
|
|
2425
2431
|
run_id=item.get("run_id"),
|
|
2426
2432
|
workflow_type=item.get("workflow_type", ""),
|
|
2427
2433
|
status=item.get("status"),
|
|
2434
|
+
namespace=item.get("namespace"),
|
|
2435
|
+
task_queue=item.get("task_queue"),
|
|
2436
|
+
payload_codec=item.get("payload_codec"),
|
|
2437
|
+
memo=item.get("memo") if isinstance(item.get("memo"), dict) else None,
|
|
2438
|
+
search_attributes=(
|
|
2439
|
+
item.get("search_attributes") if isinstance(item.get("search_attributes"), dict) else None
|
|
2440
|
+
),
|
|
2428
2441
|
)
|
|
2429
2442
|
for item in items
|
|
2430
2443
|
]
|
|
@@ -464,6 +464,8 @@ class TestDescribeWorkflow:
|
|
|
464
464
|
assert desc.status == response["status"]
|
|
465
465
|
assert desc.payload_codec == response["payload_codec"]
|
|
466
466
|
assert desc.input == response["input"]
|
|
467
|
+
assert desc.memo == response["memo"]
|
|
468
|
+
assert desc.search_attributes == response["search_attributes"]
|
|
467
469
|
|
|
468
470
|
@pytest.mark.asyncio
|
|
469
471
|
async def test_envelope_fields(self, client: Client) -> None:
|
|
@@ -1131,7 +1133,23 @@ class TestListWorkflows:
|
|
|
1131
1133
|
async def test_list(self, client: Client) -> None:
|
|
1132
1134
|
resp = _mock_response(200, {
|
|
1133
1135
|
"workflows": [
|
|
1134
|
-
{
|
|
1136
|
+
{
|
|
1137
|
+
"workflow_id": "wf-1",
|
|
1138
|
+
"run_id": "r1",
|
|
1139
|
+
"workflow_type": "greeter",
|
|
1140
|
+
"status": "running",
|
|
1141
|
+
"namespace": "ns1",
|
|
1142
|
+
"task_queue": "q1",
|
|
1143
|
+
"payload_codec": "avro",
|
|
1144
|
+
"memo": {"source": "php-writer"},
|
|
1145
|
+
"search_attributes": {
|
|
1146
|
+
"customer_id": "cust-php-1",
|
|
1147
|
+
"order_total_cents": 9200,
|
|
1148
|
+
"discount_ratio": 0.125,
|
|
1149
|
+
"is_vip": True,
|
|
1150
|
+
"tags": ["urgent", "renewal"],
|
|
1151
|
+
},
|
|
1152
|
+
},
|
|
1135
1153
|
{"workflow_id": "wf-2", "run_id": "r2", "workflow_type": "greeter", "status": "completed"},
|
|
1136
1154
|
],
|
|
1137
1155
|
"next_page_token": "abc",
|
|
@@ -1141,6 +1159,17 @@ class TestListWorkflows:
|
|
|
1141
1159
|
assert len(result.executions) == 2
|
|
1142
1160
|
assert result.next_page_token == "abc"
|
|
1143
1161
|
assert result.executions[0].workflow_id == "wf-1"
|
|
1162
|
+
assert result.executions[0].namespace == "ns1"
|
|
1163
|
+
assert result.executions[0].task_queue == "q1"
|
|
1164
|
+
assert result.executions[0].payload_codec == "avro"
|
|
1165
|
+
assert result.executions[0].memo == {"source": "php-writer"}
|
|
1166
|
+
assert result.executions[0].search_attributes == {
|
|
1167
|
+
"customer_id": "cust-php-1",
|
|
1168
|
+
"order_total_cents": 9200,
|
|
1169
|
+
"discount_ratio": 0.125,
|
|
1170
|
+
"is_vip": True,
|
|
1171
|
+
"tags": ["urgent", "renewal"],
|
|
1172
|
+
}
|
|
1144
1173
|
|
|
1145
1174
|
@pytest.mark.asyncio
|
|
1146
1175
|
async def test_list_request_matches_polyglot_fixture(self, client: Client) -> None:
|
|
@@ -156,11 +156,23 @@ class TestSyncClientDescribe:
|
|
|
156
156
|
"run_id": "run-1",
|
|
157
157
|
"workflow_type": "greeter",
|
|
158
158
|
"status": "running",
|
|
159
|
+
"search_attributes": {
|
|
160
|
+
"customer_id": "cust-php-sync",
|
|
161
|
+
"order_total_cents": 6100,
|
|
162
|
+
"is_vip": False,
|
|
163
|
+
"tags": ["standard", "renewal"],
|
|
164
|
+
},
|
|
159
165
|
},
|
|
160
166
|
)
|
|
161
167
|
with patch.object(client._async._http, "request", new_callable=AsyncMock, return_value=resp):
|
|
162
168
|
desc = client.describe_workflow("wf-1")
|
|
163
169
|
assert desc.status == "running"
|
|
170
|
+
assert desc.search_attributes == {
|
|
171
|
+
"customer_id": "cust-php-sync",
|
|
172
|
+
"order_total_cents": 6100,
|
|
173
|
+
"is_vip": False,
|
|
174
|
+
"tags": ["standard", "renewal"],
|
|
175
|
+
}
|
|
164
176
|
|
|
165
177
|
|
|
166
178
|
class TestSyncClientSignal:
|
|
@@ -202,12 +214,21 @@ class TestSyncClientList:
|
|
|
202
214
|
resp = _mock_response(
|
|
203
215
|
200,
|
|
204
216
|
{
|
|
205
|
-
"workflows": [
|
|
217
|
+
"workflows": [
|
|
218
|
+
{
|
|
219
|
+
"workflow_id": "wf-1",
|
|
220
|
+
"run_id": "r1",
|
|
221
|
+
"workflow_type": "g",
|
|
222
|
+
"status": "running",
|
|
223
|
+
"search_attributes": {"customer_id": "cust-php-sync"},
|
|
224
|
+
}
|
|
225
|
+
],
|
|
206
226
|
},
|
|
207
227
|
)
|
|
208
228
|
with patch.object(client._async._http, "request", new_callable=AsyncMock, return_value=resp):
|
|
209
229
|
result = client.list_workflows(workflow_type="g")
|
|
210
230
|
assert len(result.executions) == 1
|
|
231
|
+
assert result.executions[0].search_attributes == {"customer_id": "cust-php-sync"}
|
|
211
232
|
|
|
212
233
|
def test_list_task_queues(self) -> None:
|
|
213
234
|
client = Client("http://localhost:8080")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/auth_composition.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/external_storage.py
RENAMED
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/external_task_input.py
RENAMED
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/external_task_result.py
RENAMED
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/history_bundle_verify.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/python_conformance.py
RENAMED
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow/replay_conformance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/requires.txt
RENAMED
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/src/durable_workflow.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_control_plane_parity_fixtures.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_release_docs_audit_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_standalone_activity_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-0.4.95 → durable_workflow-0.4.96}/tests/test_workflow_updates_conformance.py
RENAMED
|
File without changes
|