@temporalio/core-bridge 1.11.2 → 1.11.4
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.
- package/Cargo.lock +396 -489
- package/Cargo.toml +3 -2
- package/lib/errors.d.ts +2 -0
- package/lib/errors.js +7 -3
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +8 -2
- package/lib/index.js.map +1 -1
- package/lib/worker-tuner.d.ts +111 -1
- package/package.json +3 -3
- package/releases/aarch64-apple-darwin/index.node +0 -0
- package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
- package/releases/x86_64-apple-darwin/index.node +0 -0
- package/releases/x86_64-pc-windows-msvc/index.node +0 -0
- package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
- package/sdk-core/.github/workflows/per-pr.yml +3 -3
- package/sdk-core/Cargo.toml +0 -1
- package/sdk-core/client/Cargo.toml +1 -2
- package/sdk-core/client/src/lib.rs +21 -13
- package/sdk-core/client/src/metrics.rs +1 -1
- package/sdk-core/client/src/raw.rs +46 -1
- package/sdk-core/core/Cargo.toml +7 -7
- package/sdk-core/core/benches/workflow_replay.rs +1 -1
- package/sdk-core/core/src/abstractions/take_cell.rs +1 -1
- package/sdk-core/core/src/abstractions.rs +98 -10
- package/sdk-core/core/src/core_tests/activity_tasks.rs +8 -2
- package/sdk-core/core/src/core_tests/local_activities.rs +1 -1
- package/sdk-core/core/src/core_tests/mod.rs +3 -3
- package/sdk-core/core/src/core_tests/updates.rs +104 -9
- package/sdk-core/core/src/core_tests/workers.rs +72 -3
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +6 -7
- package/sdk-core/core/src/debug_client.rs +78 -0
- package/sdk-core/core/src/ephemeral_server/mod.rs +15 -5
- package/sdk-core/core/src/lib.rs +30 -4
- package/sdk-core/core/src/pollers/mod.rs +1 -1
- package/sdk-core/core/src/pollers/poll_buffer.rs +7 -7
- package/sdk-core/core/src/replay/mod.rs +4 -4
- package/sdk-core/core/src/telemetry/log_export.rs +2 -2
- package/sdk-core/core/src/telemetry/metrics.rs +69 -1
- package/sdk-core/core/src/telemetry/otel.rs +2 -2
- package/sdk-core/core/src/test_help/mod.rs +3 -3
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +3 -3
- package/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +1 -1
- package/sdk-core/core/src/worker/activities/local_activities.rs +68 -24
- package/sdk-core/core/src/worker/activities.rs +26 -15
- package/sdk-core/core/src/worker/client/mocks.rs +10 -4
- package/sdk-core/core/src/worker/client.rs +17 -0
- package/sdk-core/core/src/worker/mod.rs +71 -13
- package/sdk-core/core/src/worker/slot_provider.rs +5 -7
- package/sdk-core/core/src/worker/tuner/fixed_size.rs +4 -3
- package/sdk-core/core/src/worker/tuner/resource_based.rs +171 -32
- package/sdk-core/core/src/worker/tuner.rs +18 -6
- package/sdk-core/core/src/worker/workflow/history_update.rs +43 -13
- package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +6 -6
- package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +6 -5
- package/sdk-core/core/src/worker/workflow/managed_run.rs +3 -3
- package/sdk-core/core/src/worker/workflow/mod.rs +13 -7
- package/sdk-core/core/src/worker/workflow/wft_extraction.rs +7 -7
- package/sdk-core/core/src/worker/workflow/wft_poller.rs +2 -2
- package/sdk-core/core/src/worker/workflow/workflow_stream.rs +11 -11
- package/sdk-core/core-api/Cargo.toml +1 -0
- package/sdk-core/core-api/src/worker.rs +84 -30
- package/sdk-core/sdk/Cargo.toml +1 -2
- package/sdk-core/sdk/src/lib.rs +1 -1
- package/sdk-core/sdk/src/workflow_context.rs +9 -8
- package/sdk-core/sdk/src/workflow_future.rs +19 -14
- package/sdk-core/sdk-core-protos/Cargo.toml +2 -0
- package/sdk-core/sdk-core-protos/build.rs +6 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/buf.yaml +1 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +3207 -158
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +2934 -118
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/activity/v1/message.proto +67 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +47 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +6 -7
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/reset.proto +5 -3
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +3 -3
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/update.proto +14 -13
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +1 -3
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +22 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +13 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +26 -6
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto +5 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +6 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +46 -12
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/update/v1/message.proto +18 -19
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +27 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +192 -19
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +279 -12
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/activity_result/activity_result.proto +1 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/activity_task/activity_task.proto +1 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +1 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/common/common.proto +1 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/core_interface.proto +17 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/external_data/external_data.proto +1 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +1 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +1 -1
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +1 -1
- package/sdk-core/sdk-core-protos/src/lib.rs +30 -6
- package/sdk-core/test-utils/Cargo.toml +1 -2
- package/sdk-core/test-utils/src/lib.rs +2 -2
- package/sdk-core/tests/heavy_tests.rs +1 -1
- package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +2 -2
- package/sdk-core/tests/integ_tests/metrics_tests.rs +144 -7
- package/sdk-core/tests/integ_tests/queries_tests.rs +1 -1
- package/sdk-core/tests/integ_tests/update_tests.rs +109 -5
- package/sdk-core/tests/integ_tests/worker_tests.rs +44 -8
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +1 -1
- package/sdk-core/tests/integ_tests/workflow_tests.rs +3 -2
- package/src/conversions/slot_supplier_bridge.rs +287 -0
- package/src/conversions.rs +23 -15
- package/src/helpers.rs +35 -1
- package/src/runtime.rs +7 -3
- package/src/worker.rs +1 -1
- package/ts/errors.ts +9 -2
- package/ts/index.ts +19 -4
- package/ts/worker-tuner.ts +123 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/.gitmodules +0 -3
package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto
CHANGED
|
@@ -56,22 +56,32 @@ service WorkflowService {
|
|
|
56
56
|
// namespace.
|
|
57
57
|
rpc RegisterNamespace (RegisterNamespaceRequest) returns (RegisterNamespaceResponse) {
|
|
58
58
|
option (google.api.http) = {
|
|
59
|
-
post: "/namespaces"
|
|
59
|
+
post: "/cluster/namespaces"
|
|
60
60
|
body: "*"
|
|
61
|
+
additional_bindings {
|
|
62
|
+
post: "/api/v1/namespaces"
|
|
63
|
+
body: "*"
|
|
64
|
+
}
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
// DescribeNamespace returns the information and configuration for a registered namespace.
|
|
65
69
|
rpc DescribeNamespace (DescribeNamespaceRequest) returns (DescribeNamespaceResponse) {
|
|
66
70
|
option (google.api.http) = {
|
|
67
|
-
get: "/namespaces/{namespace}"
|
|
71
|
+
get: "/cluster/namespaces/{namespace}"
|
|
72
|
+
additional_bindings {
|
|
73
|
+
get: "/api/v1/namespaces/{namespace}"
|
|
74
|
+
}
|
|
68
75
|
};
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
// ListNamespaces returns the information and configuration for all namespaces.
|
|
72
79
|
rpc ListNamespaces (ListNamespacesRequest) returns (ListNamespacesResponse) {
|
|
73
80
|
option (google.api.http) = {
|
|
74
|
-
get: "/namespaces"
|
|
81
|
+
get: "/cluster/namespaces"
|
|
82
|
+
additional_bindings {
|
|
83
|
+
get: "/api/v1/namespaces"
|
|
84
|
+
}
|
|
75
85
|
};
|
|
76
86
|
}
|
|
77
87
|
|
|
@@ -79,8 +89,12 @@ service WorkflowService {
|
|
|
79
89
|
// namespace.
|
|
80
90
|
rpc UpdateNamespace (UpdateNamespaceRequest) returns (UpdateNamespaceResponse) {
|
|
81
91
|
option (google.api.http) = {
|
|
82
|
-
post: "/namespaces/{namespace}/update"
|
|
92
|
+
post: "/cluster/namespaces/{namespace}/update"
|
|
83
93
|
body: "*"
|
|
94
|
+
additional_bindings {
|
|
95
|
+
post: "/api/v1/namespaces/{namespace}/update"
|
|
96
|
+
body: "*"
|
|
97
|
+
}
|
|
84
98
|
};
|
|
85
99
|
}
|
|
86
100
|
|
|
@@ -104,6 +118,10 @@ service WorkflowService {
|
|
|
104
118
|
option (google.api.http) = {
|
|
105
119
|
post: "/namespaces/{namespace}/workflows/{workflow_id}"
|
|
106
120
|
body: "*"
|
|
121
|
+
additional_bindings {
|
|
122
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}"
|
|
123
|
+
body: "*"
|
|
124
|
+
}
|
|
107
125
|
};
|
|
108
126
|
}
|
|
109
127
|
|
|
@@ -120,6 +138,10 @@ service WorkflowService {
|
|
|
120
138
|
option (google.api.http) = {
|
|
121
139
|
post: "/namespaces/{namespace}/workflows/execute-multi-operation"
|
|
122
140
|
body: "*"
|
|
141
|
+
additional_bindings {
|
|
142
|
+
post: "/api/v1/namespaces/{namespace}/workflows/execute-multi-operation"
|
|
143
|
+
body: "*"
|
|
144
|
+
}
|
|
123
145
|
};
|
|
124
146
|
}
|
|
125
147
|
|
|
@@ -128,6 +150,9 @@ service WorkflowService {
|
|
|
128
150
|
rpc GetWorkflowExecutionHistory (GetWorkflowExecutionHistoryRequest) returns (GetWorkflowExecutionHistoryResponse) {
|
|
129
151
|
option (google.api.http) = {
|
|
130
152
|
get: "/namespaces/{namespace}/workflows/{execution.workflow_id}/history"
|
|
153
|
+
additional_bindings {
|
|
154
|
+
get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history"
|
|
155
|
+
}
|
|
131
156
|
};
|
|
132
157
|
}
|
|
133
158
|
|
|
@@ -137,6 +162,9 @@ service WorkflowService {
|
|
|
137
162
|
rpc GetWorkflowExecutionHistoryReverse (GetWorkflowExecutionHistoryReverseRequest) returns (GetWorkflowExecutionHistoryReverseResponse) {
|
|
138
163
|
option (google.api.http) = {
|
|
139
164
|
get: "/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse"
|
|
165
|
+
additional_bindings {
|
|
166
|
+
get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse"
|
|
167
|
+
}
|
|
140
168
|
};
|
|
141
169
|
}
|
|
142
170
|
|
|
@@ -207,6 +235,10 @@ service WorkflowService {
|
|
|
207
235
|
option (google.api.http) = {
|
|
208
236
|
post: "/namespaces/{namespace}/activities/heartbeat"
|
|
209
237
|
body: "*"
|
|
238
|
+
additional_bindings {
|
|
239
|
+
post: "/api/v1/namespaces/{namespace}/activities/heartbeat"
|
|
240
|
+
body: "*"
|
|
241
|
+
}
|
|
210
242
|
};
|
|
211
243
|
}
|
|
212
244
|
|
|
@@ -219,6 +251,10 @@ service WorkflowService {
|
|
|
219
251
|
option (google.api.http) = {
|
|
220
252
|
post: "/namespaces/{namespace}/activities/heartbeat-by-id"
|
|
221
253
|
body: "*"
|
|
254
|
+
additional_bindings {
|
|
255
|
+
post: "/api/v1/namespaces/{namespace}/activities/heartbeat-by-id"
|
|
256
|
+
body: "*"
|
|
257
|
+
}
|
|
222
258
|
};
|
|
223
259
|
}
|
|
224
260
|
|
|
@@ -232,6 +268,10 @@ service WorkflowService {
|
|
|
232
268
|
option (google.api.http) = {
|
|
233
269
|
post: "/namespaces/{namespace}/activities/complete"
|
|
234
270
|
body: "*"
|
|
271
|
+
additional_bindings {
|
|
272
|
+
post: "/api/v1/namespaces/{namespace}/activities/complete"
|
|
273
|
+
body: "*"
|
|
274
|
+
}
|
|
235
275
|
};
|
|
236
276
|
}
|
|
237
277
|
|
|
@@ -244,6 +284,10 @@ service WorkflowService {
|
|
|
244
284
|
option (google.api.http) = {
|
|
245
285
|
post: "/namespaces/{namespace}/activities/complete-by-id"
|
|
246
286
|
body: "*"
|
|
287
|
+
additional_bindings {
|
|
288
|
+
post: "/api/v1/namespaces/{namespace}/activities/complete-by-id"
|
|
289
|
+
body: "*"
|
|
290
|
+
}
|
|
247
291
|
};
|
|
248
292
|
}
|
|
249
293
|
|
|
@@ -256,6 +300,10 @@ service WorkflowService {
|
|
|
256
300
|
option (google.api.http) = {
|
|
257
301
|
post: "/namespaces/{namespace}/activities/fail"
|
|
258
302
|
body: "*"
|
|
303
|
+
additional_bindings {
|
|
304
|
+
post: "/api/v1/namespaces/{namespace}/activities/fail"
|
|
305
|
+
body: "*"
|
|
306
|
+
}
|
|
259
307
|
};
|
|
260
308
|
}
|
|
261
309
|
|
|
@@ -268,6 +316,10 @@ service WorkflowService {
|
|
|
268
316
|
option (google.api.http) = {
|
|
269
317
|
post: "/namespaces/{namespace}/activities/fail-by-id"
|
|
270
318
|
body: "*"
|
|
319
|
+
additional_bindings {
|
|
320
|
+
post: "/api/v1/namespaces/{namespace}/activities/fail-by-id"
|
|
321
|
+
body: "*"
|
|
322
|
+
}
|
|
271
323
|
};
|
|
272
324
|
}
|
|
273
325
|
|
|
@@ -280,6 +332,10 @@ service WorkflowService {
|
|
|
280
332
|
option (google.api.http) = {
|
|
281
333
|
post: "/namespaces/{namespace}/activities/cancel"
|
|
282
334
|
body: "*"
|
|
335
|
+
additional_bindings {
|
|
336
|
+
post: "/api/v1/namespaces/{namespace}/activities/cancel"
|
|
337
|
+
body: "*"
|
|
338
|
+
}
|
|
283
339
|
};
|
|
284
340
|
}
|
|
285
341
|
|
|
@@ -292,6 +348,10 @@ service WorkflowService {
|
|
|
292
348
|
option (google.api.http) = {
|
|
293
349
|
post: "/namespaces/{namespace}/activities/cancel-by-id"
|
|
294
350
|
body: "*"
|
|
351
|
+
additional_bindings {
|
|
352
|
+
post: "/api/v1/namespaces/{namespace}/activities/cancel-by-id"
|
|
353
|
+
body: "*"
|
|
354
|
+
}
|
|
295
355
|
};
|
|
296
356
|
}
|
|
297
357
|
|
|
@@ -305,6 +365,10 @@ service WorkflowService {
|
|
|
305
365
|
option (google.api.http) = {
|
|
306
366
|
post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel"
|
|
307
367
|
body: "*"
|
|
368
|
+
additional_bindings {
|
|
369
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel"
|
|
370
|
+
body: "*"
|
|
371
|
+
}
|
|
308
372
|
};
|
|
309
373
|
}
|
|
310
374
|
|
|
@@ -316,6 +380,10 @@ service WorkflowService {
|
|
|
316
380
|
option (google.api.http) = {
|
|
317
381
|
post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}"
|
|
318
382
|
body: "*"
|
|
383
|
+
additional_bindings {
|
|
384
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}"
|
|
385
|
+
body: "*"
|
|
386
|
+
}
|
|
319
387
|
};
|
|
320
388
|
}
|
|
321
389
|
|
|
@@ -335,6 +403,10 @@ service WorkflowService {
|
|
|
335
403
|
option (google.api.http) = {
|
|
336
404
|
post: "/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}"
|
|
337
405
|
body: "*"
|
|
406
|
+
additional_bindings {
|
|
407
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}"
|
|
408
|
+
body: "*"
|
|
409
|
+
}
|
|
338
410
|
};
|
|
339
411
|
}
|
|
340
412
|
|
|
@@ -346,6 +418,10 @@ service WorkflowService {
|
|
|
346
418
|
option (google.api.http) = {
|
|
347
419
|
post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset"
|
|
348
420
|
body: "*"
|
|
421
|
+
additional_bindings {
|
|
422
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset"
|
|
423
|
+
body: "*"
|
|
424
|
+
}
|
|
349
425
|
};
|
|
350
426
|
}
|
|
351
427
|
|
|
@@ -356,6 +432,10 @@ service WorkflowService {
|
|
|
356
432
|
option (google.api.http) = {
|
|
357
433
|
post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate"
|
|
358
434
|
body: "*"
|
|
435
|
+
additional_bindings {
|
|
436
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate"
|
|
437
|
+
body: "*"
|
|
438
|
+
}
|
|
359
439
|
};
|
|
360
440
|
}
|
|
361
441
|
|
|
@@ -384,6 +464,9 @@ service WorkflowService {
|
|
|
384
464
|
rpc ListWorkflowExecutions (ListWorkflowExecutionsRequest) returns (ListWorkflowExecutionsResponse) {
|
|
385
465
|
option (google.api.http) = {
|
|
386
466
|
get: "/namespaces/{namespace}/workflows"
|
|
467
|
+
additional_bindings {
|
|
468
|
+
get: "/api/v1/namespaces/{namespace}/workflows"
|
|
469
|
+
}
|
|
387
470
|
};
|
|
388
471
|
}
|
|
389
472
|
|
|
@@ -391,6 +474,9 @@ service WorkflowService {
|
|
|
391
474
|
rpc ListArchivedWorkflowExecutions (ListArchivedWorkflowExecutionsRequest) returns (ListArchivedWorkflowExecutionsResponse) {
|
|
392
475
|
option (google.api.http) = {
|
|
393
476
|
get: "/namespaces/{namespace}/archived-workflows"
|
|
477
|
+
additional_bindings {
|
|
478
|
+
get: "/api/v1/namespaces/{namespace}/archived-workflows"
|
|
479
|
+
}
|
|
394
480
|
};
|
|
395
481
|
}
|
|
396
482
|
|
|
@@ -405,6 +491,9 @@ service WorkflowService {
|
|
|
405
491
|
rpc CountWorkflowExecutions (CountWorkflowExecutionsRequest) returns (CountWorkflowExecutionsResponse) {
|
|
406
492
|
option (google.api.http) = {
|
|
407
493
|
get: "/namespaces/{namespace}/workflow-count"
|
|
494
|
+
additional_bindings {
|
|
495
|
+
get: "/api/v1/namespaces/{namespace}/workflow-count"
|
|
496
|
+
}
|
|
408
497
|
};
|
|
409
498
|
}
|
|
410
499
|
|
|
@@ -432,16 +521,40 @@ service WorkflowService {
|
|
|
432
521
|
// 1. StickyTaskQueue
|
|
433
522
|
// 2. StickyScheduleToStartTimeout
|
|
434
523
|
//
|
|
524
|
+
// When possible, ShutdownWorker should be preferred over
|
|
525
|
+
// ResetStickyTaskQueue (particularly when a worker is shutting down or
|
|
526
|
+
// cycling).
|
|
527
|
+
//
|
|
435
528
|
// (-- api-linter: core::0127::http-annotation=disabled
|
|
436
529
|
// aip.dev/not-precedent: We do not expose worker API to HTTP. --)
|
|
437
530
|
rpc ResetStickyTaskQueue (ResetStickyTaskQueueRequest) returns (ResetStickyTaskQueueResponse) {
|
|
438
531
|
}
|
|
439
532
|
|
|
533
|
+
// ShutdownWorker is used to indicate that the given sticky task
|
|
534
|
+
// queue is no longer being polled by its worker. Following the completion of
|
|
535
|
+
// ShutdownWorker, newly-added workflow tasks will instead be placed
|
|
536
|
+
// in the normal task queue, eligible for any worker to pick up.
|
|
537
|
+
//
|
|
538
|
+
// ShutdownWorker should be called by workers while shutting down,
|
|
539
|
+
// after they've shut down their pollers. If another sticky poll
|
|
540
|
+
// request is issued, the sticky task queue will be revived.
|
|
541
|
+
//
|
|
542
|
+
// As of Temporal Server v1.25.0, ShutdownWorker hasn't yet been implemented.
|
|
543
|
+
//
|
|
544
|
+
// (-- api-linter: core::0127::http-annotation=disabled
|
|
545
|
+
// aip.dev/not-precedent: We do not expose worker API to HTTP. --)
|
|
546
|
+
rpc ShutdownWorker (ShutdownWorkerRequest) returns (ShutdownWorkerResponse) {
|
|
547
|
+
}
|
|
548
|
+
|
|
440
549
|
// QueryWorkflow requests a query be executed for a specified workflow execution.
|
|
441
550
|
rpc QueryWorkflow (QueryWorkflowRequest) returns (QueryWorkflowResponse) {
|
|
442
551
|
option (google.api.http) = {
|
|
443
552
|
post: "/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}"
|
|
444
553
|
body: "*"
|
|
554
|
+
additional_bindings {
|
|
555
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}"
|
|
556
|
+
body: "*"
|
|
557
|
+
}
|
|
445
558
|
};
|
|
446
559
|
}
|
|
447
560
|
|
|
@@ -449,6 +562,9 @@ service WorkflowService {
|
|
|
449
562
|
rpc DescribeWorkflowExecution (DescribeWorkflowExecutionRequest) returns (DescribeWorkflowExecutionResponse) {
|
|
450
563
|
option (google.api.http) = {
|
|
451
564
|
get: "/namespaces/{namespace}/workflows/{execution.workflow_id}"
|
|
565
|
+
additional_bindings {
|
|
566
|
+
get: "/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}"
|
|
567
|
+
}
|
|
452
568
|
};
|
|
453
569
|
}
|
|
454
570
|
|
|
@@ -459,13 +575,19 @@ service WorkflowService {
|
|
|
459
575
|
rpc DescribeTaskQueue (DescribeTaskQueueRequest) returns (DescribeTaskQueueResponse) {
|
|
460
576
|
option (google.api.http) = {
|
|
461
577
|
get: "/namespaces/{namespace}/task-queues/{task_queue.name}"
|
|
578
|
+
additional_bindings {
|
|
579
|
+
get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue.name}"
|
|
580
|
+
}
|
|
462
581
|
};
|
|
463
582
|
}
|
|
464
583
|
|
|
465
584
|
// GetClusterInfo returns information about temporal cluster
|
|
466
585
|
rpc GetClusterInfo(GetClusterInfoRequest) returns (GetClusterInfoResponse) {
|
|
467
586
|
option (google.api.http) = {
|
|
468
|
-
get: "/cluster
|
|
587
|
+
get: "/cluster"
|
|
588
|
+
additional_bindings {
|
|
589
|
+
get: "/api/v1/cluster-info"
|
|
590
|
+
}
|
|
469
591
|
};
|
|
470
592
|
}
|
|
471
593
|
|
|
@@ -473,6 +595,9 @@ service WorkflowService {
|
|
|
473
595
|
rpc GetSystemInfo(GetSystemInfoRequest) returns (GetSystemInfoResponse) {
|
|
474
596
|
option (google.api.http) = {
|
|
475
597
|
get: "/system-info"
|
|
598
|
+
additional_bindings {
|
|
599
|
+
get: "/api/v1/system-info"
|
|
600
|
+
}
|
|
476
601
|
};
|
|
477
602
|
}
|
|
478
603
|
|
|
@@ -486,6 +611,10 @@ service WorkflowService {
|
|
|
486
611
|
option (google.api.http) = {
|
|
487
612
|
post: "/namespaces/{namespace}/schedules/{schedule_id}"
|
|
488
613
|
body: "*"
|
|
614
|
+
additional_bindings {
|
|
615
|
+
post: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}"
|
|
616
|
+
body: "*"
|
|
617
|
+
}
|
|
489
618
|
};
|
|
490
619
|
}
|
|
491
620
|
|
|
@@ -493,6 +622,9 @@ service WorkflowService {
|
|
|
493
622
|
rpc DescribeSchedule (DescribeScheduleRequest) returns (DescribeScheduleResponse) {
|
|
494
623
|
option (google.api.http) = {
|
|
495
624
|
get: "/namespaces/{namespace}/schedules/{schedule_id}"
|
|
625
|
+
additional_bindings {
|
|
626
|
+
get: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}"
|
|
627
|
+
}
|
|
496
628
|
};
|
|
497
629
|
}
|
|
498
630
|
|
|
@@ -501,6 +633,10 @@ service WorkflowService {
|
|
|
501
633
|
option (google.api.http) = {
|
|
502
634
|
post: "/namespaces/{namespace}/schedules/{schedule_id}/update"
|
|
503
635
|
body: "*"
|
|
636
|
+
additional_bindings {
|
|
637
|
+
post: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/update"
|
|
638
|
+
body: "*"
|
|
639
|
+
}
|
|
504
640
|
};
|
|
505
641
|
}
|
|
506
642
|
|
|
@@ -509,6 +645,10 @@ service WorkflowService {
|
|
|
509
645
|
option (google.api.http) = {
|
|
510
646
|
post: "/namespaces/{namespace}/schedules/{schedule_id}/patch"
|
|
511
647
|
body: "*"
|
|
648
|
+
additional_bindings {
|
|
649
|
+
post: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/patch"
|
|
650
|
+
body: "*"
|
|
651
|
+
}
|
|
512
652
|
};
|
|
513
653
|
}
|
|
514
654
|
|
|
@@ -516,6 +656,9 @@ service WorkflowService {
|
|
|
516
656
|
rpc ListScheduleMatchingTimes (ListScheduleMatchingTimesRequest) returns (ListScheduleMatchingTimesResponse) {
|
|
517
657
|
option (google.api.http) = {
|
|
518
658
|
get: "/namespaces/{namespace}/schedules/{schedule_id}/matching-times"
|
|
659
|
+
additional_bindings {
|
|
660
|
+
get: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times"
|
|
661
|
+
}
|
|
519
662
|
};
|
|
520
663
|
}
|
|
521
664
|
|
|
@@ -523,6 +666,9 @@ service WorkflowService {
|
|
|
523
666
|
rpc DeleteSchedule (DeleteScheduleRequest) returns (DeleteScheduleResponse) {
|
|
524
667
|
option (google.api.http) = {
|
|
525
668
|
delete: "/namespaces/{namespace}/schedules/{schedule_id}"
|
|
669
|
+
additional_bindings {
|
|
670
|
+
delete: "/api/v1/namespaces/{namespace}/schedules/{schedule_id}"
|
|
671
|
+
}
|
|
526
672
|
};
|
|
527
673
|
}
|
|
528
674
|
|
|
@@ -530,6 +676,9 @@ service WorkflowService {
|
|
|
530
676
|
rpc ListSchedules (ListSchedulesRequest) returns (ListSchedulesResponse) {
|
|
531
677
|
option (google.api.http) = {
|
|
532
678
|
get: "/namespaces/{namespace}/schedules"
|
|
679
|
+
additional_bindings {
|
|
680
|
+
get: "/api/v1/namespaces/{namespace}/schedules"
|
|
681
|
+
}
|
|
533
682
|
};
|
|
534
683
|
}
|
|
535
684
|
|
|
@@ -557,23 +706,27 @@ service WorkflowService {
|
|
|
557
706
|
rpc GetWorkerBuildIdCompatibility (GetWorkerBuildIdCompatibilityRequest) returns (GetWorkerBuildIdCompatibilityResponse) {
|
|
558
707
|
option (google.api.http) = {
|
|
559
708
|
get: "/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility"
|
|
709
|
+
additional_bindings {
|
|
710
|
+
get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility"
|
|
711
|
+
}
|
|
560
712
|
};
|
|
561
713
|
}
|
|
562
714
|
|
|
563
715
|
// Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of
|
|
564
716
|
// rules: Build ID Assignment rules and Compatible Build ID Redirect rules.
|
|
565
717
|
//
|
|
566
|
-
// Assignment rules
|
|
567
|
-
// use case is to specify the latest Build ID but
|
|
718
|
+
// Assignment rules determine how to assign new executions to a Build IDs. Their primary
|
|
719
|
+
// use case is to specify the latest Build ID but they have powerful features for gradual rollout
|
|
568
720
|
// of a new Build ID.
|
|
569
721
|
//
|
|
570
|
-
// Once a
|
|
722
|
+
// Once a workflow execution is assigned to a Build ID and it completes its first Workflow Task,
|
|
571
723
|
// the workflow stays on the assigned Build ID regardless of changes in assignment rules. This
|
|
572
724
|
// eliminates the need for compatibility between versions when you only care about using the new
|
|
573
725
|
// version for new workflows and let existing workflows finish in their own version.
|
|
574
726
|
//
|
|
575
|
-
// Activities, Child Workflows and Continue-as-New executions have the option to inherit
|
|
576
|
-
// parent/previous workflow or use the latest
|
|
727
|
+
// Activities, Child Workflows and Continue-as-New executions have the option to inherit the
|
|
728
|
+
// Build ID of their parent/previous workflow or use the latest assignment rules to independently
|
|
729
|
+
// select a Build ID.
|
|
577
730
|
//
|
|
578
731
|
// Redirect rules should only be used when you want to move workflows and activities assigned to
|
|
579
732
|
// one Build ID (source) to another compatible Build ID (target). You are responsible to make sure
|
|
@@ -590,6 +743,9 @@ service WorkflowService {
|
|
|
590
743
|
rpc GetWorkerVersioningRules (GetWorkerVersioningRulesRequest) returns (GetWorkerVersioningRulesResponse) {
|
|
591
744
|
option (google.api.http) = {
|
|
592
745
|
get: "/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules"
|
|
746
|
+
additional_bindings {
|
|
747
|
+
get: "/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules"
|
|
748
|
+
}
|
|
593
749
|
};
|
|
594
750
|
}
|
|
595
751
|
|
|
@@ -610,18 +766,25 @@ service WorkflowService {
|
|
|
610
766
|
rpc GetWorkerTaskReachability (GetWorkerTaskReachabilityRequest) returns (GetWorkerTaskReachabilityResponse) {
|
|
611
767
|
option (google.api.http) = {
|
|
612
768
|
get: "/namespaces/{namespace}/worker-task-reachability"
|
|
769
|
+
additional_bindings {
|
|
770
|
+
get: "/api/v1/namespaces/{namespace}/worker-task-reachability"
|
|
771
|
+
}
|
|
613
772
|
};
|
|
614
773
|
}
|
|
615
774
|
|
|
616
|
-
// Invokes the specified
|
|
775
|
+
// Invokes the specified Update function on user Workflow code.
|
|
617
776
|
rpc UpdateWorkflowExecution(UpdateWorkflowExecutionRequest) returns (UpdateWorkflowExecutionResponse) {
|
|
618
777
|
option (google.api.http) = {
|
|
619
778
|
post: "/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}"
|
|
620
779
|
body: "*"
|
|
780
|
+
additional_bindings {
|
|
781
|
+
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}"
|
|
782
|
+
body: "*"
|
|
783
|
+
}
|
|
621
784
|
};
|
|
622
785
|
}
|
|
623
786
|
|
|
624
|
-
// Polls a
|
|
787
|
+
// Polls a Workflow Execution for the outcome of a Workflow Update
|
|
625
788
|
// previously issued through the UpdateWorkflowExecution RPC. The effective
|
|
626
789
|
// timeout on this call will be shorter of the the caller-supplied gRPC
|
|
627
790
|
// timeout and the server's configured long-poll timeout.
|
|
@@ -636,6 +799,10 @@ service WorkflowService {
|
|
|
636
799
|
option (google.api.http) = {
|
|
637
800
|
post: "/namespaces/{namespace}/batch-operations/{job_id}"
|
|
638
801
|
body: "*"
|
|
802
|
+
additional_bindings {
|
|
803
|
+
post: "/api/v1/namespaces/{namespace}/batch-operations/{job_id}"
|
|
804
|
+
body: "*"
|
|
805
|
+
}
|
|
639
806
|
};
|
|
640
807
|
}
|
|
641
808
|
|
|
@@ -644,6 +811,10 @@ service WorkflowService {
|
|
|
644
811
|
option (google.api.http) = {
|
|
645
812
|
post: "/namespaces/{namespace}/batch-operations/{job_id}/stop"
|
|
646
813
|
body: "*"
|
|
814
|
+
additional_bindings {
|
|
815
|
+
post: "/api/v1/namespaces/{namespace}/batch-operations/{job_id}/stop"
|
|
816
|
+
body: "*"
|
|
817
|
+
}
|
|
647
818
|
};
|
|
648
819
|
}
|
|
649
820
|
|
|
@@ -651,6 +822,9 @@ service WorkflowService {
|
|
|
651
822
|
rpc DescribeBatchOperation(DescribeBatchOperationRequest) returns (DescribeBatchOperationResponse) {
|
|
652
823
|
option (google.api.http) = {
|
|
653
824
|
get: "/namespaces/{namespace}/batch-operations/{job_id}"
|
|
825
|
+
additional_bindings {
|
|
826
|
+
get: "/api/v1/namespaces/{namespace}/batch-operations/{job_id}"
|
|
827
|
+
}
|
|
654
828
|
};
|
|
655
829
|
}
|
|
656
830
|
|
|
@@ -658,6 +832,9 @@ service WorkflowService {
|
|
|
658
832
|
rpc ListBatchOperations(ListBatchOperationsRequest) returns (ListBatchOperationsResponse) {
|
|
659
833
|
option (google.api.http) = {
|
|
660
834
|
get: "/namespaces/{namespace}/batch-operations"
|
|
835
|
+
additional_bindings {
|
|
836
|
+
get: "/api/v1/namespaces/{namespace}/batch-operations"
|
|
837
|
+
}
|
|
661
838
|
};
|
|
662
839
|
}
|
|
663
840
|
|
|
@@ -678,4 +855,94 @@ service WorkflowService {
|
|
|
678
855
|
// aip.dev/not-precedent: We do not expose worker API to HTTP. --)
|
|
679
856
|
rpc RespondNexusTaskFailed(RespondNexusTaskFailedRequest) returns (RespondNexusTaskFailedResponse) {
|
|
680
857
|
}
|
|
858
|
+
|
|
859
|
+
// UpdateActivityOptionsById is called by the client to update the options of an activity
|
|
860
|
+
// (-- api-linter: core::0136::prepositions=disabled
|
|
861
|
+
// aip.dev/not-precedent: "By" is used to indicate request type. --)
|
|
862
|
+
rpc UpdateActivityOptionsById (UpdateActivityOptionsByIdRequest) returns (UpdateActivityOptionsByIdResponse) {
|
|
863
|
+
option (google.api.http) = {
|
|
864
|
+
post: "/namespaces/{namespace}/activities/update-options-by-id"
|
|
865
|
+
body: "*"
|
|
866
|
+
additional_bindings {
|
|
867
|
+
post: "/api/v1/namespaces/{namespace}/activities/update-options-by-id"
|
|
868
|
+
body: "*"
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
// PauseActivityById pauses the execution of an activity specified by its ID.
|
|
874
|
+
// Returns a `NotFound` error if there is no pending activity with the provided ID.
|
|
875
|
+
//
|
|
876
|
+
// Pausing an activity means:
|
|
877
|
+
// - If the activity is currently waiting for a retry or is running and subsequently fails,
|
|
878
|
+
// it will not be rescheduled until it is unpaused.
|
|
879
|
+
// - If the activity is already paused, calling this method will have no effect.
|
|
880
|
+
// - If the activity is running and finishes successfully, the activity will be completed.
|
|
881
|
+
// - If the activity is running and finishes with failure:
|
|
882
|
+
// * if there is no retry left - the activity will be completed.
|
|
883
|
+
// * if there are more retries left - the activity will be paused.
|
|
884
|
+
// For long-running activities:
|
|
885
|
+
// - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'.
|
|
886
|
+
// - The activity should respond to the cancellation accordingly.
|
|
887
|
+
// (-- api-linter: core::0136::prepositions=disabled
|
|
888
|
+
// aip.dev/not-precedent: "By" is used to indicate request type. --)
|
|
889
|
+
rpc PauseActivityById (PauseActivityByIdRequest) returns (PauseActivityByIdResponse) {
|
|
890
|
+
option (google.api.http) = {
|
|
891
|
+
post: "/namespaces/{namespace}/activities/pause-by-id"
|
|
892
|
+
body: "*"
|
|
893
|
+
additional_bindings {
|
|
894
|
+
post: "/api/v1/namespaces/{namespace}/activities/pause-by-id"
|
|
895
|
+
body: "*"
|
|
896
|
+
}
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
// UnpauseActivityById unpauses the execution of an activity specified by its ID.
|
|
901
|
+
// Returns a `NotFound` error if there is no pending activity with the provided ID.
|
|
902
|
+
// There are two 'modes' of unpausing an activity:
|
|
903
|
+
// 'resume' - If the activity is paused, it will be resumed and scheduled for execution.
|
|
904
|
+
// * If the activity is currently running Unpause with 'resume' has no effect.
|
|
905
|
+
// * if 'no_wait' flag is set and the activity is waiting, the activity will be scheduled immediately.
|
|
906
|
+
// 'reset' - If the activity is paused, it will be reset to its initial state and (depending on parameters) scheduled for execution.
|
|
907
|
+
// * If the activity is currently running, Unpause with 'reset' will reset the number of attempts.
|
|
908
|
+
// * if 'no_wait' flag is set, the activity will be scheduled immediately.
|
|
909
|
+
// * if 'reset_heartbeats' flag is set, the activity heartbeat timer and heartbeats will be reset.
|
|
910
|
+
// If the activity is in waiting for retry and past it retry timeout, it will be scheduled immediately.
|
|
911
|
+
// Once the activity is unpaused, all timeout timers will be regenerated.
|
|
912
|
+
// (-- api-linter: core::0136::prepositions=disabled
|
|
913
|
+
// aip.dev/not-precedent: "By" is used to indicate request type. --)
|
|
914
|
+
rpc UnpauseActivityById (UnpauseActivityByIdRequest) returns (UnpauseActivityByIdResponse) {
|
|
915
|
+
option (google.api.http) = {
|
|
916
|
+
post: "/namespaces/{namespace}/activities/unpause-by-id"
|
|
917
|
+
body: "*"
|
|
918
|
+
additional_bindings {
|
|
919
|
+
post: "/api/v1/namespaces/{namespace}/activities/unpause-by-id"
|
|
920
|
+
body: "*"
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
// ResetActivityById unpauses the execution of an activity specified by its ID.
|
|
926
|
+
// Returns a `NotFound` error if there is no pending activity with the provided ID.
|
|
927
|
+
// Resetting an activity means:
|
|
928
|
+
// * number of attempts will be reset to 0.
|
|
929
|
+
// * activity timeouts will be resetted.
|
|
930
|
+
// If the activity currently running:
|
|
931
|
+
// * if 'no_wait' flag is provided, a new instance of the activity will be scheduled immediately.
|
|
932
|
+
// * if 'no_wait' flag is not provided, a new instance of the activity will be scheduled after current instance completes if needed.
|
|
933
|
+
// If 'reset_heartbeats' flag is set, the activity heartbeat timer and heartbeats will be reset.
|
|
934
|
+
// (-- api-linter: core::0136::prepositions=disabled
|
|
935
|
+
// aip.dev/not-precedent: "By" is used to indicate request type. --)
|
|
936
|
+
rpc ResetActivityById (ResetActivityByIdRequest) returns (ResetActivityByIdResponse) {
|
|
937
|
+
option (google.api.http) = {
|
|
938
|
+
post: "/namespaces/{namespace}/activities/reset-by-id"
|
|
939
|
+
body: "*"
|
|
940
|
+
additional_bindings {
|
|
941
|
+
post: "/api/v1/namespaces/{namespace}/activities/reset-by-id"
|
|
942
|
+
body: "*"
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
|
|
681
947
|
}
|
|
948
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package coresdk.activity_result;
|
|
4
|
-
option ruby_package = "Temporalio::Bridge::Api::ActivityResult";
|
|
4
|
+
option ruby_package = "Temporalio::Internal::Bridge::Api::ActivityResult";
|
|
5
5
|
|
|
6
6
|
import "google/protobuf/duration.proto";
|
|
7
7
|
import "google/protobuf/timestamp.proto";
|
package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/activity_task/activity_task.proto
CHANGED
|
@@ -4,7 +4,7 @@ syntax = "proto3";
|
|
|
4
4
|
* Definitions of the different activity tasks returned from [crate::Core::poll_task].
|
|
5
5
|
*/
|
|
6
6
|
package coresdk.activity_task;
|
|
7
|
-
option ruby_package = "Temporalio::Bridge::Api::ActivityTask";
|
|
7
|
+
option ruby_package = "Temporalio::Internal::Bridge::Api::ActivityTask";
|
|
8
8
|
|
|
9
9
|
import "google/protobuf/duration.proto";
|
|
10
10
|
import "google/protobuf/timestamp.proto";
|
package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package coresdk.child_workflow;
|
|
4
|
-
option ruby_package = "Temporalio::Bridge::Api::ChildWorkflow";
|
|
4
|
+
option ruby_package = "Temporalio::Internal::Bridge::Api::ChildWorkflow";
|
|
5
5
|
|
|
6
6
|
import "temporal/api/common/v1/message.proto";
|
|
7
7
|
import "temporal/api/failure/v1/message.proto";
|