Skip to content

Commit 2f331f7

Browse files
authored
Merge branch 'master' into trampolining-rev-number
2 parents f70c987 + 9109a85 commit 2f331f7

11 files changed

Lines changed: 537 additions & 110 deletions

File tree

openapi/openapiv2.json

Lines changed: 256 additions & 82 deletions
Large diffs are not rendered by default.

openapi/openapiv3.yaml

Lines changed: 123 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,6 +1812,7 @@ paths:
18121812
- TASK_QUEUE_KIND_UNSPECIFIED
18131813
- TASK_QUEUE_KIND_NORMAL
18141814
- TASK_QUEUE_KIND_STICKY
1815+
- TASK_QUEUE_KIND_WORKER_COMMANDS
18151816
type: string
18161817
format: enum
18171818
- name: taskQueue.normalName
@@ -6046,6 +6047,7 @@ paths:
60466047
- TASK_QUEUE_KIND_UNSPECIFIED
60476048
- TASK_QUEUE_KIND_NORMAL
60486049
- TASK_QUEUE_KIND_STICKY
6050+
- TASK_QUEUE_KIND_WORKER_COMMANDS
60496051
type: string
60506052
format: enum
60516053
- name: taskQueue.normalName
@@ -8236,6 +8238,11 @@ components:
82368238
canceledReason:
82378239
type: string
82388240
description: Set if activity cancelation was requested.
8241+
links:
8242+
type: array
8243+
items:
8244+
$ref: '#/components/schemas/Link'
8245+
description: Links to related entities, such as the entity that started this activity.
82398246
description: Information about a standalone activity.
82408247
ActivityExecutionListInfo:
82418248
type: object
@@ -9066,10 +9073,6 @@ components:
90669073
allOf:
90679074
- $ref: '#/components/schemas/Callback'
90689075
description: Information on how this callback should be invoked (e.g. its URL and type).
9069-
trigger:
9070-
allOf:
9071-
- $ref: '#/components/schemas/CallbackInfo_Trigger'
9072-
description: Trigger for this callback.
90739076
registrationTime:
90749077
type: string
90759078
description: The time when the callback was registered.
@@ -9084,6 +9087,7 @@ components:
90849087
- CALLBACK_STATE_SUCCEEDED
90859088
- CALLBACK_STATE_BLOCKED
90869089
type: string
9090+
description: The current state of the callback.
90879091
format: enum
90889092
attempt:
90899093
type: integer
@@ -9106,16 +9110,7 @@ components:
91069110
blockedReason:
91079111
type: string
91089112
description: If the state is BLOCKED, blocked reason provides additional information.
9109-
description: CallbackInfo contains the state of an attached workflow callback.
9110-
CallbackInfo_Trigger:
9111-
type: object
9112-
properties:
9113-
workflowClosed:
9114-
$ref: '#/components/schemas/CallbackInfo_WorkflowClosed'
9115-
CallbackInfo_WorkflowClosed:
9116-
type: object
9117-
properties: {}
9118-
description: Trigger for when the workflow is closed.
9113+
description: Common callback information. Specific CallbackInfo messages should embed this and may include additional fields.
91199114
Callback_Internal:
91209115
type: object
91219116
properties:
@@ -9919,6 +9914,11 @@ components:
99199914
type: string
99209915
description: Token for follow-on long-poll requests. Absent only if the activity is complete.
99219916
format: bytes
9917+
callbacks:
9918+
type: array
9919+
items:
9920+
$ref: '#/components/schemas/CallbackInfo'
9921+
description: Callbacks attached to this activity execution and their current state.
99229922
DescribeBatchOperationResponse:
99239923
type: object
99249924
properties:
@@ -10737,7 +10737,7 @@ components:
1073710737
type: array
1073810738
items:
1073910739
$ref: '#/components/schemas/Link'
10740-
description: Links associated with the event.
10740+
description: Links to related entities, such as the entity that started this event's workflow.
1074110741
principal:
1074210742
allOf:
1074310743
- $ref: '#/components/schemas/Principal'
@@ -10875,9 +10875,28 @@ components:
1087510875
sourceDeploymentRevisionNumber:
1087610876
type: string
1087710877
description: The revision number of the source deployment version of the parent/previous workflow.
10878+
continueAsNewInitialVersioningBehavior:
10879+
enum:
10880+
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED
10881+
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE
10882+
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION
10883+
type: string
10884+
description: |-
10885+
Experimental.
10886+
If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior
10887+
specified in that command.
10888+
Only used for the initial task of this run and the initial task of any retries of this run.
10889+
Not passed to children or to future continue-as-new.
10890+
10891+
Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,
10892+
a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility
10893+
with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade
10894+
value if the InheritedAutoUpgradeInfo is non-empty.
10895+
format: enum
1087810896
description: |-
1087910897
Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version
1088010898
to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.
10899+
Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion.
1088110900
Input:
1088210901
type: object
1088310902
properties:
@@ -10922,11 +10941,23 @@ components:
1092210941
$ref: '#/components/schemas/Link_WorkflowEvent'
1092310942
batchJob:
1092410943
$ref: '#/components/schemas/Link_BatchJob'
10944+
activity:
10945+
$ref: '#/components/schemas/Link_Activity'
1092510946
description: |-
1092610947
Link can be associated with history events. It might contain information about an external entity
1092710948
related to the history event. For example, workflow A makes a Nexus call that starts workflow B:
1092810949
in this case, a history event in workflow A could contain a Link to the workflow started event in
1092910950
workflow B, and vice-versa.
10951+
Link_Activity:
10952+
type: object
10953+
properties:
10954+
namespace:
10955+
type: string
10956+
activityId:
10957+
type: string
10958+
runId:
10959+
type: string
10960+
description: A link to an activity.
1093010961
Link_BatchJob:
1093110962
type: object
1093210963
properties:
@@ -11702,18 +11733,16 @@ components:
1170211733
properties:
1170311734
attachRequestId:
1170411735
type: boolean
11705-
description: Attaches the request ID to the running workflow.
11736+
description: Attaches the request ID to the running execution.
1170611737
attachCompletionCallbacks:
1170711738
type: boolean
11708-
description: Attaches the completion callbacks to the running workflow.
11739+
description: Attaches the completion callbacks to the running execution.
1170911740
attachLinks:
1171011741
type: boolean
11711-
description: Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event.
11742+
description: Attaches the links to the running execution.
1171211743
description: |-
11713-
When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and
11714-
there is already an existing running workflow, OnConflictOptions defines actions to be taken on
11715-
the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent
11716-
history event in the running workflow with the changes requested in this object.
11744+
When starting an execution with a conflict policy that uses an existing execution and there is already an existing
11745+
running execution, OnConflictOptions defines actions to be taken on the existing running execution.
1171711746
Outcome:
1171811747
type: object
1171911748
properties:
@@ -14143,6 +14172,13 @@ components:
1414314172
started:
1414414173
type: boolean
1414514174
description: If true, a new workflow was started.
14175+
signalLink:
14176+
allOf:
14177+
- $ref: '#/components/schemas/Link'
14178+
description: |-
14179+
Link to be associated with the WorkflowExecutionSignaled event.
14180+
Added on the response to propagate the backlink.
14181+
Available from Temporal server 1.31 and up.
1414614182
SignalWorkflowExecutionRequest:
1414714183
type: object
1414814184
properties:
@@ -14183,7 +14219,14 @@ components:
1418314219
- temporal.api.workflow.v1.PostResetOperation.SignalWorkflow.
1418414220
SignalWorkflowExecutionResponse:
1418514221
type: object
14186-
properties: {}
14222+
properties:
14223+
link:
14224+
allOf:
14225+
- $ref: '#/components/schemas/Link'
14226+
description: |-
14227+
Link to be associated with the WorkflowExecutionSignaled event.
14228+
Added on the response to propagate the backlink.
14229+
Available from Temporal server 1.31 and up.
1418714230
StartActivityExecutionRequest:
1418814231
type: object
1418914232
properties:
@@ -14287,6 +14330,24 @@ components:
1428714330
allOf:
1428814331
- $ref: '#/components/schemas/Priority'
1428914332
description: Priority metadata.
14333+
completionCallbacks:
14334+
type: array
14335+
items:
14336+
$ref: '#/components/schemas/Callback'
14337+
description: |-
14338+
Callbacks to be called by the server when this activity reaches a terminal state.
14339+
Callback addresses must be whitelisted in the server's dynamic configuration.
14340+
links:
14341+
type: array
14342+
items:
14343+
$ref: '#/components/schemas/Link'
14344+
description: |-
14345+
Links to be associated with the activity. Callbacks may also have associated links;
14346+
links already included with a callback should not be duplicated here.
14347+
onConflictOptions:
14348+
allOf:
14349+
- $ref: '#/components/schemas/OnConflictOptions'
14350+
description: Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.
1429014351
StartActivityExecutionResponse:
1429114352
type: object
1429214353
properties:
@@ -14296,6 +14357,10 @@ components:
1429614357
started:
1429714358
type: boolean
1429814359
description: If true, a new activity was started.
14360+
link:
14361+
allOf:
14362+
- $ref: '#/components/schemas/Link'
14363+
description: Link to the started activity.
1429914364
StartBatchOperationRequest:
1430014365
type: object
1430114366
properties:
@@ -14747,6 +14812,7 @@ components:
1474714812
- TASK_QUEUE_KIND_UNSPECIFIED
1474814813
- TASK_QUEUE_KIND_NORMAL
1474914814
- TASK_QUEUE_KIND_STICKY
14815+
- TASK_QUEUE_KIND_WORKER_COMMANDS
1475014816
type: string
1475114817
description: 'Default: TASK_QUEUE_KIND_NORMAL.'
1475214818
format: enum
@@ -16771,6 +16837,7 @@ components:
1677116837
enum:
1677216838
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED
1677316839
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE
16840+
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION
1677416841
type: string
1677516842
description: |-
1677616843
Experimental. Optionally decide the versioning behavior that the first task of the new run should use.
@@ -17074,6 +17141,11 @@ components:
1707417141
allOf:
1707517142
- $ref: '#/components/schemas/WorkflowExecution'
1707617143
description: When signal origin is a workflow execution, this field is set.
17144+
requestId:
17145+
type: string
17146+
description: |-
17147+
The request ID of the Signal request, used by the server to attach this to
17148+
the correct Event ID when generating link.
1707717149
WorkflowExecutionStartedEventAttributes:
1707817150
type: object
1707917151
properties:
@@ -17314,6 +17386,16 @@ components:
1731417386

1731517387
Used internally by the server during continue-as-new and retry.
1731617388
Should not be read or interpreted by SDKs.
17389+
timeSkippingConfig:
17390+
allOf:
17391+
- $ref: '#/components/schemas/TimeSkippingConfig'
17392+
description: |-
17393+
Initial time-skipping configuration for this workflow execution, recorded at start time.
17394+
This may have been set explicitly via the start workflow request, or propagated from a
17395+
parent/previous execution.
17396+
17397+
The configuration may be updated after start via UpdateWorkflowExecutionOptions, which
17398+
will be reflected in the WorkflowExecutionOptionsUpdatedEvent.
1731717399
description: Always the first event in workflow history
1731817400
WorkflowExecutionTerminatedEventAttributes:
1731917401
type: object
@@ -17545,6 +17627,24 @@ components:
1754517627
Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not
1754617628
face the problem of inconsistent dispatching that arises from eventual consistency between
1754717629
task queues and their partitions.
17630+
continueAsNewInitialVersioningBehavior:
17631+
enum:
17632+
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED
17633+
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE
17634+
- CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION
17635+
type: string
17636+
description: |-
17637+
Experimental.
17638+
If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior
17639+
specified in that command.
17640+
Only used for the initial task of this run and the initial task of any retries of this run.
17641+
Not passed to children or to future continue-as-new.
17642+
17643+
Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,
17644+
a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility
17645+
with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent
17646+
to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade.
17647+
format: enum
1754817648
description: |-
1754917649
Holds all the information about worker versioning for a particular workflow execution.
1755017650
Experimental. Versioning info is experimental and might change in the future.

temporal/api/activity/v1/message.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import "google/protobuf/timestamp.proto";
1515
import "temporal/api/common/v1/message.proto";
1616
import "temporal/api/deployment/v1/message.proto";
1717
import "temporal/api/enums/v1/activity.proto";
18+
import "temporal/api/callback/v1/message.proto";
1819
import "temporal/api/enums/v1/workflow.proto";
1920
import "temporal/api/failure/v1/message.proto";
2021
import "temporal/api/taskqueue/v1/message.proto";
@@ -161,6 +162,9 @@ message ActivityExecutionInfo {
161162

162163
// Set if activity cancelation was requested.
163164
string canceled_reason = 32;
165+
166+
// Links to related entities, such as the entity that started this activity.
167+
repeated temporal.api.common.v1.Link links = 33;
164168
}
165169

166170
// Limited activity information returned in the list response.
@@ -195,3 +199,20 @@ message ActivityExecutionListInfo {
195199
// This field is only populated if the activity is closed.
196200
google.protobuf.Duration execution_duration = 11;
197201
}
202+
203+
// CallbackInfo contains the state of an attached activity callback.
204+
message CallbackInfo {
205+
// Trigger for when the activity is closed.
206+
message ActivityClosed {}
207+
208+
message Trigger {
209+
oneof variant {
210+
ActivityClosed activity_closed = 1;
211+
}
212+
}
213+
214+
// Trigger for this callback.
215+
Trigger trigger = 1;
216+
// Common callback info.
217+
temporal.api.callback.v1.CallbackInfo info = 2;
218+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
syntax = "proto3";
2+
3+
package temporal.api.callback.v1;
4+
5+
option go_package = "go.temporal.io/api/callback/v1;callback";
6+
option java_package = "io.temporal.api.callback.v1";
7+
option java_multiple_files = true;
8+
option java_outer_classname = "MessageProto";
9+
option ruby_package = "Temporalio::Api::Callback::V1";
10+
option csharp_namespace = "Temporalio.Api.Callback.V1";
11+
12+
import "google/protobuf/timestamp.proto";
13+
14+
import "temporal/api/common/v1/message.proto";
15+
import "temporal/api/enums/v1/common.proto";
16+
import "temporal/api/failure/v1/message.proto";
17+
18+
// Common callback information. Specific CallbackInfo messages should embed this and may include additional fields.
19+
message CallbackInfo {
20+
// Information on how this callback should be invoked (e.g. its URL and type).
21+
temporal.api.common.v1.Callback callback = 1;
22+
// The time when the callback was registered.
23+
google.protobuf.Timestamp registration_time = 2;
24+
// The current state of the callback.
25+
temporal.api.enums.v1.CallbackState state = 3;
26+
// The number of attempts made to deliver the callback.
27+
// This number represents a minimum bound since the attempt is incremented after the callback request completes.
28+
int32 attempt = 4;
29+
// The time when the last attempt completed.
30+
google.protobuf.Timestamp last_attempt_complete_time = 5;
31+
// The last attempt's failure, if any.
32+
temporal.api.failure.v1.Failure last_attempt_failure = 6;
33+
// The time when the next attempt is scheduled.
34+
google.protobuf.Timestamp next_attempt_schedule_time = 7;
35+
// If the state is BLOCKED, blocked reason provides additional information.
36+
string blocked_reason = 8;
37+
}

0 commit comments

Comments
 (0)