You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-orchestration-versioning.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,17 +40,17 @@ The Orchestration Versioning feature operates on these core principles:
40
40
41
41
1.**Version-aware Execution**: Orchestrator function code can examine the version value associated with the current orchestration instance and branch execution accordingly.
42
42
43
-
1.**Backward Compatibility**: Workers running newer versions can continue executing orchestration instances created by older versions.
43
+
2.**Backward Compatibility**: Workers running newer orchestrator versions can continue executing orchestration instances created by older orchestrator versions.
44
44
45
-
1.**Forward Protection**: The runtime automatically prevents workers running older versions from executing newer version orchestrations.
45
+
3.**Forward Protection**: The runtime automatically prevents workers running older orchestrator versions from executing orchestrations with newer versions.
46
46
47
47
> [!IMPORTANT]
48
48
> 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**.
49
49
> Support for other languages (JavaScript, Python, PowerShell, Java) is coming soon.
50
50
51
51
## Basic usage
52
52
53
-
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 orchestration 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.
53
+
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 orchestration 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 orchestration version and branch execution accordingly. Let's walk through the required steps.
54
54
55
55
### Step 1: defaultVersion Configuration
56
56
@@ -76,10 +76,10 @@ After you set the `defaultVersion`, all new orchestration instances will be perm
76
76
77
77
### Step 2: Orchestrator Function Logic
78
78
79
-
To implement version-aware logic in your orchestrator function, you can use the context parameter passed to the orchestrator to access the current orchestration instance's version, which allows you to branch your orchestration logic based on the version.
79
+
To implement version-aware logic in your orchestrator function, you can use the context parameter passed to the orchestrator to access the current orchestration instance's version, which allows you to branch your orchestrator logic based on the version.
80
80
81
81
> [!IMPORTANT]
82
-
> When implementing version-aware logic, it's **critically important** to preserve the exact orchestration logic for older versions. Any changes to the sequence, order, or signature of activity calls for existing versions may break deterministic replay and cause in-flight orchestrations to fail or produce incorrect results. The old version code paths must remain unchanged once deployed.
82
+
> When implementing version-aware logic, it's **critically important** to preserve the exact orchestrator logic for older versions. Any changes to the sequence, order, or signature of activity calls for existing versions may break deterministic replay and cause in-flight orchestrations to fail or produce incorrect results. The old version code paths must remain unchanged once deployed.
83
83
84
84
# [C# (Isolated)](#tab/csharp-isolated)
85
85
@@ -240,11 +240,11 @@ The `versionMatchStrategy` setting determines how the runtime matches orchestrat
240
240
241
241
**Available strategies:**
242
242
243
-
-**`None`**: Ignore orchestration version completely. All work received is processed regardless of version. This strategy effectively disables version checking and allows any worker to process any orchestration instance.
243
+
-**`None`**: Ignore orchestration version completely. All work received is processed regardless of version. This strategy effectively disables version checking and allows any worker to process any orchestration instance (not recommended).
244
244
245
-
-**`Strict`**: Only process tasks from orchestrations with the exact same version as the worker. This strategy provides the highest level of version isolation but requires careful deployment coordination to avoid orphaned orchestrations.
245
+
-**`Strict`**: Only process tasks from orchestrations with the exact same version as the version specified by `defaultVersion` in the worker's `host.json`. This strategy provides the highest level of version isolation but requires careful deployment coordination to avoid orphaned orchestrations.
246
246
247
-
-**`CurrentOrOlder`** (default): Process tasks from orchestrations whose version is less than or equal to the worker's version. This strategy enables backward compatibility, allowing newer workers to handle orchestrations started by older versions while preventing older workers from processing newer orchestrations.
247
+
-**`CurrentOrOlder`** (default): Process tasks from orchestrations whose version is less than or equal to the version specified by `defaultVersion` in the worker's `host.json`. This strategy enables backward compatibility, allowing newer workers to handle orchestrations started by older orchestrator versions while preventing older workers from processing newer orchestrations.
248
248
249
249
**Version comparison for `CurrentOrOlder` strategy:**
250
250
@@ -360,8 +360,8 @@ Over time, you may want to remove legacy code paths from your orchestrator funct
360
360
-**Issue**: Orchestration instances created with version 1.0 are failing after deploying version 2.0
361
361
-**Solution**: Ensure the version 1.0 code path in your orchestrator remains exactly the same. Any changes to the execution sequence may break deterministic replay.
362
362
363
-
-**Issue**: Workers running older version can't execute new orchestrations
364
-
-**Solution**: This is expected behavior. The runtime intentionally prevents older workers from executing newer orchestrations to maintain safety. Ensure all workers are updated to the latest version. You can modify this behavior if needed using the advanced configuration options (see [Advanced usage](#advanced-usage) for details).
363
+
-**Issue**: Workers running older orchestrator versions can't execute new orchestrations
364
+
-**Solution**: This is expected behavior. The runtime intentionally prevents older workers from executing orchestrations with newer versions to maintain safety. Ensure all workers are updated to the latest orchestrator version and their `defaultVersion` setting in `host.json` is updated accordingly. You can modify this behavior if needed using the advanced configuration options (see [Advanced usage](#advanced-usage) for details).
365
365
366
366
-**Issue**: Version information isn't available in orchestrator (`context.Version` is null, regardless of the `defaultVersion` setting)
367
367
-**Solution**: Verify that you're using a supported language and a Durable Functions extension version that supports Orchestration Versioning:
0 commit comments