Skip to content

Commit 77cd4d1

Browse files
AnatoliBlilyjma
andauthored
Apply suggestions from code review
Co-authored-by: lilyjma <[email protected]>
1 parent 9cc7c3d commit 77cd4d1

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

articles/azure-functions/durable/durable-functions-orchestration-versioning.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ ms.custom: fasttrack-edit
1212
# Orchestration Versioning in Durable Functions (Azure Functions)
1313

1414
> [!IMPORTANT]
15-
> Orchestration Versioning is currently in public preview for apps running in the .NET isolated model. Support for other languages (JavaScript, Python, PowerShell, Java) is coming soon.
15+
> Orchestration Versioning is currently in public preview for apps running in the .NET isolated model. Use `Microsoft.Azure.Functions.Worker.Extensions.DurableTask` package version **>=1.5.0**.
16+
> Support for other languages (JavaScript, Python, PowerShell, Java) is coming soon.
1617
1718
The Orchestration Versioning feature allows different versions of orchestrations to coexist and execute concurrently without conflicts and nondeterminism issues, making it possible to deploy updates without draining in-flight orchestration instances first. Thus, this feature brings various benefits related to deploying orchestration changes. For example, you can achieve zero-downtime deployment even making breaking changes to your orchestrations.
1819

@@ -43,7 +44,7 @@ The Orchestration Versioning feature operates on these core principles:
4344

4445
## Basic usage
4546

46-
The most common use case for Orchestration Versioning is when you need to make breaking changes to your orchestration logic while keeping existing in-flight instances running with their original version. All you need to do is update the `defaultVersion` in your `host.json` and modify your orchestrator code to check the version and branch execution accordingly. Let's walk through the required steps.
47+
The most common use case for Orchestration Versioning is when you need to make breaking changes to your orchestrator logic while keeping existing in-flight orchestrations instances running with their original version. All you need to do is update the `defaultVersion` in your `host.json` and modify your orchestrator code to check the version and branch execution accordingly. Let's walk through the required steps.
4748

4849
### Step 1: defaultVersion Configuration
4950

@@ -98,7 +99,7 @@ public static async Task<string> RunOrchestrator(
9899
---
99100

100101
> [!NOTE]
101-
> The `context.Version` property is **read-only** and reflects the version that was permanently associated with the orchestration instance when it was created. You cannot modify this value during orchestration execution. If you need to specify a version in your app code, you can do so when starting the orchestration instance using the orchestration client APIs (see [Starting New Orchestrations with Specific Versions](#starting-new-orchestrations-with-specific-versions)).
102+
> The `context.Version` property is **read-only** and reflects the version that was permanently associated with the orchestration instance when it was created. You cannot modify this value during orchestration execution. If you want to specify a version through means other than `host.json`, you can do so when starting an orchestration instance with the orchestration client APIs, (see [Starting New Orchestrations with Specific Versions](#starting-new-orchestrations-with-specific-versions)).
102103
103104
> [!TIP]
104105
> If you're just starting to use Orchestration Versioning and you already have in-flight orchestrations that were created before you specified a `defaultVersion`, it's not too late! Feel free to add the `defaultVersion` setting to your `host.json` now. For all previously created orchestrations, `context.Version` returns `null` (or an equivalent language-dependent value), so you can structure your orchestrator logic to handle both the legacy (null version) and new versioned orchestrations accordingly. In C#, you can check for `context.Version == null` or `context.Version is null` to handle the legacy case. Please also note that specifying `"defaultVersion": null` in `host.json` is equivalent to not specifying it at all.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,15 @@ Because of these potential failures, the "do nothing" strategy is not recommende
206206
> [!NOTE]
207207
> Orchestration Versioning is currently in public preview.
208208
209-
Orchestration Versioning is a built-in feature that enables [zero-downtime deployments](durable-functions-zero-downtime-deployment.md) with breaking changes. This approach allows different versions of orchestrations to coexist and execute concurrently without conflicts.
209+
The Orchestration Versioning feature allows different versions of orchestrations to coexist and execute concurrently without conflicts and non-determinism issues, making it possible to deploy updates while allowing in-flight orchestration instances to complete without manual intervention.
210210

211211
With Orchestration Versioning:
212212
- Each orchestration instance gets a version permanently associated with it when created
213213
- Orchestrator functions can examine their version and branch execution accordingly
214214
- Workers running newer orchestrator function versions can continue executing orchestration instances created by older versions
215215
- The runtime prevents workers running older orchestrator function versions from executing orchestrations started by newer versions
216216

217-
This strategy is recommended for applications that need to support breaking changes while maintaining [zero-downtime deployments](durable-functions-zero-downtime-deployment.md). The feature is currently available for .NET in-process and .NET isolated programming models.
217+
This strategy is recommended for applications that need to support breaking changes while maintaining [zero-downtime deployments](durable-functions-zero-downtime-deployment.md). The feature is currently available .NET isolated apps.
218218

219219
For detailed configuration and implementation guidance, see [Orchestration Versioning in Durable Functions](durable-functions-orchestration-versioning.md).
220220

articles/azure-functions/durable/durable-functions-zero-downtime-deployment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The following chart compares the four main strategies to achieve a zero-downtime
2222

2323
| Strategy | When to use | Pros | Cons |
2424
| -------- | ------------ | ---- | ---- |
25-
| [Orchestration Versioning](#orchestration-versioning) | Applications with [breaking changes](durable-functions-versioning.md), especially those that need to support concurrent execution of different orchestration versions. | Enables zero-downtime deployments with breaking changes.<br/>Built-in feature requiring minimal configuration. | Currently limited to .NET in-process and .NET isolated.<br/>Requires careful orchestrator code modifications for version compatibility. |
25+
| [Orchestration Versioning](#orchestration-versioning) | Applications with [breaking changes](durable-functions-versioning.md), especially those that need to support concurrent execution of different orchestration versions. | Enables zero-downtime deployments with breaking changes.<br/>Built-in feature requiring minimal configuration. | Currently limited to .NET isolated.<br/>Requires careful orchestrator code modifications for version compatibility. |
2626
| [Name-based Versioning](#name-based-versioning) | Applications that don't experience frequent [breaking changes.](durable-functions-versioning.md) | Simple to implement. | Increased function app size in memory and number of functions.<br/>Code duplication. |
2727
| [Status check with slot](#status-check-with-slot) | A system that doesn't have long-running orchestrations lasting more than 24 hours or frequently overlapping orchestrations. | Simple code base.<br/>Doesn't require additional function app management. | Requires additional storage account or task hub management.<br/>Requires periods of time when no orchestrations are running. |
2828
| [Application routing](#application-routing) | A system that doesn't have periods of time when orchestrations aren't running, such as those time periods with orchestrations that last more than 24 hours or with frequently overlapping orchestrations. | Handles new versions of systems with continually running orchestrations that have breaking changes. | Requires an intelligent application router.<br/>Could max out the number of function apps allowed by your subscription. The default is 100. |
@@ -39,11 +39,11 @@ The [Orchestration Versioning](durable-functions-orchestration-versioning.md) fe
3939
With Orchestration Versioning:
4040
- Each orchestration instance gets a version permanently associated with it when created.
4141
- Workers running newer versions can continue executing orchestration instances created by older versions.
42-
- Workers running older versions are prevented from executing orchestrations started by newer versions.
42+
- Workers running older orchestration versions _can't_ execute newer version instances.
4343
- Orchestrator functions can examine their version and branch execution accordingly.
4444

4545
This approach facilitates rolling upgrades where workers running different versions of your application can coexist safely. It's the recommended strategy for applications that need to support breaking changes while maintaining zero-downtime deployments.
46-
46+
The Orchestration Versioning feature is **[backend agnostic](./durable-functions-storage-providers.md)**, so you can leverage it regardless of what storage backend your Durable Function app is using.
4747
For detailed configuration and implementation guidance, see [Orchestration Versioning in Durable Functions](durable-functions-orchestration-versioning.md).
4848

4949
## Name-based Versioning

includes/functions-host-json-durabletask.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Task hub names must start with a letter and consist of only letters and numbers.
109109
|Property |Default | Description |
110110
|---------|---------|----------|
111111
|hubName|TestHubName (DurableFunctionsHub if using Durable Functions 1.x)|Alternate [task hub](../articles/azure-functions/durable/durable-functions-task-hubs.md) names can be used to isolate multiple Durable Functions applications from each other, even if they're using the same storage backend.|
112-
|defaultVersion||The default version to assign to new orchestration instances. When specified, new orchestration instances are permanently associated with this version value. Used by the [Orchestration Versioning](../articles/azure-functions/durable/durable-functions-orchestration-versioning.md) feature to enable zero-downtime deployments with breaking changes. You can use any string value for the version.|
112+
|defaultVersion||The default version to assign to new orchestration instances. When specified, new orchestration instances are permanently associated with this version value. Used by the [Orchestration Versioning](../articles/azure-functions/durable/durable-functions-orchestration-versioning.md) feature to enable scenarios like zero-downtime deployments with breaking changes. You can use any string value for the version.|
113113
|versionMatchStrategy|CurrentOrOlder|Determines how orchestration versions are matched when loading orchestrator functions. Valid values are `None`, `Strict`, and `CurrentOrOlder`. For detailed explanations, see [Orchestration Versioning](../articles/azure-functions/durable/durable-functions-orchestration-versioning.md).|
114114
|versionFailureStrategy|Reject|Determines what happens when an orchestration version does not match the current `defaultVersion`. Valid values are `Reject` and `Fail`. For detailed explanations, see [Orchestration Versioning](../articles/azure-functions/durable/durable-functions-orchestration-versioning.md).|
115115
|controlQueueBatchSize|32|The number of messages to pull from the control queue at a time.|

0 commit comments

Comments
 (0)