Skip to content

Durable Functions v2.4.0 Release

Compare
Choose a tag to compare
@ConnorMcMahon ConnorMcMahon released this 01 Dec 01:14
a627810

NuGet Package

https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/2.4.0

New Features

Distributed Tracing (#1571)

One of the long running requests we have received from customers is a way to improve the observability of their orchestration execution. The new distributed tracing functionality correlates all of the operations performed by an orchestration so that a single query can give a clear representation of the work that an orchestration instance has accomplished.

This feature was previously released as a separate alpha package, but now it can be used in our mainline package simply by adding a few settings to your host.json.

This feature is still a work in progress as we add support for all operation, but we encourage developers to try out this new tracing model to get better visibility into their orchestrations. The new samples should provide guidance for how to set up your application to use Distributed Tracing, as well as adding your own custom telemetry.

Durable Clients in other .NET Core applications (#1125)

Before this release, the only way to perform management operations on orchestrations and entities was to use Azure Functions bindings to access an IDurableClient or to use the built-in management HTTP APIs. Thanks to a contribution by @davidrevoledo, instances of IDurableClient can be created in external ASP.NET Core, console, and Azure Functions applications via dependency injection!

Check out our new sample project for examples of how you can create these client instances in your own applications.

New API to Restart Orchestrations (#1545)

This release introduces a new API to restart orchestrations that may have failed or have terminated due to transient conditions. The restarted orchestration will use the same input as the original orchestration, and can reuse the instance id or use a new one.

This new API can be called with the C# method IDurableOrchestrationClient.RestartAsync(string instanceId, bool restartWithNewInstanceId) as well as the HTTP API /instances/<instance-id>/restart. Support for these APIs for Durable Functions apps running on Node and Python will be added in the near future with releases to each language's SDK.

Other features

  • New Netherite Event Source Backend (#1541): Added extensibility support for a new event source backend. Expect to hear more about this new backend in the coming weeks.
  • Added BatchSize and BatchPosition properties to IDurableEntityContext(#1511)
  • New Timeout Property for DurableHttpRequest (#1547): This property defines the timeout for each HTTP request. This timeout applies to each asynchronous polling request too.
  • Enable long running timers for WaitForExternalEvent (#1550)

Bug fixes

  • Handle task hub worker shutdown when functions use the [Disable] attribute (#1546)
  • Limiting Terminate and Rewind HTTP APIs to only accept HTTP POST requests as documented. (#1545)
  • Added IDurableEntityContext.DispatchAsync() directly to IDurableEntityContext interface to allow the method to be mockable using a unit test framework like Moq (recommended) (#1581)

Breaking changes

  • Added a bool returnInternalServerErrorOnFailure parameter to WaitForCompletionOrCreateCheckStatusResponseAsync (#1572): This optional parameter is added to handle the HttpResponse that is returned. The default value is false, which means it will return a 200 status code. If the value is true, then the response status code will be 500. This is a breaking change if you are using a unit test framework like Moq (recommended) that mocks the WaitForCompletionOrCreateCheckStatusResponseAsync method. All that should be required is to account for the new parameter in your .Setup() method.

Dependency Changes

  • Updated nuget dependencies (#1577):
    • Microsoft.Azure.WebJobs.Extensions.DurableTask --> 2.4.0
    • Microsoft.Azure.DurableTask.AzureStorage --> 1.8.3
    • Microsoft.Azure.DurableTask.Core --> 2.5.0