Skip to content

Commit e256b40

Browse files
committed
Add author tags, update ToC
Signed-off-by: Hal Spang <[email protected]>
1 parent 45323e5 commit e256b40

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

articles/azure-functions/durable/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@
124124
href: ./durable-task-scheduler/durable-task-scheduler-dashboard.md
125125
- name: Auto-purge
126126
href: ./durable-task-scheduler/durable-task-scheduler-auto-purge.md
127-
- name: Versioning
128-
href: ./durable-task-scheduler/durable-task-scheduler-versioning.md
129127
- name: Durable Functions
130128
items:
131129
- name: Throughput benchmark
@@ -136,6 +134,8 @@
136134
items:
137135
- name: Configure autoscale for Azure Container Apps hosting
138136
href: ./durable-task-scheduler/durable-task-scheduler-auto-scaling.md
137+
- name: Versioning
138+
href: ./durable-task-scheduler/durable-task-scheduler-versioning.md
139139
- name: Billing
140140
href: ./durable-task-scheduler/durable-task-scheduler-dedicated-sku.md
141141
- name: Troubleshoot

articles/azure-functions/durable/durable-task-scheduler/durable-task-scheduler-versioning.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ title: Configure Versioning for Durable Task Scheduler (preview)
33
description: Learn how to use orchestration versioning in Durable Task Scheduler.
44
ms.topic: how-to
55
ms.date: 07/16/2025
6+
author: halspang
7+
ms.author: azfuncdf
68
zone_pivot_groups: df-languages
79
---
810

911
# Orchestration Versioning
1012

11-
A key area to consider when using a durable orchestration system is how to handle the upgrading/downgrading of orchestrations. When an orchestration is interrupted and later resumed (for instance, during a host update), Durable Task Scheduler will replay the events of the orchestration. This is done to ensure that the orchestration executes the same steps each time which is a core promise of the durable execution paradigm. So, if an orchestration changes between deployments, the steps it takes may no longer be the same. If this does happen, the system will provide a `NonDeterministicError` instead of allowing the orchestration to continue.
13+
A key area to consider when using a durable orchestration system is how to handle the upgrading/downgrading of orchestrations. When an orchestration is interrupted and later resumed (for instance, during a host update), Durable Task Scheduler will replay the events of the orchestration. This is done to ensure reliability - the system replays to ensure all previous steps were executed successfully before the next step is taken - which is a core promise of the durable execution paradigm. So, if an orchestration changes between deployments, the steps it takes may no longer be the same. If this does happen, the system will throw a `NonDeterministicError` instead of allowing the orchestration to continue.
1214

13-
Now, with orchestration versioning, there is a way to prevent this and work seamlessly with new (or old) orchestrations. Durable Task Scheduler has two different styles of versioning which will be explored below. Note that the different versioning styles can be used separately or together.
15+
Orchestration versioning helps to prevent problems related to non-determinism, allowing you to work seamlessly with new (or old) orchestrations. Durable Task Scheduler has two different styles of versioning which will be explored below. Note that the different versioning styles can be used separately or together.
1416

1517
::: zone pivot="javascript"
1618

@@ -27,20 +29,23 @@ Now, with orchestration versioning, there is a way to prevent this and work seam
2729
::: zone pivot="python"
2830

2931
> [!IMPORTANT]
30-
> Currently, versioning is not available in the Python SDK.
32+
> Currently, versioning isn't available in the Python SDK.
3133
3234
::: zone-end
3335

3436
::: zone pivot="csharp,java"
3537

36-
## Client/Context Based Conditional Versioning
38+
## Client/context-based conditional versioning
3739

38-
In order for an orchestration to have a version, it must first be set in the client. For the .NET SDK, this is done through the standard host builder extensions, as seeen below:
40+
In order for an orchestration to have a version, it must first be set in the client. For the .NET SDK, this is done through the standard host builder extensions, as seen below:
3941

4042
::: zone-end
4143

4244
::: zone pivot="csharp"
4345

46+
> [!NOTE]
47+
> Available in the .NET SDK since v1.9.0.
48+
4449
```csharp
4550
builder.Services.AddDurableTaskClient(builder =>
4651
{
@@ -53,6 +58,9 @@ builder.Services.AddDurableTaskClient(builder =>
5358

5459
::: zone pivot="java"
5560

61+
> [!NOTE]
62+
> Available in the Java SDK since v1.6.0.
63+
5664
```java
5765
public DurableTaskClient durableTaskClient(DurableTaskProperties properties) {
5866
// Create client using Azure-managed extensions
@@ -66,9 +74,9 @@ public DurableTaskClient durableTaskClient(DurableTaskProperties properties) {
6674

6775
::: zone pivot="csharp,java"
6876

69-
Once that is added, any orchestration started by this host will use the version `1.0.0`. The version itself is a simple string and accepts any value. However, the SDK will try and convert it to .NET's `System.Version`. If it can be converted, that library is used for comparison, if not, a simple string comparison is used.
77+
Once that is added, any orchestration started by this host will use the version `1.0.0`. The version itself is a simple string and accepts any value. However, the SDK will try to convert it to .NET's `System.Version`. If it can be converted, that library is used for comparison, if not, a simple string comparison is used.
7078

71-
By supplying the version in the client, it also becomes available in the `TaskOrchestrationContext`. This means the version can be used in conditional statements. So, as long as newer versions of an orchestration have the appropriate version gating, both the old and the new version so of the orchestration can run together on the same host. An example of how the version can be used can be seen below:
79+
By supplying the version in the client, it also becomes available in the `TaskOrchestrationContext`. This means the version can be used in conditional statements. So long as newer versions of an orchestration have the appropriate version gating, both the old and the new version of the orchestration can run together on the same host. An example of how the version can be used is:
7280

7381
::: zone-end
7482

@@ -124,24 +132,24 @@ public TaskOrchestration create() {
124132

125133
In this example, we've added a `SayGoodbye` activity to the `HelloCities` orchestration. This is only called if the orchestration is at least version `2.0.0`. With the simple conditional statement, any orchestration with a version less than `2.0.0` will continue to function and any new orchestration will have the new activity in it.
126134

127-
### When to Use Client Versioning
135+
### When to use client versioning
128136

129137
Client versioning provides the simplest mechanism for versioning orchestrations, but interacting with the version is also the most programming intensive. Essentially, the two functionalities that client versioning provides are the ability to set a version for all orchestrations and the ability to programmatically handle the version in the orchestration. It should be used if a standard version is desired across all versions or if custom logic around specific versions is required.
130138

131-
## Worker Based Versioning
139+
## Worker-based versioning
132140

133-
An additional strategy that can be used for handling versions is setting up worker versioning. Orchestrations will still need a client version in order to have the version set, but this method allows the user to avoid conditionals in their orchestrations. Worker versioning allows the worker itself to choose how to act on different version so of orchestrations before those orchestrations start executing. Worker versioning has several fields to set, which are detailed below:
141+
An additional strategy that can be used for handling versions is setting up worker versioning. Orchestrations will still need a client version in order to have the version set, but this method allows the user to avoid conditionals in their orchestrations. Worker versioning allows the worker itself to choose how to act on different version of orchestrations before those orchestrations start executing. Worker versioning requires the following fields to be set:
134142

135143
1. The version of the worker itself
136-
2. The default version that will be applied to sub-orchestrations started by the worker
144+
2. The default version that will be applied to suborchestrations started by the worker
137145
3. The strategy that the worker will use to match against the orchestration's version
138-
4. The strategy that the worker should take if the version does not meet the matching strategy
146+
4. The strategy that the worker should take if the version doesn't meet the matching strategy
139147

140148
The different match strategies are as follows:
141149

142150
| Name | Description |
143151
|----------------|------------------------------------------------------------------------------------------|
144-
| None | The version is not considered when work is being processed |
152+
| None | The version isn't considered when work is being processed |
145153
| Strict | The version in the orchestration and the worker must match exactly |
146154
| CurrentOrOlder | The version in the orchestration must be equal to or less than the version in the worker |
147155

@@ -225,12 +233,12 @@ private static DurableTaskGrpcWorker createTaskHubServer() {
225233

226234
::: zone pivot="csharp,java"
227235

228-
The `Reject` failure strategy should be used when the desired behavior is to have the orchestration try again at a later time/on a different worker. When an orchestration is rejected, it is simply returned to the work queue. When it is dequeued again, it could land on a different worker or the same one again. The process will repeat until a worker that can actually handle the orchestration is available. This strategy allows for the seamless handling of deployments in which an orchestration is updated. As the deployment progresses, workers that cannot handle the orchestration will reject it while workers that can handle it will. The ability to have mixed workers/orchestration versions allows for scenarios like blue-green deployments.
236+
The `Reject` failure strategy should be used when the desired behavior is to have the orchestration try again at a later time/on a different worker. When an orchestration is rejected, it's simply returned to the work queue. When it's dequeued again, it could land on a different worker or the same one again. The process will repeat until a worker that can actually handle the orchestration is available. This strategy allows for the seamless handling of deployments in which an orchestration is updated. As the deployment progresses, workers that can't handle the orchestration will reject it while workers that can handle it will process it. The ability to have mixed workers/orchestration versions allows for scenarios like blue-green deployments.
229237

230-
The `Fail` failure strategy should be used when no other versions are expected. In this case, the new version is an anomoly and no worker should even attempt to work on it. So, the Durable Task Scheduler will fail the orchestration, putting it in a terminal state.
238+
The `Fail` failure strategy should be used when no other versions are expected. In this case, the new version is an anomaly and no worker should even attempt to work on it. So, the Durable Task Scheduler will fail the orchestration, putting it in a terminal state.
231239

232240
### When to Use Worker Versioning
233241

234-
Worker versioning should be used in instances where the desired reaction for an orchestration of an unknown or unsupported version should not be worked on at all. Instead of placing version handling code in the worker, worker versioning stops the orchestration from ever executing. This allows for much simpler code in the orchestrations themselves. Without any code changes to them, various deployment scenarios can be handled, like blue-green deployments mentioned before.
242+
Worker versioning should be used in scenarios where orchestrations of an unknown or unsupported version shouldn't be executed at all. Instead of placing version handling code in the worker, worker versioning stops the orchestration from ever executing. This allows for much simpler orchestration code. Without any code changes, various deployment scenarios can be handled, like blue-green deployments mentioned before.
235243

236244
::: zone-end

0 commit comments

Comments
 (0)