Add ContinueAsNew(ContinueAsNewOptions) override to FunctionsOrchestrationContext#3404
Merged
YunchuWang merged 4 commits intodevfrom Mar 27, 2026
Merged
Conversation
6ff35bf to
3f09bf2
Compare
…ationContext Forward the new ContinueAsNew overload that accepts ContinueAsNewOptions (with NewVersion) to the inner context. Without this override, the base class default silently drops the options, preventing version migration via ContinueAsNew from working in Azure Functions isolated worker. Depends on: microsoft/durabletask-dotnet#682 (adds ContinueAsNewOptions) Requires bumping Microsoft.DurableTask.Worker.Grpc to the version that includes ContinueAsNewOptions.
…or NewVersion support
Align with durabletask-dotnet PR #682: ContinueAsNew now takes a single ContinueAsNewOptions parameter with NewInput, PreserveUnprocessedEvents, and NewVersion folded into the options object.
Update Microsoft.DurableTask.Client.Grpc, Worker.Grpc, and Abstractions from 1.23.0 to 1.23.1 in Directory.Packages.props (CPM). Version 1.23.1 includes ContinueAsNewOptions from microsoft/durabletask-dotnet#682. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
612c16b to
532833d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the isolated worker orchestration wrapper to correctly forward the new ContinueAsNew(ContinueAsNewOptions) overload (including NewVersion) to the underlying TaskOrchestrationContext, and bumps the DurableTask package versions to pick up the required API.
Changes:
- Added
FunctionsOrchestrationContext.ContinueAsNew(ContinueAsNewOptions)override that delegates to the inner context. - Updated central package versions for
Microsoft.DurableTask.*to1.23.1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Worker.Extensions.DurableTask/FunctionsOrchestrationContext.cs | Adds the missing ContinueAsNew(ContinueAsNewOptions) delegation override so options aren’t dropped. |
| Directory.Packages.props | Bumps DurableTask package versions to the patch containing the new overload/options type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Worker.Extensions.DurableTask/FunctionsOrchestrationContext.cs
Dismissed
Show dismissed
Hide dismissed
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
andystaples
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a missing
ContinueAsNewoverride toFunctionsOrchestrationContextso that the newContinueAsNewOptions(withNewVersion) is forwarded to the inner context instead of being silently dropped by the base class default.Part 2 of 3 in the ContinueAsNew version migration feature.
Problem
TaskOrchestrationContextgained a new virtual overload in microsoft/durabletask-dotnet#682:FunctionsOrchestrationContextwraps an innerTaskOrchestrationContextand overrides all methods to delegate. However, it only overrides the 2-paramContinueAsNew(object?, bool), so the new single-param overload falls through to the base class default which ignoresContinueAsNewOptionsentirely. This meansNewVersionis silently lost when called from Azure Functions isolated worker.Fix
One-line override that delegates to the inner context:
Changes in this PR
FunctionsOrchestrationContext.cs— AddedContinueAsNew(ContinueAsNewOptions)overrideDirectory.Packages.props— BumpedMicrosoft.DurableTask.Client.Grpc,Worker.Grpc, andAbstractionsfrom1.23.0→1.23.1(the version containingContinueAsNewOptionsfrom Adding query feature for the conditional query #682)Release Order
durabletask-dotnetContinueAsNewOptionsdefined, NuGet v1.23.1 publishedazure-functions-durable-extensiondev, package bumped to v1.23.1AAPT-DTMBE2E Testing Results
Tested locally with Azure Functions isolated worker + Azurite + all 3 PRs applied:
ContinueAsNew with NewVersion='v2'— correctly sendsNewVersionthrough SDK → proto → Core dispatcher → Azure StorageExecutionStartedEventcorrectly hasversion=v2versionMatchStrategy: CurrentOrOlderrejects gen 2 becausev2 > null(worker has no declared version). Users need"versionMatchStrategy": "None"inhost.jsonfor version migration. This is a pre-existing config constraint.Dependencies
Requires Add ContinueAsNewOptions with NewVersion support microsoft/durabletask-dotnet#682 to be merged and NuGet published— Done (v1.23.1)