Skip to content

Commit 67e1b71

Browse files
Assert schedule mutation parity fixtures
1 parent 3a1fbc1 commit 67e1b71

5 files changed

Lines changed: 439 additions & 1 deletion

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"schema": "durable-workflow.polyglot.control-plane-request-fixture",
3+
"version": 1,
4+
"operation": "schedule.backfill",
5+
"request": {
6+
"method": "POST",
7+
"path": "/schedules/daily-inventory-check/backfill",
8+
"body": {
9+
"start_time": "2026-04-20T00:00:00Z",
10+
"end_time": "2026-04-20T03:00:00Z",
11+
"overlap_policy": "buffer_all"
12+
}
13+
},
14+
"semantic_body": {
15+
"namespace": "orders-prod",
16+
"schedule_id": "daily-inventory-check",
17+
"outcome": "accepted",
18+
"fires_attempted": 6
19+
},
20+
"response_body": {
21+
"namespace": "orders-prod",
22+
"schedule_id": "daily-inventory-check",
23+
"outcome": "accepted",
24+
"fires_attempted": 6,
25+
"results": [
26+
{
27+
"fire_time": "2026-04-20T00:00:00Z",
28+
"outcome": "triggered",
29+
"workflow_id": "wf-inventory-check-20260420-0000"
30+
},
31+
{
32+
"fire_time": "2026-04-20T00:30:00Z",
33+
"outcome": "buffered",
34+
"buffer_depth": 1
35+
}
36+
]
37+
},
38+
"cli": {
39+
"argv": {
40+
"schedule-id": "daily-inventory-check",
41+
"--start-time": "2026-04-20T00:00:00Z",
42+
"--end-time": "2026-04-20T03:00:00Z",
43+
"--overlap-policy": "buffer_all",
44+
"--json": true
45+
}
46+
},
47+
"sdk_python": {
48+
"method": "backfill_schedule",
49+
"args": {
50+
"schedule_id": "daily-inventory-check",
51+
"start_time": "2026-04-20T00:00:00Z",
52+
"end_time": "2026-04-20T03:00:00Z",
53+
"overlap_policy": "buffer_all"
54+
}
55+
}
56+
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"schema": "durable-workflow.polyglot.control-plane-request-fixture",
3+
"version": 1,
4+
"operation": "schedule.create",
5+
"request": {
6+
"method": "POST",
7+
"path": "/schedules",
8+
"body": {
9+
"schedule_id": "daily-inventory-check",
10+
"spec": {
11+
"cron_expressions": [
12+
"15 7 * * *"
13+
],
14+
"timezone": "UTC"
15+
},
16+
"action": {
17+
"workflow_type": "inventory.check",
18+
"task_queue": "inventory-standard",
19+
"input": [
20+
{
21+
"warehouse": "west-1",
22+
"threshold": 25
23+
}
24+
],
25+
"execution_timeout_seconds": 900,
26+
"run_timeout_seconds": 600
27+
},
28+
"overlap_policy": "buffer_one",
29+
"jitter_seconds": 45,
30+
"max_runs": 30,
31+
"paused": true,
32+
"note": "created from parity fixture"
33+
}
34+
},
35+
"semantic_body": {
36+
"namespace": "orders-prod",
37+
"schedule_id": "daily-inventory-check",
38+
"workflow_type": "inventory.check",
39+
"task_queue": "inventory-standard",
40+
"overlap_policy": "buffer_one",
41+
"outcome": "created"
42+
},
43+
"response_body": {
44+
"namespace": "orders-prod",
45+
"schedule_id": "daily-inventory-check",
46+
"outcome": "created",
47+
"status": "paused",
48+
"created_at": "2026-04-22T07:45:00Z"
49+
},
50+
"cli": {
51+
"argv": {
52+
"--schedule-id": "daily-inventory-check",
53+
"--workflow-type": "inventory.check",
54+
"--cron": "15 7 * * *",
55+
"--task-queue": "inventory-standard",
56+
"--input": "[{\"warehouse\":\"west-1\",\"threshold\":25}]",
57+
"--execution-timeout": "900",
58+
"--run-timeout": "600",
59+
"--overlap-policy": "buffer_one",
60+
"--jitter": "45",
61+
"--max-runs": "30",
62+
"--paused": true,
63+
"--note": "created from parity fixture",
64+
"--json": true
65+
}
66+
},
67+
"sdk_python": {
68+
"method": "create_schedule",
69+
"kwargs": {
70+
"schedule_id": "daily-inventory-check",
71+
"spec": {
72+
"cron_expressions": [
73+
"15 7 * * *"
74+
],
75+
"timezone": "UTC"
76+
},
77+
"action": {
78+
"workflow_type": "inventory.check",
79+
"task_queue": "inventory-standard",
80+
"input": [
81+
{
82+
"warehouse": "west-1",
83+
"threshold": 25
84+
}
85+
],
86+
"execution_timeout_seconds": 900,
87+
"run_timeout_seconds": 600
88+
},
89+
"overlap_policy": "buffer_one",
90+
"jitter_seconds": 45,
91+
"max_runs": 30,
92+
"paused": true,
93+
"note": "created from parity fixture"
94+
},
95+
"payload_envelope": {
96+
"field": "action.input",
97+
"codec": "avro",
98+
"decoded": [
99+
{
100+
"warehouse": "west-1",
101+
"threshold": 25
102+
}
103+
]
104+
}
105+
}
106+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"schema": "durable-workflow.polyglot.control-plane-request-fixture",
3+
"version": 1,
4+
"operation": "schedule.trigger",
5+
"request": {
6+
"method": "POST",
7+
"path": "/schedules/daily-inventory-check/trigger",
8+
"body": {
9+
"overlap_policy": "allow_all"
10+
}
11+
},
12+
"semantic_body": {
13+
"namespace": "orders-prod",
14+
"schedule_id": "daily-inventory-check",
15+
"outcome": "triggered",
16+
"workflow_id": "wf-inventory-check-20260422-manual",
17+
"run_id": "run-inventory-check-20260422-manual"
18+
},
19+
"response_body": {
20+
"namespace": "orders-prod",
21+
"schedule_id": "daily-inventory-check",
22+
"outcome": "triggered",
23+
"workflow_id": "wf-inventory-check-20260422-manual",
24+
"run_id": "run-inventory-check-20260422-manual"
25+
},
26+
"cli": {
27+
"argv": {
28+
"schedule-id": "daily-inventory-check",
29+
"--overlap-policy": "allow_all",
30+
"--json": true
31+
}
32+
},
33+
"sdk_python": {
34+
"method": "trigger_schedule",
35+
"args": {
36+
"schedule_id": "daily-inventory-check",
37+
"overlap_policy": "allow_all"
38+
}
39+
}
40+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"schema": "durable-workflow.polyglot.control-plane-request-fixture",
3+
"version": 1,
4+
"operation": "schedule.update",
5+
"request": {
6+
"method": "PUT",
7+
"path": "/schedules/daily-inventory-check",
8+
"body": {
9+
"spec": {
10+
"intervals": [
11+
{
12+
"every": "PT30M"
13+
}
14+
]
15+
},
16+
"action": {
17+
"workflow_type": "inventory.check",
18+
"task_queue": "inventory-priority",
19+
"input": [
20+
{
21+
"warehouse": "west-1",
22+
"threshold": 10
23+
}
24+
],
25+
"execution_timeout_seconds": 1200,
26+
"run_timeout_seconds": 900
27+
},
28+
"overlap_policy": "skip",
29+
"jitter_seconds": 15,
30+
"max_runs": 100,
31+
"note": "tighten inventory threshold"
32+
}
33+
},
34+
"semantic_body": {
35+
"namespace": "orders-prod",
36+
"schedule_id": "daily-inventory-check",
37+
"workflow_type": "inventory.check",
38+
"task_queue": "inventory-priority",
39+
"overlap_policy": "skip",
40+
"outcome": "updated"
41+
},
42+
"response_body": {
43+
"namespace": "orders-prod",
44+
"schedule_id": "daily-inventory-check",
45+
"outcome": "updated",
46+
"updated_at": "2026-04-22T07:50:00Z"
47+
},
48+
"cli": {
49+
"argv": {
50+
"schedule-id": "daily-inventory-check",
51+
"--interval": "PT30M",
52+
"--workflow-type": "inventory.check",
53+
"--task-queue": "inventory-priority",
54+
"--input": "[{\"warehouse\":\"west-1\",\"threshold\":10}]",
55+
"--execution-timeout": "1200",
56+
"--run-timeout": "900",
57+
"--overlap-policy": "skip",
58+
"--jitter": "15",
59+
"--max-runs": "100",
60+
"--note": "tighten inventory threshold",
61+
"--json": true
62+
}
63+
},
64+
"sdk_python": {
65+
"method": "update_schedule",
66+
"kwargs": {
67+
"schedule_id": "daily-inventory-check",
68+
"spec": {
69+
"intervals": [
70+
{
71+
"every": "PT30M"
72+
}
73+
]
74+
},
75+
"action": {
76+
"workflow_type": "inventory.check",
77+
"task_queue": "inventory-priority",
78+
"input": [
79+
{
80+
"warehouse": "west-1",
81+
"threshold": 10
82+
}
83+
],
84+
"execution_timeout_seconds": 1200,
85+
"run_timeout_seconds": 900
86+
},
87+
"overlap_policy": "skip",
88+
"jitter_seconds": 15,
89+
"max_runs": 100,
90+
"note": "tighten inventory threshold"
91+
},
92+
"payload_envelope": {
93+
"field": "action.input",
94+
"codec": "avro",
95+
"decoded": [
96+
{
97+
"warehouse": "west-1",
98+
"threshold": 10
99+
}
100+
]
101+
}
102+
}
103+
}

0 commit comments

Comments
 (0)