@temporalio/core-bridge 1.10.3 → 1.11.0

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.
Files changed (126) hide show
  1. package/Cargo.lock +563 -676
  2. package/Cargo.toml +3 -3
  3. package/lib/index.d.ts +16 -5
  4. package/lib/index.js.map +1 -1
  5. package/lib/worker-tuner.d.ts +57 -0
  6. package/lib/worker-tuner.js +3 -0
  7. package/lib/worker-tuner.js.map +1 -0
  8. package/package.json +3 -3
  9. package/releases/aarch64-apple-darwin/index.node +0 -0
  10. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  11. package/releases/x86_64-apple-darwin/index.node +0 -0
  12. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  13. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  14. package/sdk-core/.github/workflows/heavy.yml +6 -11
  15. package/sdk-core/.github/workflows/per-pr.yml +23 -41
  16. package/sdk-core/Cargo.toml +5 -5
  17. package/sdk-core/README.md +2 -0
  18. package/sdk-core/client/Cargo.toml +4 -2
  19. package/sdk-core/client/src/lib.rs +60 -17
  20. package/sdk-core/client/src/metrics.rs +1 -1
  21. package/sdk-core/client/src/proxy.rs +17 -12
  22. package/sdk-core/client/src/raw.rs +218 -69
  23. package/sdk-core/client/src/retry.rs +19 -9
  24. package/sdk-core/core/Cargo.toml +12 -12
  25. package/sdk-core/core/src/abstractions.rs +3 -3
  26. package/sdk-core/core/src/core_tests/activity_tasks.rs +2 -1
  27. package/sdk-core/core/src/core_tests/determinism.rs +1 -1
  28. package/sdk-core/core/src/core_tests/local_activities.rs +73 -10
  29. package/sdk-core/core/src/core_tests/queries.rs +2 -1
  30. package/sdk-core/core/src/core_tests/updates.rs +162 -4
  31. package/sdk-core/core/src/core_tests/workers.rs +38 -2
  32. package/sdk-core/core/src/core_tests/workflow_tasks.rs +158 -27
  33. package/sdk-core/core/src/internal_flags.rs +17 -7
  34. package/sdk-core/core/src/lib.rs +9 -3
  35. package/sdk-core/core/src/pollers/poll_buffer.rs +1 -10
  36. package/sdk-core/core/src/protosext/mod.rs +0 -1
  37. package/sdk-core/core/src/protosext/protocol_messages.rs +105 -16
  38. package/sdk-core/core/src/retry_logic.rs +22 -2
  39. package/sdk-core/core/src/telemetry/otel.rs +44 -12
  40. package/sdk-core/core/src/test_help/mod.rs +65 -12
  41. package/sdk-core/core/src/worker/activities/local_activities.rs +1 -4
  42. package/sdk-core/core/src/worker/activities.rs +3 -4
  43. package/sdk-core/core/src/worker/client/mocks.rs +7 -6
  44. package/sdk-core/core/src/worker/client.rs +11 -2
  45. package/sdk-core/core/src/worker/mod.rs +49 -24
  46. package/sdk-core/core/src/worker/tuner/resource_based.rs +48 -48
  47. package/sdk-core/core/src/worker/tuner.rs +124 -4
  48. package/sdk-core/core/src/worker/workflow/driven_workflow.rs +1 -1
  49. package/sdk-core/core/src/worker/workflow/history_update.rs +11 -2
  50. package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +18 -3
  51. package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +1 -0
  52. package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +1 -0
  53. package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +1 -0
  54. package/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +1 -0
  55. package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +1 -0
  56. package/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +1 -0
  57. package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +4 -4
  58. package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +1 -0
  59. package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +1 -0
  60. package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +1 -0
  61. package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +3 -1
  62. package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +38 -28
  63. package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +4 -2
  64. package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +95 -71
  65. package/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +1 -1
  66. package/sdk-core/core/src/worker/workflow/managed_run.rs +214 -14
  67. package/sdk-core/core/src/worker/workflow/mod.rs +49 -36
  68. package/sdk-core/core/src/worker/workflow/workflow_stream.rs +1 -2
  69. package/sdk-core/core-api/src/errors.rs +13 -7
  70. package/sdk-core/core-api/src/lib.rs +9 -1
  71. package/sdk-core/sdk/Cargo.toml +1 -1
  72. package/sdk-core/sdk/src/activity_context.rs +3 -4
  73. package/sdk-core/sdk/src/lib.rs +96 -49
  74. package/sdk-core/sdk/src/workflow_context/options.rs +8 -4
  75. package/sdk-core/sdk/src/workflow_context.rs +53 -49
  76. package/sdk-core/sdk/src/workflow_future.rs +10 -4
  77. package/sdk-core/sdk-core-protos/Cargo.toml +4 -3
  78. package/sdk-core/sdk-core-protos/build.rs +2 -0
  79. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/.github/workflows/build.yaml +18 -0
  80. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/LICENSE +21 -0
  81. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/Makefile +59 -0
  82. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/README.md +25 -0
  83. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/VERSION +1 -0
  84. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/buf.gen.yaml +14 -0
  85. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/buf.lock +8 -0
  86. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/buf.yaml +9 -0
  87. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/request_response.proto +520 -0
  88. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/service.proto +263 -0
  89. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/identity/v1/message.proto +173 -0
  90. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/namespace/v1/message.proto +164 -0
  91. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/operation/v1/message.proto +36 -0
  92. package/sdk-core/sdk-core-protos/protos/api_cloud_upstream/temporal/api/cloud/region/v1/message.proto +22 -0
  93. package/sdk-core/sdk-core-protos/protos/api_upstream/.github/workflows/trigger-api-go-update.yml +50 -8
  94. package/sdk-core/sdk-core-protos/protos/api_upstream/.gitmodules +3 -0
  95. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +132 -54
  96. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +177 -81
  97. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +13 -0
  98. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +2 -0
  99. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +8 -3
  100. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +10 -0
  101. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +3 -3
  102. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +6 -6
  103. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/enhanced_stack_trace.proto +96 -0
  104. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/user_metadata.proto +49 -0
  105. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +6 -7
  106. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +55 -24
  107. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +7 -0
  108. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +21 -4
  109. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +64 -45
  110. package/sdk-core/sdk-core-protos/src/history_builder.rs +8 -1
  111. package/sdk-core/sdk-core-protos/src/lib.rs +40 -10
  112. package/sdk-core/test-utils/src/canned_histories.rs +1 -1
  113. package/sdk-core/tests/fuzzy_workflow.rs +4 -2
  114. package/sdk-core/tests/heavy_tests.rs +3 -3
  115. package/sdk-core/tests/integ_tests/activity_functions.rs +2 -2
  116. package/sdk-core/tests/integ_tests/client_tests.rs +234 -6
  117. package/sdk-core/tests/integ_tests/update_tests.rs +180 -47
  118. package/sdk-core/tests/integ_tests/worker_tests.rs +32 -0
  119. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +47 -3
  120. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +10 -10
  121. package/sdk-core/tests/main.rs +1 -0
  122. package/src/conversions.rs +84 -11
  123. package/src/runtime.rs +5 -17
  124. package/src/worker.rs +27 -6
  125. package/ts/index.ts +24 -5
  126. package/ts/worker-tuner.ts +71 -0
@@ -6,7 +6,7 @@ info:
6
6
  title: ""
7
7
  version: 0.0.1
8
8
  paths:
9
- /api/v1/cluster-info:
9
+ /cluster-info:
10
10
  get:
11
11
  tags:
12
12
  - WorkflowService
@@ -25,7 +25,7 @@ paths:
25
25
  application/json:
26
26
  schema:
27
27
  $ref: '#/components/schemas/Status'
28
- /api/v1/namespaces:
28
+ /namespaces:
29
29
  get:
30
30
  tags:
31
31
  - WorkflowService
@@ -93,7 +93,7 @@ paths:
93
93
  application/json:
94
94
  schema:
95
95
  $ref: '#/components/schemas/Status'
96
- /api/v1/namespaces/{namespace}:
96
+ /namespaces/{namespace}:
97
97
  get:
98
98
  tags:
99
99
  - WorkflowService
@@ -122,7 +122,7 @@ paths:
122
122
  application/json:
123
123
  schema:
124
124
  $ref: '#/components/schemas/Status'
125
- /api/v1/namespaces/{namespace}/activities/cancel:
125
+ /namespaces/{namespace}/activities/cancel:
126
126
  post:
127
127
  tags:
128
128
  - WorkflowService
@@ -158,7 +158,7 @@ paths:
158
158
  application/json:
159
159
  schema:
160
160
  $ref: '#/components/schemas/Status'
161
- /api/v1/namespaces/{namespace}/activities/cancel-by-id:
161
+ /namespaces/{namespace}/activities/cancel-by-id:
162
162
  post:
163
163
  tags:
164
164
  - WorkflowService
@@ -195,7 +195,7 @@ paths:
195
195
  application/json:
196
196
  schema:
197
197
  $ref: '#/components/schemas/Status'
198
- /api/v1/namespaces/{namespace}/activities/complete:
198
+ /namespaces/{namespace}/activities/complete:
199
199
  post:
200
200
  tags:
201
201
  - WorkflowService
@@ -232,7 +232,7 @@ paths:
232
232
  application/json:
233
233
  schema:
234
234
  $ref: '#/components/schemas/Status'
235
- /api/v1/namespaces/{namespace}/activities/complete-by-id:
235
+ /namespaces/{namespace}/activities/complete-by-id:
236
236
  post:
237
237
  tags:
238
238
  - WorkflowService
@@ -269,7 +269,7 @@ paths:
269
269
  application/json:
270
270
  schema:
271
271
  $ref: '#/components/schemas/Status'
272
- /api/v1/namespaces/{namespace}/activities/fail:
272
+ /namespaces/{namespace}/activities/fail:
273
273
  post:
274
274
  tags:
275
275
  - WorkflowService
@@ -305,7 +305,7 @@ paths:
305
305
  application/json:
306
306
  schema:
307
307
  $ref: '#/components/schemas/Status'
308
- /api/v1/namespaces/{namespace}/activities/fail-by-id:
308
+ /namespaces/{namespace}/activities/fail-by-id:
309
309
  post:
310
310
  tags:
311
311
  - WorkflowService
@@ -342,7 +342,7 @@ paths:
342
342
  application/json:
343
343
  schema:
344
344
  $ref: '#/components/schemas/Status'
345
- /api/v1/namespaces/{namespace}/activities/heartbeat:
345
+ /namespaces/{namespace}/activities/heartbeat:
346
346
  post:
347
347
  tags:
348
348
  - WorkflowService
@@ -379,7 +379,7 @@ paths:
379
379
  application/json:
380
380
  schema:
381
381
  $ref: '#/components/schemas/Status'
382
- /api/v1/namespaces/{namespace}/activities/heartbeat-by-id:
382
+ /namespaces/{namespace}/activities/heartbeat-by-id:
383
383
  post:
384
384
  tags:
385
385
  - WorkflowService
@@ -416,7 +416,7 @@ paths:
416
416
  application/json:
417
417
  schema:
418
418
  $ref: '#/components/schemas/Status'
419
- /api/v1/namespaces/{namespace}/archived-workflows:
419
+ /namespaces/{namespace}/archived-workflows:
420
420
  get:
421
421
  tags:
422
422
  - WorkflowService
@@ -455,7 +455,7 @@ paths:
455
455
  application/json:
456
456
  schema:
457
457
  $ref: '#/components/schemas/Status'
458
- /api/v1/namespaces/{namespace}/batch-operations:
458
+ /namespaces/{namespace}/batch-operations:
459
459
  get:
460
460
  tags:
461
461
  - WorkflowService
@@ -493,7 +493,7 @@ paths:
493
493
  application/json:
494
494
  schema:
495
495
  $ref: '#/components/schemas/Status'
496
- /api/v1/namespaces/{namespace}/batch-operations/{jobId}:
496
+ /namespaces/{namespace}/batch-operations/{jobId}:
497
497
  get:
498
498
  tags:
499
499
  - WorkflowService
@@ -562,7 +562,7 @@ paths:
562
562
  application/json:
563
563
  schema:
564
564
  $ref: '#/components/schemas/Status'
565
- /api/v1/namespaces/{namespace}/batch-operations/{jobId}/stop:
565
+ /namespaces/{namespace}/batch-operations/{jobId}/stop:
566
566
  post:
567
567
  tags:
568
568
  - WorkflowService
@@ -600,7 +600,7 @@ paths:
600
600
  application/json:
601
601
  schema:
602
602
  $ref: '#/components/schemas/Status'
603
- /api/v1/namespaces/{namespace}/schedules:
603
+ /namespaces/{namespace}/schedules:
604
604
  get:
605
605
  tags:
606
606
  - WorkflowService
@@ -643,7 +643,7 @@ paths:
643
643
  application/json:
644
644
  schema:
645
645
  $ref: '#/components/schemas/Status'
646
- /api/v1/namespaces/{namespace}/schedules/{scheduleId}:
646
+ /namespaces/{namespace}/schedules/{scheduleId}:
647
647
  get:
648
648
  tags:
649
649
  - WorkflowService
@@ -748,7 +748,7 @@ paths:
748
748
  application/json:
749
749
  schema:
750
750
  $ref: '#/components/schemas/Status'
751
- /api/v1/namespaces/{namespace}/schedules/{scheduleId}/matching-times:
751
+ /namespaces/{namespace}/schedules/{scheduleId}/matching-times:
752
752
  get:
753
753
  tags:
754
754
  - WorkflowService
@@ -791,7 +791,7 @@ paths:
791
791
  application/json:
792
792
  schema:
793
793
  $ref: '#/components/schemas/Status'
794
- /api/v1/namespaces/{namespace}/schedules/{scheduleId}/patch:
794
+ /namespaces/{namespace}/schedules/{scheduleId}/patch:
795
795
  post:
796
796
  tags:
797
797
  - WorkflowService
@@ -829,7 +829,7 @@ paths:
829
829
  application/json:
830
830
  schema:
831
831
  $ref: '#/components/schemas/Status'
832
- /api/v1/namespaces/{namespace}/schedules/{scheduleId}/update:
832
+ /namespaces/{namespace}/schedules/{scheduleId}/update:
833
833
  post:
834
834
  tags:
835
835
  - WorkflowService
@@ -867,7 +867,7 @@ paths:
867
867
  application/json:
868
868
  schema:
869
869
  $ref: '#/components/schemas/Status'
870
- /api/v1/namespaces/{namespace}/search-attributes:
870
+ /namespaces/{namespace}/search-attributes:
871
871
  get:
872
872
  tags:
873
873
  - OperatorService
@@ -892,7 +892,7 @@ paths:
892
892
  application/json:
893
893
  schema:
894
894
  $ref: '#/components/schemas/Status'
895
- /api/v1/namespaces/{namespace}/task-queues/{taskQueue}/worker-build-id-compatibility:
895
+ /namespaces/{namespace}/task-queues/{taskQueue}/worker-build-id-compatibility:
896
896
  get:
897
897
  tags:
898
898
  - WorkflowService
@@ -933,7 +933,7 @@ paths:
933
933
  application/json:
934
934
  schema:
935
935
  $ref: '#/components/schemas/Status'
936
- /api/v1/namespaces/{namespace}/task-queues/{taskQueue}/worker-versioning-rules:
936
+ /namespaces/{namespace}/task-queues/{taskQueue}/worker-versioning-rules:
937
937
  get:
938
938
  tags:
939
939
  - WorkflowService
@@ -965,7 +965,7 @@ paths:
965
965
  application/json:
966
966
  schema:
967
967
  $ref: '#/components/schemas/Status'
968
- /api/v1/namespaces/{namespace}/task-queues/{task_queue.name}:
968
+ /namespaces/{namespace}/task-queues/{task_queue.name}:
969
969
  get:
970
970
  tags:
971
971
  - WorkflowService
@@ -1066,12 +1066,14 @@ paths:
1066
1066
  - TASK_QUEUE_TYPE_NEXUS
1067
1067
  type: string
1068
1068
  format: enum
1069
+ - name: reportStats
1070
+ in: query
1071
+ description: Report stats for the requested task queue types and versions
1072
+ schema:
1073
+ type: boolean
1069
1074
  - name: reportPollers
1070
1075
  in: query
1071
- description: |-
1072
- Report backlog info for the requested task queue types and versions
1073
- bool report_backlog_info = 8;
1074
- Report list of pollers for requested task queue types and versions
1076
+ description: Report list of pollers for requested task queue types and versions
1075
1077
  schema:
1076
1078
  type: boolean
1077
1079
  - name: reportTaskReachability
@@ -1094,7 +1096,7 @@ paths:
1094
1096
  application/json:
1095
1097
  schema:
1096
1098
  $ref: '#/components/schemas/Status'
1097
- /api/v1/namespaces/{namespace}/update:
1099
+ /namespaces/{namespace}/update:
1098
1100
  post:
1099
1101
  tags:
1100
1102
  - WorkflowService
@@ -1127,7 +1129,7 @@ paths:
1127
1129
  application/json:
1128
1130
  schema:
1129
1131
  $ref: '#/components/schemas/Status'
1130
- /api/v1/namespaces/{namespace}/worker-task-reachability:
1132
+ /namespaces/{namespace}/worker-task-reachability:
1131
1133
  get:
1132
1134
  tags:
1133
1135
  - WorkflowService
@@ -1207,7 +1209,7 @@ paths:
1207
1209
  application/json:
1208
1210
  schema:
1209
1211
  $ref: '#/components/schemas/Status'
1210
- /api/v1/namespaces/{namespace}/workflow-count:
1212
+ /namespaces/{namespace}/workflow-count:
1211
1213
  get:
1212
1214
  tags:
1213
1215
  - WorkflowService
@@ -1236,7 +1238,7 @@ paths:
1236
1238
  application/json:
1237
1239
  schema:
1238
1240
  $ref: '#/components/schemas/Status'
1239
- /api/v1/namespaces/{namespace}/workflows:
1241
+ /namespaces/{namespace}/workflows:
1240
1242
  get:
1241
1243
  tags:
1242
1244
  - WorkflowService
@@ -1275,7 +1277,7 @@ paths:
1275
1277
  application/json:
1276
1278
  schema:
1277
1279
  $ref: '#/components/schemas/Status'
1278
- /api/v1/namespaces/{namespace}/workflows/execute-multi-operation:
1280
+ /namespaces/{namespace}/workflows/execute-multi-operation:
1279
1281
  post:
1280
1282
  tags:
1281
1283
  - WorkflowService
@@ -1315,7 +1317,7 @@ paths:
1315
1317
  application/json:
1316
1318
  schema:
1317
1319
  $ref: '#/components/schemas/Status'
1318
- /api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}:
1320
+ /namespaces/{namespace}/workflows/{execution.workflow_id}:
1319
1321
  get:
1320
1322
  tags:
1321
1323
  - WorkflowService
@@ -1353,7 +1355,7 @@ paths:
1353
1355
  application/json:
1354
1356
  schema:
1355
1357
  $ref: '#/components/schemas/Status'
1356
- /api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history:
1358
+ /namespaces/{namespace}/workflows/{execution.workflow_id}/history:
1357
1359
  get:
1358
1360
  tags:
1359
1361
  - WorkflowService
@@ -1429,7 +1431,7 @@ paths:
1429
1431
  application/json:
1430
1432
  schema:
1431
1433
  $ref: '#/components/schemas/Status'
1432
- /api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse:
1434
+ /namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse:
1433
1435
  get:
1434
1436
  tags:
1435
1437
  - WorkflowService
@@ -1477,7 +1479,7 @@ paths:
1477
1479
  application/json:
1478
1480
  schema:
1479
1481
  $ref: '#/components/schemas/Status'
1480
- /api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:
1482
+ /namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:
1481
1483
  post:
1482
1484
  tags:
1483
1485
  - WorkflowService
@@ -1518,7 +1520,7 @@ paths:
1518
1520
  application/json:
1519
1521
  schema:
1520
1522
  $ref: '#/components/schemas/Status'
1521
- /api/v1/namespaces/{namespace}/workflows/{workflowId}:
1523
+ /namespaces/{namespace}/workflows/{workflowId}:
1522
1524
  post:
1523
1525
  tags:
1524
1526
  - WorkflowService
@@ -1559,7 +1561,7 @@ paths:
1559
1561
  application/json:
1560
1562
  schema:
1561
1563
  $ref: '#/components/schemas/Status'
1562
- /api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}:
1564
+ /namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}:
1563
1565
  post:
1564
1566
  tags:
1565
1567
  - WorkflowService
@@ -1613,7 +1615,7 @@ paths:
1613
1615
  application/json:
1614
1616
  schema:
1615
1617
  $ref: '#/components/schemas/Status'
1616
- /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel:
1618
+ /namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel:
1617
1619
  post:
1618
1620
  tags:
1619
1621
  - WorkflowService
@@ -1655,7 +1657,7 @@ paths:
1655
1657
  application/json:
1656
1658
  schema:
1657
1659
  $ref: '#/components/schemas/Status'
1658
- /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:
1660
+ /namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:
1659
1661
  post:
1660
1662
  tags:
1661
1663
  - WorkflowService
@@ -1695,7 +1697,7 @@ paths:
1695
1697
  application/json:
1696
1698
  schema:
1697
1699
  $ref: '#/components/schemas/Status'
1698
- /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signalName}:
1700
+ /namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signalName}:
1699
1701
  post:
1700
1702
  tags:
1701
1703
  - WorkflowService
@@ -1741,7 +1743,7 @@ paths:
1741
1743
  application/json:
1742
1744
  schema:
1743
1745
  $ref: '#/components/schemas/Status'
1744
- /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:
1746
+ /namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:
1745
1747
  post:
1746
1748
  tags:
1747
1749
  - WorkflowService
@@ -1780,7 +1782,7 @@ paths:
1780
1782
  application/json:
1781
1783
  schema:
1782
1784
  $ref: '#/components/schemas/Status'
1783
- /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}:
1785
+ /namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}:
1784
1786
  post:
1785
1787
  tags:
1786
1788
  - WorkflowService
@@ -1822,7 +1824,7 @@ paths:
1822
1824
  application/json:
1823
1825
  schema:
1824
1826
  $ref: '#/components/schemas/Status'
1825
- /api/v1/nexus/endpoints:
1827
+ /nexus/endpoints:
1826
1828
  get:
1827
1829
  tags:
1828
1830
  - OperatorService
@@ -1895,7 +1897,7 @@ paths:
1895
1897
  application/json:
1896
1898
  schema:
1897
1899
  $ref: '#/components/schemas/Status'
1898
- /api/v1/nexus/endpoints/{id}:
1900
+ /nexus/endpoints/{id}:
1899
1901
  get:
1900
1902
  tags:
1901
1903
  - OperatorService
@@ -1951,7 +1953,7 @@ paths:
1951
1953
  application/json:
1952
1954
  schema:
1953
1955
  $ref: '#/components/schemas/Status'
1954
- /api/v1/nexus/endpoints/{id}/update:
1956
+ /nexus/endpoints/{id}/update:
1955
1957
  post:
1956
1958
  tags:
1957
1959
  - OperatorService
@@ -1988,7 +1990,7 @@ paths:
1988
1990
  application/json:
1989
1991
  schema:
1990
1992
  $ref: '#/components/schemas/Status'
1991
- /api/v1/system-info:
1993
+ /system-info:
1992
1994
  get:
1993
1995
  tags:
1994
1996
  - WorkflowService
@@ -2466,29 +2468,31 @@ components:
2466
2468
  where you want to send a certain portion of the traffic to the target
2467
2469
  Build ID.
2468
2470
  description: |-
2469
- These rules assign a Build ID to Unassigned Workflow Executions and
2470
- Activities.
2471
+ Assignment rules are applied to *new* Workflow and Activity executions at
2472
+ schedule time to assign them to a Build ID.
2471
2473
 
2472
- Specifically, assignment rules are applied to the following Executions or
2473
- Activities when they are scheduled in a Task Queue:
2474
- - Generally, any new Workflow Execution, except:
2475
- - When A Child Workflow or a Continue-As-New Execution inherits the
2476
- Build ID from its parent/previous execution by setting the
2477
- `inherit_build_id` flag.
2478
- - Workflow Executions started Eagerly are assigned to the Build ID of
2479
- the Starter.
2480
- - An Activity that is scheduled on a Task Queue different from the one
2481
- their Workflow runs on, unless the `use_workflow_build_id` flag is set.
2474
+ Assignment rules will not be used in the following cases:
2475
+ - Child Workflows or Continue-As-New Executions who inherit their
2476
+ parent/previous Workflow's assigned Build ID (by setting the
2477
+ `inherit_build_id` flag - default behavior in SDKs when the same Task Queue
2478
+ is used.)
2479
+ - An Activity that inherits the assigned Build ID of its Workflow (by
2480
+ setting the `use_workflow_build_id` flag - default behavior in SDKs
2481
+ when the same Task Queue is used.)
2482
2482
 
2483
2483
  In absence of (applicable) redirect rules (`CompatibleBuildIdRedirectRule`s)
2484
2484
  the task will be dispatched to Workers of the Build ID determined by the
2485
- assignment rules. Otherwise, the final Build ID will be determined by the
2486
- redirect rules.
2485
+ assignment rules (or inherited). Otherwise, the final Build ID will be
2486
+ determined by the redirect rules.
2487
+
2488
+ Once a Workflow completes its first Workflow Task in a particular Build ID it
2489
+ stays in that Build ID regardless of changes to assignment rules. Redirect
2490
+ rules can be used to move the workflow to another compatible Build ID.
2487
2491
 
2488
- When using Worker Versioning, in the steady state, for a given Task Queue,
2489
- there should typically be exactly one assignment rule to send all Unassigned
2490
- tasks to the latest Build ID. Existence of at least one such "unconditional"
2491
- rule at all times is enforce by the system, unless the `force` flag is used
2492
+ When using Worker Versioning on a Task Queue, in the steady state,
2493
+ there should typically be a single assignment rule to send all new executions
2494
+ to the latest Build ID. Existence of at least one such "unconditional"
2495
+ rule at all times is enforces by the system, unless the `force` flag is used
2492
2496
  by the user when replacing/deleting these rules (for exceptional cases).
2493
2497
 
2494
2498
  During a deployment, one or more additional rules can be added to assign a
@@ -2499,10 +2503,8 @@ components:
2499
2503
  applied and the rest will be ignored.
2500
2504
 
2501
2505
  In the event that no assignment rule is applicable on a task (or the Task
2502
- Queue is simply not versioned), the tasks will be sent to unversioned
2503
- workers, if available. Otherwise, they remain Unassigned, and will be
2504
- retried for assignment, or dispatch to unversioned workers, at a later time
2505
- depending on the availability of workers.
2506
+ Queue is simply not versioned), the tasks will be dispatched to an
2507
+ unversioned Worker.
2506
2508
  BuildIdReachability:
2507
2509
  type: object
2508
2510
  properties:
@@ -2825,6 +2827,11 @@ components:
2825
2827
  type: string
2826
2828
  targetBuildId:
2827
2829
  type: string
2830
+ description: |-
2831
+ Target Build ID must be compatible with the Source Build ID; that is it
2832
+ must be able to process event histories made by the Source Build ID by
2833
+ using [Patching](https://docs.temporal.io/workflows#patching) or other
2834
+ means.
2828
2835
  description: |-
2829
2836
  These rules apply to tasks assigned to a particular Build ID
2830
2837
  (`source_build_id`) to redirect them to another *compatible* Build ID
@@ -2845,8 +2852,7 @@ components:
2845
2852
  - To be able to Reset an old Execution so it can run on the current
2846
2853
  (compatible) Build ID.
2847
2854
 
2848
- Redirect rules can be chained, but only the last rule in the chain can have
2849
- a ramp.
2855
+ Redirect rules can be chained.
2850
2856
  CompatibleVersionSet:
2851
2857
  type: object
2852
2858
  properties:
@@ -3145,12 +3151,8 @@ components:
3145
3151
  description: |-
3146
3152
  Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`.
3147
3153
  Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail.
3148
- description:
3149
- allOf:
3150
- - $ref: '#/components/schemas/Payload'
3151
- description: |-
3152
- Markdown description serialized as a single JSON string.
3153
- If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint.
3154
+ metadata:
3155
+ $ref: '#/components/schemas/UserMetadata'
3154
3156
  target:
3155
3157
  allOf:
3156
3158
  - $ref: '#/components/schemas/EndpointTarget'
@@ -3576,6 +3578,18 @@ components:
3576
3578
  information in any way that the SDK need be concerned with. If an SDK encounters an event
3577
3579
  type which it does not understand, it must error unless this is true. If it is true, it's
3578
3580
  acceptable for the event type and/or attributes to be uninterpretable.
3581
+ userMetadata:
3582
+ allOf:
3583
+ - $ref: '#/components/schemas/UserMetadata'
3584
+ description: |-
3585
+ Metadata on the event. This is often carried over from commands and client calls. Most events
3586
+ won't have this information, and how this information is used is dependent upon the interface
3587
+ that reads it.
3588
+
3589
+ Current well-known uses:
3590
+ * workflow_execution_started_event_attributes - summary and details from start workflow.
3591
+ * timer_started_event_attributes - summary represents an identifier for the timer for use by
3592
+ user interfaces.
3579
3593
  workflowExecutionStartedEventAttributes:
3580
3594
  $ref: '#/components/schemas/WorkflowExecutionStartedEventAttributes'
3581
3595
  workflowExecutionCompletedEventAttributes:
@@ -4051,6 +4065,13 @@ components:
4051
4065
  $ref: '#/components/schemas/SearchAttributes'
4052
4066
  header:
4053
4067
  $ref: '#/components/schemas/Header'
4068
+ userMetadata:
4069
+ allOf:
4070
+ - $ref: '#/components/schemas/UserMetadata'
4071
+ description: |-
4072
+ Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig
4073
+ for use by user interfaces to display the fixed as-of-start summary and details of the
4074
+ workflow.
4054
4075
  description: |-
4055
4076
  NewWorkflowExecutionInfo is a shared message that encapsulates all the
4056
4077
  required arguments to starting a workflow in different contexts.
@@ -4451,9 +4472,7 @@ components:
4451
4472
  format: int32
4452
4473
  backlogCountHint:
4453
4474
  type: string
4454
- description: |-
4455
- A hint that there are more tasks already present in this task queue. Can be used to
4456
- prioritize draining a sticky queue before polling from a normal queue.
4475
+ description: "A hint that there are more tasks already present in this task queue \n partition. Can be used to prioritize draining a sticky queue.\n\n Specifically, the returned number is the number of tasks remaining in\n the in-memory buffer for this partition, which is currently capped at\n 1000. Because sticky queues only have one partition, this number is \n more useful when draining them. Normal queues, typically having more than one \n partition, will return a number representing only some portion of the \n overall backlog. Subsequent RPCs may not hit the same partition as \n this call."
4457
4476
  history:
4458
4477
  allOf:
4459
4478
  - $ref: '#/components/schemas/History'
@@ -5642,6 +5661,13 @@ components:
5642
5661
  skipGenerateWorkflowTask:
5643
5662
  type: boolean
5644
5663
  description: Indicates that a new workflow task should not be generated when this signal is received.
5664
+ userMetadata:
5665
+ allOf:
5666
+ - $ref: '#/components/schemas/UserMetadata'
5667
+ description: |-
5668
+ Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo
5669
+ for use by user interfaces to display the fixed as-of-start summary and details of the
5670
+ workflow.
5645
5671
  SignalWithStartWorkflowExecutionResponse:
5646
5672
  type: object
5647
5673
  properties:
@@ -5939,6 +5965,13 @@ components:
5939
5965
  Callbacks to be called by the server when this workflow reaches a terminal state.
5940
5966
  If the workflow continues-as-new, these callbacks will be carried over to the new execution.
5941
5967
  Callback addresses must be whitelisted in the server's dynamic configuration.
5968
+ userMetadata:
5969
+ allOf:
5970
+ - $ref: '#/components/schemas/UserMetadata'
5971
+ description: |-
5972
+ Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo
5973
+ for use by user interfaces to display the fixed as-of-start summary and details of the
5974
+ workflow.
5942
5975
  StartWorkflowExecutionResponse:
5943
5976
  type: object
5944
5977
  properties:
@@ -6090,6 +6123,34 @@ components:
6090
6123
  See the TaskReachability docstring for information about each enum variant.
6091
6124
  If reachability is empty, this worker is considered unreachable in this task queue.
6092
6125
  description: Reachability of tasks for a worker on a single task queue.
6126
+ TaskQueueStats:
6127
+ type: object
6128
+ properties:
6129
+ approximateBacklogCount:
6130
+ type: string
6131
+ description: |-
6132
+ The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges
6133
+ to the right value.
6134
+ approximateBacklogAge:
6135
+ pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
6136
+ type: string
6137
+ description: Approximate age of the oldest task in the backlog based on the create timestamp of the task at the head of the queue.
6138
+ tasksAddRate:
6139
+ type: number
6140
+ description: |-
6141
+ Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and
6142
+ sync-matched tasks.
6143
+ format: float
6144
+ tasksDispatchRate:
6145
+ type: number
6146
+ description: |-
6147
+ Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and
6148
+ sync-matched tasks.
6149
+ format: float
6150
+ description: |-
6151
+ For workflow task queues, we only report the normal queue stats, not sticky queues. This means the stats
6152
+ reported here do not count all workflow tasks. However, because the tasks queued in sticky queues only remain
6153
+ valid for a few seconds, the inaccuracy becomes less significant as the backlog age grows.
6093
6154
  TaskQueueStatus:
6094
6155
  type: object
6095
6156
  properties:
@@ -6113,6 +6174,8 @@ components:
6113
6174
  items:
6114
6175
  $ref: '#/components/schemas/PollerInfo'
6115
6176
  description: Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID.
6177
+ stats:
6178
+ $ref: '#/components/schemas/TaskQueueStats'
6116
6179
  TaskQueueVersionInfo:
6117
6180
  type: object
6118
6181
  properties:
@@ -6128,6 +6191,16 @@ components:
6128
6191
  - BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY
6129
6192
  - BUILD_ID_TASK_REACHABILITY_UNREACHABLE
6130
6193
  type: string
6194
+ description: |-
6195
+ Task Reachability is eventually consistent; there may be a delay until it converges to the most
6196
+ accurate value but it is designed in a way to take the more conservative side until it converges.
6197
+ For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY.
6198
+
6199
+ Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be
6200
+ accounted for reachability as server cannot know if they'll happen as they do not use
6201
+ assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows
6202
+ who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make
6203
+ sure to query reachability for the parent/previous workflow's Task Queue as well.
6131
6204
  format: enum
6132
6205
  TerminateWorkflowExecutionRequest:
6133
6206
  type: object
@@ -6444,6 +6517,25 @@ components:
6444
6517
  description: The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
6445
6518
  searchAttributes:
6446
6519
  $ref: '#/components/schemas/SearchAttributes'
6520
+ UserMetadata:
6521
+ type: object
6522
+ properties:
6523
+ summary:
6524
+ allOf:
6525
+ - $ref: '#/components/schemas/Payload'
6526
+ description: |-
6527
+ Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload
6528
+ that is a single JSON string for use in user interfaces. User interface formatting may not
6529
+ apply to this text when used in "title" situations. The payload data section is limited to 400
6530
+ bytes by default.
6531
+ details:
6532
+ allOf:
6533
+ - $ref: '#/components/schemas/Payload'
6534
+ description: |-
6535
+ Long-form text that provides details. This payload should be a "json/plain"-encoded payload
6536
+ that is a single JSON string for use in user interfaces. User interface formatting may apply to
6537
+ this text in common use. The payload data section is limited to 20000 bytes by default.
6538
+ description: Information a user can set, often for use by user interfaces.
6447
6539
  VersionInfo:
6448
6540
  type: object
6449
6541
  properties:
@@ -6569,6 +6661,10 @@ components:
6569
6661
  defaultWorkflowTaskTimeout:
6570
6662
  pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
6571
6663
  type: string
6664
+ userMetadata:
6665
+ allOf:
6666
+ - $ref: '#/components/schemas/UserMetadata'
6667
+ description: User metadata provided on start workflow.
6572
6668
  WorkflowExecutionContinuedAsNewEventAttributes:
6573
6669
  type: object
6574
6670
  properties: