Class WorkflowExecutionVersioningInfo
- Namespace
- Temporalio.Api.Workflow.V1
- Assembly
- Temporalio.dll
Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future.
public sealed class WorkflowExecutionVersioningInfo : IMessage<WorkflowExecutionVersioningInfo>, IEquatable<WorkflowExecutionVersioningInfo>, IDeepCloneable<WorkflowExecutionVersioningInfo>, IBufferMessage, IMessage
- Inheritance
-
WorkflowExecutionVersioningInfo
- Implements
-
IMessage<WorkflowExecutionVersioningInfo>IDeepCloneable<WorkflowExecutionVersioningInfo>IBufferMessageIMessage
- Inherited Members
Constructors
WorkflowExecutionVersioningInfo()
public WorkflowExecutionVersioningInfo()
WorkflowExecutionVersioningInfo(WorkflowExecutionVersioningInfo)
public WorkflowExecutionVersioningInfo(WorkflowExecutionVersioningInfo other)
Parameters
Fields
BehaviorFieldNumber
Field number for the "behavior" field.
public const int BehaviorFieldNumber = 1
Field Value
DeploymentFieldNumber
Field number for the "deployment" field.
public const int DeploymentFieldNumber = 2
Field Value
DeploymentTransitionFieldNumber
Field number for the "deployment_transition" field.
public const int DeploymentTransitionFieldNumber = 4
Field Value
DeploymentVersionFieldNumber
Field number for the "deployment_version" field.
public const int DeploymentVersionFieldNumber = 7
Field Value
VersionFieldNumber
Field number for the "version" field.
public const int VersionFieldNumber = 5
Field Value
VersionTransitionFieldNumber
Field number for the "version_transition" field.
public const int VersionTransitionFieldNumber = 6
Field Value
VersioningOverrideFieldNumber
Field number for the "versioning_override" field.
public const int VersioningOverrideFieldNumber = 3
Field Value
Properties
Behavior
Versioning behavior determines how the server should treat this execution when workers are
upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means
unversioned. See the comments in VersioningBehavior
enum for more info about different
behaviors.
This field is first set after an execution completes its first workflow task on a versioned
worker, and set again on completion of every subsequent workflow task.
For child workflows of Pinned parents, this will be set to Pinned (along with version
) when
the the child starts so that child's first workflow task goes to the same Version as the
parent. After the first workflow task, it depends on the child workflow itself if it wants
to stay pinned or become unpinned (according to Versioning Behavior set in the worker).
Note that behavior
is overridden by versioning_override
if the latter is present.
public VersioningBehavior Behavior { get; set; }
Property Value
Deployment
The worker deployment that completed the last workflow task of this workflow execution. Must
be present if behavior
is set. Absent value means no workflow task is completed, or the
last workflow task was completed by an unversioned worker. Unversioned workers may still send
a deployment value which will be stored here, so the right way to check if an execution is
versioned if an execution is versioned or not is via the behavior
field.
Note that deployment
is overridden by versioning_override
if the latter is present.
Deprecated. Use deployment_version
.
[Obsolete]
public Deployment Deployment { get; set; }
Property Value
DeploymentTransition
When present, indicates the workflow is transitioning to a different deployment. Can
indicate one of the following transitions: unversioned -> versioned, versioned -> versioned
on a different deployment, or versioned -> unversioned.
Not applicable to workflows with PINNED behavior.
When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically
start a transition to the task queue's current deployment if the task queue's current
deployment is different from the workflow's deployment.
If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those
tasks will be redirected to the task queue's current deployment. As soon as a poller from
that deployment is available to receive the task, the workflow will automatically start a
transition to that deployment and continue execution there.
A deployment transition can only exist while there is a pending or started workflow task.
Once the pending workflow task completes on the transition's target deployment, the
transition completes and the workflow's deployment
and behavior
fields are updated per
the worker's task completion response.
Pending activities will not start new attempts during a transition. Once the transition is
completed, pending activities will start their next attempt on the new deployment.
Deprecated. Use version_transition.
[Obsolete]
public DeploymentTransition DeploymentTransition { get; set; }
Property Value
DeploymentVersion
The Worker Deployment Version that completed the last workflow task of this workflow execution.
An absent value means no workflow task is completed, or the workflow is unversioned.
If present, and behavior
is UNSPECIFIED, the last task of this workflow execution was completed
by a worker that is not using versioning but is passing Deployment Name and Build ID.
For child workflows of Pinned parents, this will be set to the parent's Pinned Version when
the child starts, so that the child's first workflow task goes to the same Version as the parent.
Note that if versioning_override.behavior
is PINNED then versioning_override.pinned_version
will override this value.
public WorkerDeploymentVersion DeploymentVersion { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
Parser
public static MessageParser<WorkflowExecutionVersioningInfo> Parser { get; }
Property Value
- MessageParser<WorkflowExecutionVersioningInfo>
Version
Deprecated. Use deployment_version
.
[Obsolete]
public string Version { get; set; }
Property Value
VersionTransition
When present, indicates the workflow is transitioning to a different deployment version
(which may belong to the same deployment name or another). Can indicate one of the following
transitions: unversioned -> versioned, versioned -> versioned
on a different deployment version, or versioned -> unversioned.
Not applicable to workflows with PINNED behavior.
When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically
start a transition to the task queue's current version if the task queue's current version is
different from the workflow's current deployment version.
If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those
tasks will be redirected to the task queue's current version. As soon as a poller from
that deployment version is available to receive the task, the workflow will automatically
start a transition to that version and continue execution there.
A version transition can only exist while there is a pending or started workflow task.
Once the pending workflow task completes on the transition's target version, the
transition completes and the workflow's behavior
, and version
fields are updated per the
worker's task completion response.
Pending activities will not start new attempts during a transition. Once the transition is
completed, pending activities will start their next attempt on the new version.
public DeploymentVersionTransition VersionTransition { get; set; }
Property Value
VersioningOverride
Present if user has set an execution-specific versioning override. This override takes
precedence over SDK-sent behavior
(and version
when override is PINNED). An
override can be set when starting a new execution, as well as afterwards by calling the
UpdateWorkflowExecutionOptions
API.
Pinned overrides are automatically inherited by child workflows.
public VersioningOverride VersioningOverride { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public WorkflowExecutionVersioningInfo Clone()
Returns
- WorkflowExecutionVersioningInfo
A deep clone of this object.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
other
object
Returns
Equals(WorkflowExecutionVersioningInfo)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(WorkflowExecutionVersioningInfo other)
Parameters
other
WorkflowExecutionVersioningInfoAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
input
CodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(WorkflowExecutionVersioningInfo)
Merges the given message into this one.
public void MergeFrom(WorkflowExecutionVersioningInfo other)
Parameters
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
output
CodedOutputStreamCoded output stream to write the data to. Must not be null.