Skip to content
Draft
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
47 changes: 47 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -12634,6 +12634,10 @@
"startDelay": {
"type": "string",
"description": "Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this activity."
}
}
},
Expand Down Expand Up @@ -12903,6 +12907,10 @@
"timeSkippingConfig": {
"$ref": "#/definitions/v1TimeSkippingConfig",
"description": "Time-skipping configuration. If not set, time skipping is disabled."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this workflow."
}
}
},
Expand Down Expand Up @@ -13423,6 +13431,10 @@
"$ref": "#/definitions/apiCommonV1Link"
},
"description": "Links to be associated with this update."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this update."
}
},
"description": "The request information that will be delivered all the way down to the\nWorkflow Execution."
Expand Down Expand Up @@ -13908,6 +13920,10 @@
"type": "string",
"format": "date-time",
"description": "The time at which the first activity task is made available for dispatch, computed as\n`schedule_time + start_delay`. Same as `schedule_time` if `start_delay` is not set."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this activity."
}
},
"description": "Information about a standalone activity."
Expand Down Expand Up @@ -18438,6 +18454,10 @@
"type": "string",
"description": "Operation token. Only populated for asynchronous operations after a successful StartOperation call."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context for this operation's payloads, derived from its stored target.\nFor a reused operation, this is the original execution's context."
},
"result": {
"$ref": "#/definitions/v1Payload",
"description": "The result if the operation completed successfully."
Expand Down Expand Up @@ -18675,6 +18695,21 @@
},
"description": "Priority contains metadata that controls relative ordering of task processing\nwhen tasks are backed up in a queue. Initially, Priority will be used in\nmatching (workflow and activity) task queues. Later it may be used in history\ntask queues and in rate limiting decisions.\n\nPriority is attached to workflows and activities. By default, activities\ninherit Priority from the workflow that created them, but may override fields\nwhen an activity is started or modified.\n\nDespite being named \"Priority\", this message also contains fields that\ncontrol \"fairness\" mechanisms.\n\nFor all fields, the field not present or equal to zero/empty string means to\ninherit the value from the calling workflow, or if there is no calling\nworkflow, then use the default value.\n\nFor all fields other than fairness_key, the zero value isn't meaningful so\nthere's no confusion between inherit/default and a meaningful value. For\nfairness_key, the empty string will be interpreted as \"inherit\". This means\nthat if a workflow has a non-empty fairness key, you can't override the\nfairness key of its activity to the empty string.\n\nThe overall semantics of Priority are:\n1. First, consider \"priority\": higher priority (lower number) goes first.\n2. Then, consider fairness: try to dispatch tasks for different fairness keys\n in proportion to their weight.\n\nApplications may use any subset of mechanisms that are useful to them and\nleave the other fields to use default values.\n\nNot all queues in the system may support the \"full\" semantics of all priority\nfields. (Currently only support in matching task queues is planned.)"
},
"v1PropagatedSerializationContext": {
"type": "object",
"properties": {
"endpoint": {
"type": "string"
},
"service": {
"type": "string"
},
"operation": {
"type": "string"
}
},
"description": "PropagatedSerializationContext represents the context of the Nexus caller that started this execution."
},
"v1QueryRejectCondition": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -18919,6 +18954,10 @@
"$ref": "#/definitions/v1Link"
},
"description": "Links to be associated with this update."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this update."
}
},
"description": "The client request that triggers a Workflow Update."
Expand Down Expand Up @@ -21649,6 +21688,10 @@
"timeSkippingInfo": {
"$ref": "#/definitions/v1TimeSkippingInfo",
"description": "Information about time skipping of the workflow execution.\nIf the execution has never enabled time skipping, it will be nil."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this workflow."
}
},
"description": "Holds all the extra information about workflow execution that is not part of Visibility."
Expand Down Expand Up @@ -22076,6 +22119,10 @@
"timeSkippingStatePropagation": {
"$ref": "#/definitions/v1TimeSkippingStatePropagation",
"description": "The time-skipping state propagated from a previous run of this workflow. This can be nil\nif no time skipping has occurred or there is no previous run."
},
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this workflow."
}
},
"title": "Always the first event in workflow history"
Expand Down
151 changes: 118 additions & 33 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9915,6 +9915,10 @@ components:
The time at which the first activity task is made available for dispatch, computed as
`schedule_time + start_delay`. Same as `schedule_time` if `start_delay` is not set.
format: date-time
propagatedNexusSerializationContext:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: Serialization context propagated from the Nexus caller that started this activity.
description: Information about a standalone activity.
ActivityExecutionListInfo:
type: object
Expand Down Expand Up @@ -10948,6 +10952,25 @@ components:
NexusHandler callbacks are only supported for certain types of operations, e.g. standalone Nexus operations.
Attempting to attach a Worker callback for an unsupported operation will result in an INVALID_ARGUMENT
error from the server.
CancelOperationRequest:
type: object
properties:
service:
type: string
description: Service name.
operation:
type: string
description: Type of operation to cancel.
operationId:
type: string
description: |-
Operation ID as originally generated by a Handler.

Deprecated. Renamed to operation_token.
operationToken:
type: string
description: Operation token as originally generated by a Handler.
description: A request to cancel an operation.
CanceledFailureInfo:
type: object
properties:
Expand Down Expand Up @@ -13078,22 +13101,6 @@ components:
Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version
to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.
Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion.
Input:
type: object
properties:
header:
allOf:
- $ref: '#/components/schemas/Header'
description: |-
Headers that are passed with the Update from the requesting entity.
These can include things like auth or tracing tokens.
name:
type: string
description: The name of the Update handler to invoke on the target Workflow.
args:
allOf:
- $ref: '#/components/schemas/Payloads'
description: The arguments to pass to the named Update handler.
IntervalSpec:
type: object
properties:
Expand Down Expand Up @@ -14704,6 +14711,12 @@ components:
operationToken:
type: string
description: Operation token. Only populated for asynchronous operations after a successful StartOperation call.
propagatedNexusSerializationContext:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: |-
Serialization context for this operation's payloads, derived from its stored target.
For a reused operation, this is the original execution's context.
result:
allOf:
- $ref: '#/components/schemas/Payload'
Expand Down Expand Up @@ -15064,6 +15077,16 @@ components:

Not all queues in the system may support the "full" semantics of all priority
fields. (Currently only support in matching task queues is planned.)
PropagatedSerializationContext:
type: object
properties:
endpoint:
type: string
service:
type: string
operation:
type: string
description: PropagatedSerializationContext represents the context of the Nexus caller that started this execution.
QueryRejected:
type: object
properties:
Expand Down Expand Up @@ -15313,24 +15336,32 @@ components:
Request:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta'
input:
$ref: '#/components/schemas/Input'
requestId:
header:
type: object
additionalProperties:
type: string
description: |-
Headers extracted from the original request in the Temporal frontend.
When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
scheduledTime:
type: string
description: The request ID of the request.
completionCallbacks:
type: array
items:
$ref: '#/components/schemas/Callback'
description: Callbacks to be called by the server when this update reaches a terminal state.
links:
type: array
items:
$ref: '#/components/schemas/Link'
description: Links to be associated with this update.
description: The client request that triggers a Workflow Update.
description: |-
The timestamp when the request was scheduled in the frontend.
(-- api-linter: core::0142::time-field-names=disabled
aip.dev/not-precedent: Not following linter rules. --)
format: date-time
capabilities:
$ref: '#/components/schemas/Request_Capabilities'
startOperation:
$ref: '#/components/schemas/StartOperationRequest'
cancelOperation:
$ref: '#/components/schemas/CancelOperationRequest'
endpoint:
type: string
description: |-
The endpoint this request was addressed to before forwarding to the worker.
Supported from server version 1.30.0.
description: A Nexus request.
RequestCancelActivityExecutionRequest:
type: object
properties:
Expand Down Expand Up @@ -15544,6 +15575,14 @@ components:
Indicate if the request is still buffered. If so, the event ID is not known and its value
will be an invalid event ID.
description: RequestIdInfo contains details of a request ID.
Request_Capabilities:
type: object
properties:
temporalFailureResponses:
type: boolean
description: |-
If set, handlers may use temporal.api.failure.v1.Failure instances to return failures to the server.
This also allows handler and operation errors to have their own messages and stack traces.
ResetActivityExecutionRequest:
type: object
properties:
Expand Down Expand Up @@ -17124,6 +17163,10 @@ components:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.
propagatedNexusSerializationContext:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: Serialization context propagated from the Nexus caller that started this activity.
StartActivityExecutionResponse:
type: object
properties:
Expand Down Expand Up @@ -17458,6 +17501,36 @@ components:
started:
type: boolean
description: If true, a new operation was started.
StartOperationRequest:
type: object
properties:
service:
type: string
description: Name of service to start the operation in.
operation:
type: string
description: Type of operation to start.
requestId:
type: string
description: A request ID that can be used as an idempotentency key.
callback:
type: string
description: Callback URL to call upon completion if the started operation is async.
payload:
allOf:
- $ref: '#/components/schemas/Payload'
description: Full request body from the incoming HTTP request.
callbackHeader:
type: object
additionalProperties:
type: string
description: Header that is expected to be attached to the callback request when the operation completes.
links:
type: array
items:
$ref: '#/components/schemas/Link'
description: Links contain caller information and can be attached to the operations started by the handler.
description: A request to start an operation.
StartWorkflowExecutionRequest:
type: object
properties:
Expand Down Expand Up @@ -17601,6 +17674,10 @@ components:
allOf:
- $ref: '#/components/schemas/TimeSkippingConfig'
description: Time-skipping configuration. If not set, time skipping is disabled.
propagatedNexusSerializationContext:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: Serialization context propagated from the Nexus caller that started this workflow.
StartWorkflowExecutionResponse:
type: object
properties:
Expand Down Expand Up @@ -20090,6 +20167,10 @@ components:
description: |-
Information about time skipping of the workflow execution.
If the execution has never enabled time skipping, it will be nil.
propagatedNexusSerializationContext:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: Serialization context propagated from the Nexus caller that started this workflow.
description: Holds all the extra information about workflow execution that is not part of Visibility.
WorkflowExecutionFailedEventAttributes:
type: object
Expand Down Expand Up @@ -20634,6 +20715,10 @@ components:
description: |-
The time-skipping state propagated from a previous run of this workflow. This can be nil
if no time skipping has occurred or there is no previous run.
propagatedNexusSerializationContext:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: Serialization context propagated from the Nexus caller that started this workflow.
description: Always the first event in workflow history
WorkflowExecutionTerminatedEventAttributes:
type: object
Expand Down
4 changes: 4 additions & 0 deletions temporal/api/activity/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "temporal/api/enums/v1/activity.proto";
import "temporal/api/callback/v1/message.proto";
import "temporal/api/enums/v1/workflow.proto";
import "temporal/api/failure/v1/message.proto";
import "temporal/api/nexus/v1/message.proto";
import "temporal/api/taskqueue/v1/message.proto";
import "temporal/api/sdk/v1/user_metadata.proto";

Expand Down Expand Up @@ -195,6 +196,9 @@ message ActivityExecutionInfo {
// The time at which the first activity task is made available for dispatch, computed as
// `schedule_time + start_delay`. Same as `schedule_time` if `start_delay` is not set.
google.protobuf.Timestamp execution_time = 38;

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

// Limited activity information returned in the list response.
Expand Down
3 changes: 3 additions & 0 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import "temporal/api/enums/v1/workflow.proto";
import "temporal/api/common/v1/message.proto";
import "temporal/api/deployment/v1/message.proto";
import "temporal/api/failure/v1/message.proto";
import "temporal/api/nexus/v1/message.proto";
import "temporal/api/taskqueue/v1/message.proto";
import "temporal/api/update/v1/message.proto";
import "temporal/api/workflow/v1/message.proto";
Expand Down Expand Up @@ -213,6 +214,8 @@ message WorkflowExecutionStartedEventAttributes {
// if no time skipping has occurred or there is no previous run.
temporal.api.common.v1.TimeSkippingStatePropagation time_skipping_state_propagation = 43;

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


Expand Down
7 changes: 7 additions & 0 deletions temporal/api/nexus/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ import "temporal/api/enums/v1/nexus.proto";
import "temporal/api/failure/v1/message.proto";
import "temporal/api/sdk/v1/user_metadata.proto";

// PropagatedSerializationContext represents the context of the Nexus caller that started this execution.
message PropagatedSerializationContext {
string endpoint = 1;
string service = 2;
string operation = 3;
}

// A general purpose failure message.
// See: https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure
message Failure {
Expand Down
Loading
Loading