Skip to content

Commit 3eb3f3c

Browse files
committed
one-of in WorkflowExecutionStartedEventAttributes
1 parent 7f3719d commit 3eb3f3c

File tree

2 files changed

+52
-16
lines changed

2 files changed

+52
-16
lines changed

temporal/api/history/v1/message.proto

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,51 @@ message WorkflowExecutionStartedEventAttributes {
136136
reserved 36;
137137
reserved "parent_pinned_deployment_version";
138138

139-
// If present, the new workflow should start on this version with pinned base behavior.
140-
// Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.
141-
//
142-
// New run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the
143-
// new run's Task Queue belongs to that version.
144-
//
145-
// New run initiated by workflow Cron will never inherit.
146-
//
147-
// New run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time
148-
// of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned
149-
// parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).
150-
//
151-
// Pinned override is inherited if Task Queue of new run is compatible with the override version.
152-
// Override is inherited separately and takes precedence over inherited base version.
153-
temporal.api.deployment.v1.WorkerDeploymentVersion inherited_pinned_version = 37;
139+
// Inherited versioning information from parent or previous workflow execution.
140+
// These two behaviors are mutually exclusive - a workflow either inherits a version
141+
// to which it is pinned to or a version on which it starts its first workflow task.
142+
oneof inherited_versioning_info {
143+
// If present, the new workflow should start on this version with pinned base behavior.
144+
// Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.
145+
//
146+
// New run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the
147+
// new run's Task Queue belongs to that version.
148+
//
149+
// New run initiated by workflow Cron will never inherit.
150+
//
151+
// New run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time
152+
// of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned
153+
// parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).
154+
//
155+
// Pinned override is inherited if Task Queue of new run is compatible with the override version.
156+
// Override is inherited separately and takes precedence over inherited base version.
157+
temporal.api.deployment.v1.WorkerDeploymentVersion inherited_pinned_version = 37;
158+
159+
// If present, the new workflow will commence with AutoUpgrade behavior on the current version of it's Task Queue's Deployment. UserData inconsistencies put forward
160+
// by the eventual consistencies of the matching partitions shall be resolved with the help of the revision number and source deployment version passed in this field.
161+
// In other words, the first workflow task of the new run will be dispatched either to the source deployment version or the current deployment version of the Task Queue's Deployment.
162+
// After the first workflow task, the effective behavior of the workflow depends on worker sent values in subsequent workflow tasks.
163+
// Note: This field is only populated if the Task Queue on which the new run is scheduled belongs to a deployment on which the parent run is running.
164+
//
165+
// New run initiated by workflow ContinueAsNew of an AutoUpgrade run, or a child workflow of an AutoUpgrade parent, will inherit the
166+
// previous run's AutoUpgrade behavior and the source deployment version passed in this field.
167+
// Both Matching and History service shall then use the revision number to determine the deployment version on which the new run will dispatch it's first workflow task.
168+
// This deployment version shall either be the source deployment version, passed down from the parent run, or the current deployment version of the Task Queue's Deployment.
169+
//
170+
// New run initiated by workflow Cron will never inherit the AutoUpgrade behavior.
171+
//
172+
// New run initiated by workflow Retry will only inherit this field if the retried run is effectively AutoUpgrade at the time
173+
// of retry, and the retried run inherited AutoUpgrade behavior when it started (ie. it is a child of a AutoUpgrade
174+
// parent, or a CaN of a AutoUpgrade run, and is running on the same deployment as that of the parent).
175+
InheritedAutoUpgradeInfo inherited_auto_upgrade_info = 39;
176+
}
177+
178+
message InheritedAutoUpgradeInfo {
179+
// The source deployment version of the parent workflow.
180+
temporal.api.deployment.v1.WorkerDeploymentVersion source_deployment_version = 1;
181+
// The revision number of the source deployment version of the parent workflow.
182+
int64 source_deployment_revision_number = 2;
183+
}
154184

155185
// A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and
156186
// eager execution was accepted by the server.

temporal/api/workflow/v1/message.proto

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,14 @@ message WorkflowExecutionVersioningInfo {
160160
//
161161
// For child workflows of Pinned parents, this will be set to the parent's Pinned Version when
162162
// the child starts, so that the child's first workflow task goes to the same Version as the parent.
163+
//
164+
// For child workflows of AutoUpgrade parents, this will be set to the deployment version on which the parent
165+
// is running prior to the dispatching of the child's first workflow task. The child's first workflow task
166+
// will finally be dispatched to either this source deployment version or the current deployment version of it's
167+
// Task Queue's Deployment.
168+
//
163169
// Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`
164-
// will override this value.
170+
// will override this value.
165171
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 7;
166172
// Present if user has set an execution-specific versioning override. This override takes
167173
// precedence over SDK-sent `behavior` (and `version` when override is PINNED). An

0 commit comments

Comments
 (0)