Skip to content

Migrate four Durable Functions samples to .NET 10 and harden them - #443

Merged
Manvir Kaur (manvkaur) merged 4 commits into
mainfrom
manvkaur-durable-dotnet-10-migration
Nov 16, 2026
Merged

Manvir Kaur (manvkaur) merged 4 commits into
mainfrom
manvkaur-durable-dotnet-10-migration

Conversation

@manvkaur

@manvkaur Manvir Kaur (manvkaur) commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Does this introduce a breaking change?

[x] Yes
[ ] No

The samples require .NET 10 and the .NET 10 isolated Functions runtime. HTTP callers must supply function keys.

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[x] Other... Please describe: .NET migration and sample hardening

How to Test

  • Get the code
git clone https://github.com/Azure-Samples/Durable-Task-Scheduler.git
cd Durable-Task-Scheduler
git checkout manvkaur-durable-dotnet-10-migration
# Follow the sample README for language-specific setup.
  • Test the code
$projects = @(
  'samples\durable-functions\dotnet\LargePayloadFanOutFanIn\LargePayloadFanOutFanIn.csproj',
  'samples\durable-functions\dotnet\LargePayload\LargePayload.csproj',
  'samples\durable-functions\dotnet\DistributedTracing\DistributedTracing.csproj',
  'samples\durable-functions\dotnet\Saga\DurableFunctionsSaga.csproj'
)
foreach ($p in $projects) {
  dotnet restore $p --verbosity minimal
  dotnet build $p --configuration Release --no-restore --verbosity minimal
  dotnet publish $p --configuration Release --no-restore --verbosity minimal
}
az bicep build --file 'samples\durable-functions\dotnet\LargePayload\infra\main.bicep' --stdout > $null
az bicep build --file 'samples\durable-functions\dotnet\LargePayloadFanOutFanIn\infra\main.bicep' --stdout > $null

All four samples restored, built, and published successfully. The final .NET 10 builds reported 0 warnings and 0 errors. Both changed Bicep entry points compiled successfully.

Private Azure E2E used the real HTTP start and status APIs and verified key protection, orchestration output, payload integrity where applicable, and persistence after a worker restart:

  • LargePayloadFanOutFanIn: Completed; three 1,572,864-byte payloads matched the expected content; output matched after restart.
  • LargePayload: Completed; 1,572,864-byte input/output round-trip matched; output matched after restart.
  • DistributedTracing: Completed with Notified(Shipped(Paid(Validated(Order-12345)))); output matched after restart.
  • Saga: Completed with Cancelled - Not Approved; output matched after restart.
  • Missing and invalid function keys were rejected. The deployed runtime was dotnet-isolated|10.0; public access remained disabled, and the original app package and settings were restored.

What to Check

Verify that the following are valid

  • OpenTelemetry exporter authentication uses managed identity and does not add duplicate Durable tracing.
  • .NET 10 runtime and payload-size settings match the samples.
  • Function-key requirements, content-integrity validation, summary-only fan-in, and documented blob retention are correct.
  • Hosting SKU is unchanged; the Flex Consumption allowed runtime includes .NET 10.

Other Information

  • Saga termination was tested against an already-completed instance and returned HTTP 500 with Durable FailedPrecondition. Terminating a still-running instance was not tested.
  • Azure E2E used the private test app;
  • Direct package references were updated to the latest stable versions available from the configured NuGet feed. Some newer transitive versions remain unpinned rather than overriding transitive dependencies.
  • Dependency changes overlap Dependabot PR Bump the nuget-all group with 20 updates #435; this migration uses OpenTelemetry instead of the incompatible Application Insights worker integration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@andystaples

Copy link
Copy Markdown
Contributor

Approving. A future follow-up could move the sample away from anonymous auth, document blob retention policy, fan-in without materializing all results at once for memory, and validate the results for content integrity, not just by length. Fine to leave those out

- Migrate AiAgentTravelPlanOrchestrator, DistributedTracing, LargePayload
  and Saga to net10.0 with current stable packages and OpenTelemetry.
- Require function keys on HTTP triggers for the four non-AI samples.
- Validate large payload content, not just length; fan in per-child
  summaries instead of materializing all payloads.
- Document payload blob retention.
- Replace the AI sample's hub-based Foundry template with an AIServices
  account + project, using the project endpoint and Azure AI User role
  (from #448).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the AI sample and its deployment-template changes out of the
.NET 10 migration PR; these changes are being carried by PR #448.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Manvir Kaur (manvkaur) added a commit that referenced this pull request Nov 16, 2026
Transfer the AI sample changes from PR #443 commit 9990960 while preserving the Foundry deployment fixes and approval-status guard. Replace the temporary Application Insights pin with managed-identity OpenTelemetry export and align the Function App runtime with .NET 10.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@manvkaur Manvir Kaur (manvkaur) changed the title Migrate large payload fan-out sample to .NET 10 Migrate four Durable Functions samples to .NET 10 and harden them Nov 16, 2026

@andystaples andystaples left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please preserve connection-string-only worker telemetry; see the inline comment for the regression.

These existing Saga improvements are non-blocking and can be handled in a follow-up:

  • Refund compensation: retain or recover the processed transaction ID so the refund can identify the payment.
  • Cancellation: use cooperative cancellation if the workflow should run compensations; termination skips them and does not stop in-flight activities.
  • Compensation failures: surface failed rollback actions so callers can detect and recover from incomplete compensation.
  • Status output: request inputs and outputs when fetching the instance so the returned output is populated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@manvkaur
Manvir Kaur (manvkaur) merged commit 3dd3d44 into main Nov 16, 2026
13 checks passed
@manvkaur
Manvir Kaur (manvkaur) deleted the manvkaur-durable-dotnet-10-migration branch November 16, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants