Skip to content

Commit 399eaf0

Browse files
Add PropagatedNexusSerializationContext
1 parent f53963d commit 399eaf0

7 files changed

Lines changed: 108 additions & 0 deletions

File tree

openapi/openapiv2.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12335,6 +12335,10 @@
1233512335
"startDelay": {
1233612336
"type": "string",
1233712337
"description": "Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts."
12338+
},
12339+
"propagatedNexusSerializationContext": {
12340+
"$ref": "#/definitions/v1PropagatedNexusSerializationContext",
12341+
"description": "Serialization context propagated from the Nexus caller that started this activity."
1233812342
}
1233912343
}
1234012344
},
@@ -12584,6 +12588,10 @@
1258412588
"timeSkippingConfig": {
1258512589
"$ref": "#/definitions/v1TimeSkippingConfig",
1258612590
"description": "Time-skipping configuration. If not set, time skipping is disabled."
12591+
},
12592+
"propagatedNexusSerializationContext": {
12593+
"$ref": "#/definitions/v1PropagatedNexusSerializationContext",
12594+
"description": "Serialization context propagated from the Nexus caller that started this workflow."
1258712595
}
1258812596
}
1258912597
},
@@ -13104,6 +13112,10 @@
1310413112
"$ref": "#/definitions/apiCommonV1Link"
1310513113
},
1310613114
"description": "Links to be associated with this update."
13115+
},
13116+
"propagatedNexusSerializationContext": {
13117+
"$ref": "#/definitions/v1PropagatedNexusSerializationContext",
13118+
"description": "Serialization context propagated from the Nexus caller that started this update."
1310713119
}
1310813120
},
1310913121
"description": "The request information that will be delivered all the way down to the\nWorkflow Execution."
@@ -13518,6 +13530,10 @@
1351813530
"type": "string",
1351913531
"format": "date-time",
1352013532
"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."
13533+
},
13534+
"propagatedNexusSerializationContext": {
13535+
"$ref": "#/definitions/v1PropagatedNexusSerializationContext",
13536+
"description": "Serialization context propagated from the Nexus caller that started this activity."
1352113537
}
1352213538
},
1352313539
"description": "Information about a standalone activity."
@@ -18066,6 +18082,10 @@
1806618082
"pollerGroupsInfo": {
1806718083
"$ref": "#/definitions/v1PollerGroupsInfo",
1806818084
"description": "The weighted, versioned list of poller groups IDs that client should use for future polls to\nthis task queue. Client should ignore this if it has already applied a snapshot with a\nversion greater than or equal to `poller_groups_info.version`. Client is expected to:\n 1. Maintain minimum number of pollers no less than the number of groups.\n 2. Try to assign the next poll to a group without any pending polls,\n 3. If every group has some pending polls, assign the next poll to a group randomly\n according to the weights."
18085+
},
18086+
"propagatedNexusSerializationContext": {
18087+
"$ref": "#/definitions/v1PropagatedNexusSerializationContext",
18088+
"description": "Serialization context propagated from the Nexus caller that started this workflow."
1806918089
}
1807018090
}
1807118091
},
@@ -18181,6 +18201,22 @@
1818118201
},
1818218202
"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.)"
1818318203
},
18204+
"v1PropagatedNexusSerializationContext": {
18205+
"type": "object",
18206+
"properties": {
18207+
"endpoint": {
18208+
"type": "string"
18209+
},
18210+
"service": {
18211+
"type": "string"
18212+
},
18213+
"operation": {
18214+
"type": "string",
18215+
"description": "If more context is needed, this message can be extended with additional fields."
18216+
}
18217+
},
18218+
"description": "PropagatedNexusSerializationContext represents the context of the Nexus caller that started this entity.\nIf multiple Nexus callers attempt to attach to the same entity the server will verify that\neach field matches, if any field does not match then the request will be rejected."
18219+
},
1818418220
"v1QueryRejectCondition": {
1818518221
"type": "string",
1818618222
"enum": [
@@ -18421,6 +18457,10 @@
1842118457
"$ref": "#/definitions/v1Link"
1842218458
},
1842318459
"description": "Links to be associated with this update."
18460+
},
18461+
"propagatedNexusSerializationContext": {
18462+
"$ref": "#/definitions/v1PropagatedNexusSerializationContext",
18463+
"description": "Serialization context propagated from the Nexus caller that started this update."
1842418464
}
1842518465
},
1842618466
"description": "The client request that triggers a Workflow Update."
@@ -21086,6 +21126,10 @@
2108621126
"pauseInfo": {
2108721127
"$ref": "#/definitions/v1WorkflowExecutionPauseInfo",
2108821128
"description": "Information about the workflow execution pause operation."
21129+
},
21130+
"propagatedNexusSerializationContext": {
21131+
"$ref": "#/definitions/v1PropagatedNexusSerializationContext",
21132+
"description": "Serialization context propagated from the Nexus caller that started this workflow."
2108921133
}
2109021134
},
2109121135
"description": "Holds all the extra information about workflow execution that is not part of Visibility."

openapi/openapiv3.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9861,6 +9861,10 @@ components:
98619861
The time at which the first activity task is made available for dispatch, computed as
98629862
`schedule_time + start_delay`. Same as `schedule_time` if `start_delay` is not set.
98639863
format: date-time
9864+
propagatedNexusSerializationContext:
9865+
allOf:
9866+
- $ref: '#/components/schemas/PropagatedNexusSerializationContext'
9867+
description: Serialization context propagated from the Nexus caller that started this activity.
98649868
description: Information about a standalone activity.
98659869
ActivityExecutionListInfo:
98669870
type: object
@@ -14516,6 +14520,10 @@ components:
1451614520
2. Try to assign the next poll to a group without any pending polls,
1451714521
3. If every group has some pending polls, assign the next poll to a group randomly
1451814522
according to the weights.
14523+
propagatedNexusSerializationContext:
14524+
allOf:
14525+
- $ref: '#/components/schemas/PropagatedNexusSerializationContext'
14526+
description: Serialization context propagated from the Nexus caller that started this workflow.
1451914527
PollerGroupInfo:
1452014528
type: object
1452114529
properties:
@@ -14727,6 +14735,20 @@ components:
1472714735

1472814736
Not all queues in the system may support the "full" semantics of all priority
1472914737
fields. (Currently only support in matching task queues is planned.)
14738+
PropagatedNexusSerializationContext:
14739+
type: object
14740+
properties:
14741+
endpoint:
14742+
type: string
14743+
service:
14744+
type: string
14745+
operation:
14746+
type: string
14747+
description: If more context is needed, this message can be extended with additional fields.
14748+
description: |-
14749+
PropagatedNexusSerializationContext represents the context of the Nexus caller that started this entity.
14750+
If multiple Nexus callers attempt to attach to the same entity the server will verify that
14751+
each field matches, if any field does not match then the request will be rejected.
1473014752
QueryRejected:
1473114753
type: object
1473214754
properties:
@@ -14989,6 +15011,10 @@ components:
1498915011
items:
1499015012
$ref: '#/components/schemas/Link'
1499115013
description: Links to be associated with this update.
15014+
propagatedNexusSerializationContext:
15015+
allOf:
15016+
- $ref: '#/components/schemas/PropagatedNexusSerializationContext'
15017+
description: Serialization context propagated from the Nexus caller that started this update.
1499215018
description: The client request that triggers a Workflow Update.
1499315019
RequestCancelActivityExecutionRequest:
1499415020
type: object
@@ -16754,6 +16780,10 @@ components:
1675416780
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1675516781
type: string
1675616782
description: Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.
16783+
propagatedNexusSerializationContext:
16784+
allOf:
16785+
- $ref: '#/components/schemas/PropagatedNexusSerializationContext'
16786+
description: Serialization context propagated from the Nexus caller that started this activity.
1675716787
StartActivityExecutionResponse:
1675816788
type: object
1675916789
properties:
@@ -17212,6 +17242,10 @@ components:
1721217242
allOf:
1721317243
- $ref: '#/components/schemas/TimeSkippingConfig'
1721417244
description: Time-skipping configuration. If not set, time skipping is disabled.
17245+
propagatedNexusSerializationContext:
17246+
allOf:
17247+
- $ref: '#/components/schemas/PropagatedNexusSerializationContext'
17248+
description: Serialization context propagated from the Nexus caller that started this workflow.
1721517249
StartWorkflowExecutionResponse:
1721617250
type: object
1721717251
properties:
@@ -19635,6 +19669,10 @@ components:
1963519669
allOf:
1963619670
- $ref: '#/components/schemas/WorkflowExecutionPauseInfo'
1963719671
description: Information about the workflow execution pause operation.
19672+
propagatedNexusSerializationContext:
19673+
allOf:
19674+
- $ref: '#/components/schemas/PropagatedNexusSerializationContext'
19675+
description: Serialization context propagated from the Nexus caller that started this workflow.
1963819676
description: Holds all the extra information about workflow execution that is not part of Visibility.
1963919677
WorkflowExecutionFailedEventAttributes:
1964019678
type: object

temporal/api/activity/v1/message.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ message ActivityExecutionInfo {
191191
// The time at which the first activity task is made available for dispatch, computed as
192192
// `schedule_time + start_delay`. Same as `schedule_time` if `start_delay` is not set.
193193
google.protobuf.Timestamp execution_time = 38;
194+
195+
// Serialization context propagated from the Nexus caller that started this activity.
196+
temporal.api.common.v1.PropagatedNexusSerializationContext propagated_nexus_serialization_context = 39;
194197
}
195198

196199
// Limited activity information returned in the list response.

temporal/api/common/v1/message.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ message Header {
6060
map<string, Payload> fields = 1;
6161
}
6262

63+
// PropagatedNexusSerializationContext represents the context of the Nexus caller that started this entity.
64+
// If multiple Nexus callers attempt to attach to the same entity the server will verify that
65+
// each field matches, if any field does not match then the request will be rejected.
66+
message PropagatedNexusSerializationContext {
67+
string endpoint = 1;
68+
string service = 2;
69+
// If more context is needed, this message can be extended with additional fields.
70+
string operation = 3;
71+
}
72+
6373
// Identifies a specific workflow within a namespace. Practically speaking, because run_id is a
6474
// uuid, a workflow execution is globally unique. Note that many commands allow specifying an empty
6575
// run id as a way of saying "target the latest run of the workflow".

temporal/api/update/v1/message.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ message Request {
6868
repeated temporal.api.common.v1.Callback completion_callbacks = 4;
6969
// Links to be associated with this update.
7070
repeated temporal.api.common.v1.Link links = 5;
71+
// Serialization context propagated from the Nexus caller that started this update.
72+
temporal.api.common.v1.PropagatedNexusSerializationContext propagated_nexus_serialization_context = 6;
7173
}
7274

7375
// An Update protocol message indicating that a Workflow Update has been rejected.

temporal/api/workflow/v1/message.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ message WorkflowExecutionExtendedInfo {
134134

135135
// Information about the workflow execution pause operation.
136136
WorkflowExecutionPauseInfo pause_info = 8;
137+
138+
// Serialization context propagated from the Nexus caller that started this workflow.
139+
temporal.api.common.v1.PropagatedNexusSerializationContext propagated_nexus_serialization_context = 9;
137140
}
138141

139142
// Holds all the information about worker versioning for a particular workflow execution.

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ message StartWorkflowExecutionRequest {
217217

218218
// Time-skipping configuration. If not set, time skipping is disabled.
219219
temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 29;
220+
// Serialization context propagated from the Nexus caller that started this workflow.
221+
temporal.api.common.v1.PropagatedNexusSerializationContext propagated_nexus_serialization_context = 30;
220222
}
221223

222224
message StartWorkflowExecutionResponse {
@@ -382,6 +384,8 @@ message PollWorkflowTaskQueueResponse {
382384
// 3. If every group has some pending polls, assign the next poll to a group randomly
383385
// according to the weights.
384386
temporal.api.taskqueue.v1.PollerGroupsInfo poller_groups_info = 19;
387+
// Serialization context propagated from the Nexus caller that started this workflow.
388+
temporal.api.common.v1.PropagatedNexusSerializationContext propagated_nexus_serialization_context = 20;
385389
}
386390

387391
message RespondWorkflowTaskCompletedRequest {
@@ -610,6 +614,8 @@ message PollActivityTaskQueueResponse {
610614
// 3. If every group has some pending polls, assign the next poll to a group randomly
611615
// according to the weights.
612616
temporal.api.taskqueue.v1.PollerGroupsInfo poller_groups_info = 22;
617+
// Serialization context propagated from the Nexus caller that started this activity.
618+
temporal.api.common.v1.PropagatedNexusSerializationContext propagated_nexus_serialization_context = 23;
613619
}
614620

615621
message RecordActivityTaskHeartbeatRequest {
@@ -3246,6 +3252,8 @@ message StartActivityExecutionRequest {
32463252
temporal.api.common.v1.OnConflictOptions on_conflict_options = 21;
32473253
// Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.
32483254
google.protobuf.Duration start_delay = 22;
3255+
// Serialization context propagated from the Nexus caller that started this activity.
3256+
temporal.api.common.v1.PropagatedNexusSerializationContext propagated_nexus_serialization_context = 23;
32493257
}
32503258

32513259
message StartActivityExecutionResponse {

0 commit comments

Comments
 (0)