Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -14804,6 +14804,16 @@
},
"description": "BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows.\nKeep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest."
},
"v1BoundWorkerInfo": {
"type": "object",
"properties": {
"workerQueue": {
"type": "string",
"description": "The worker's queue: the stable identity of a single-session worker, or\nthe worker address of a multi-session worker. The workflow's tasks are\nrouted here."
}
},
"description": "EXPERIMENTAL. Subject to redesign or removal.\nThe worker a workflow is bound to. Recorded by the server. More fields may be\nadded later, such as the worker's instance key so that history can send it to\nmatching to understand if the worker's heartbeating information."
},
"v1BuildIdAssignmentRule": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -19927,6 +19937,20 @@
}
}
},
"v1SessionInfo": {
"type": "object",
"properties": {
"exclusiveWorker": {
"type": "boolean",
"description": "True when the workflow is bound to a single-session worker. Such a\nbinding never moves to another worker. False for a multi-session worker,\nwhose binding moves with the worker that starts the workflow's tasks."
},
"boundWorkerInfo": {
"$ref": "#/definitions/v1BoundWorkerInfo",
"description": "The worker the workflow is bound to. Always set."
}
},
"description": "EXPERIMENTAL. Subject to redesign or removal.\nWhich worker a workflow (which is the session) is bound to. The server records it on history events\nso it can rebuild the binding from history (for example on reset). See\nsession_info on WorkflowTaskStartedEventAttributes and inherited_session_info\non WorkflowExecutionStartedEventAttributes. Not a worker or user option; SDKs\nshould not read or interpret it."
},
"v1SetCurrentDeploymentResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -22376,6 +22400,10 @@
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this workflow."
},
"inheritedSessionInfo": {
"$ref": "#/definitions/v1SessionInfo",
"description": "Session info this run inherited from the previous run (continue-as-new, retry or cron), so the server\ncan rebuild it from history. Nil when the previous run was not bound or this run is on a different\ntask queue. Child workflows never inherit it.\nUsed internally by the server; SDKs should not read or interpret this field.\nEXPERIMENTAL. Subject to redesign or removal."
}
},
"title": "Always the first event in workflow history"
Expand Down Expand Up @@ -22967,6 +22995,10 @@
"type": "string",
"format": "int64",
"title": "Used by server internally to properly reapply build ID redirects to an execution\nwhen rebuilding it from events.\nDeprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]"
},
"sessionInfo": {
"$ref": "#/definitions/v1SessionInfo",
"description": "Session info of this workflow as of this task start, so the server can rebuild it from history (for\nexample on reset). Nil when the workflow is not bound to a worker.\nUsed internally by the server; SDKs should not read or interpret this field.\nEXPERIMENTAL. Subject to redesign or removal."
}
}
},
Expand Down
51 changes: 51 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10757,6 +10757,20 @@ components:
description: |-
BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows.
Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest.
BoundWorkerInfo:
type: object
properties:
workerQueue:
type: string
description: |-
The worker's queue: the stable identity of a single-session worker, or
the worker address of a multi-session worker. The workflow's tasks are
routed here.
description: |-
EXPERIMENTAL. Subject to redesign or removal.
The worker a workflow is bound to. Recorded by the server. More fields may be
added later, such as the worker's instance key so that history can send it to
matching to understand if the worker's heartbeating information.
BuildIdAssignmentRule:
type: object
properties:
Expand Down Expand Up @@ -16811,6 +16825,26 @@ components:
properties:
nonRetryable:
type: boolean
SessionInfo:
type: object
properties:
exclusiveWorker:
type: boolean
description: |-
True when the workflow is bound to a single-session worker. Such a
binding never moves to another worker. False for a multi-session worker,
whose binding moves with the worker that starts the workflow's tasks.
boundWorkerInfo:
allOf:
- $ref: '#/components/schemas/BoundWorkerInfo'
description: The worker the workflow is bound to. Always set.
description: |-
EXPERIMENTAL. Subject to redesign or removal.
Which worker a workflow (which is the session) is bound to. The server records it on history events
so it can rebuild the binding from history (for example on reset). See
session_info on WorkflowTaskStartedEventAttributes and inherited_session_info
on WorkflowExecutionStartedEventAttributes. Not a worker or user option; SDKs
should not read or interpret it.
SetCurrentDeploymentRequest:
type: object
properties:
Expand Down Expand Up @@ -21042,6 +21076,15 @@ components:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: Serialization context propagated from the Nexus caller that started this workflow.
inheritedSessionInfo:
allOf:
- $ref: '#/components/schemas/SessionInfo'
description: |-
Session info this run inherited from the previous run (continue-as-new, retry or cron), so the server
can rebuild it from history. Nil when the previous run was not bound or this run is on a different
task queue. Child workflows never inherit it.
Used internally by the server; SDKs should not read or interpret this field.
EXPERIMENTAL. Subject to redesign or removal.
description: Always the first event in workflow history
WorkflowExecutionTerminatedEventAttributes:
type: object
Expand Down Expand Up @@ -21722,6 +21765,14 @@ components:
Used by server internally to properly reapply build ID redirects to an execution
when rebuilding it from events.
Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
sessionInfo:
allOf:
- $ref: '#/components/schemas/SessionInfo'
description: |-
Session info of this workflow as of this task start, so the server can rebuild it from history (for
example on reset). Nil when the workflow is not bound to a worker.
Used internally by the server; SDKs should not read or interpret this field.
EXPERIMENTAL. Subject to redesign or removal.
WorkflowTaskTimedOutEventAttributes:
type: object
properties:
Expand Down
12 changes: 12 additions & 0 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ message WorkflowExecutionStartedEventAttributes {

// Serialization context propagated from the Nexus caller that started this workflow.
temporal.api.nexus.v1.PropagatedSerializationContext propagated_nexus_serialization_context = 44;

// Session info this run inherited from the previous run (continue-as-new, retry or cron), so the server
// can rebuild it from history. Nil when the previous run was not bound or this run is on a different
// task queue. Child workflows never inherit it.
// Used internally by the server; SDKs should not read or interpret this field.
// EXPERIMENTAL. Subject to redesign or removal.
temporal.api.session.v1.SessionInfo inherited_session_info = 45;
}


Expand Down Expand Up @@ -342,6 +349,11 @@ message WorkflowTaskStartedEventAttributes {
// when rebuilding it from events.
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
int64 build_id_redirect_counter = 7 [deprecated = true];
// Session info of this workflow as of this task start, so the server can rebuild it from history (for
// example on reset). Nil when the workflow is not bound to a worker.
// Used internally by the server; SDKs should not read or interpret this field.
// EXPERIMENTAL. Subject to redesign or removal.
temporal.api.session.v1.SessionInfo session_info = 10;
}

message WorkflowTaskCompletedEventAttributes {
Expand Down
26 changes: 26 additions & 0 deletions temporal/api/session/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,29 @@ message ActivitySessionOptions {
// Future: references to other types of sessions.
}
}

// EXPERIMENTAL. Subject to redesign or removal.
// Which worker a workflow (which is the session) is bound to. The server records it on history events

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the workflow always == to the session? For future users of this message? If so this should just be called WorkflowSessionInfo, otherwise strike that language

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah the workflow is the session, at-least for now. This can change in the near future though, which is why SessionInfo sounds more appropriate imo (for eg, you could have activities that want to be routed to some different session that is not the workflow it was scheduled from)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

K, then I'd change the docstring.

// so it can rebuild the binding from history (for example on reset). See
// session_info on WorkflowTaskStartedEventAttributes and inherited_session_info
// on WorkflowExecutionStartedEventAttributes. Not a worker or user option; SDKs
// should not read or interpret it.
message SessionInfo {
// True when the workflow is bound to a single-session worker. Such a
// binding never moves to another worker. False for a multi-session worker,
// whose binding moves with the worker that starts the workflow's tasks.
bool exclusive_worker = 1;
// The worker the workflow is bound to. Always set.
BoundWorkerInfo bound_worker_info = 2;
}

// EXPERIMENTAL. Subject to redesign or removal.
// The worker a workflow is bound to. Recorded by the server. More fields may be
// added later, such as the worker's instance key so that history can send it to
// matching to understand if the worker's heartbeating information.
message BoundWorkerInfo {
// The worker's queue: the stable identity of a single-session worker, or
// the worker address of a multi-session worker. The workflow's tasks are
// routed here.
string worker_queue = 1;
}
Loading