Skip to content

Register the Durable Task Functions extension from a dedicated assembly - #82

Draft
Shyju Krishnankutty (kshyju) with Copilot wants to merge 10 commits into
mainfrom
copilot/fix-orchestration-trigger-requirement
Draft

Register the Durable Task Functions extension from a dedicated assembly#82
Shyju Krishnankutty (kshyju) with Copilot wants to merge 10 commits into
mainfrom
copilot/fix-orchestration-trigger-requirement

Conversation

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Apps using Microsoft.Agents.AI.Hosting.AzureFunctions had to declare a no-op [OrchestrationTrigger] function of their own, otherwise the Durable Task WebJobs extension was never loaded and every generated function failed with The binding type(s) 'entityTrigger, durableClient' are not registered.

The Functions worker SDK honors only one ExtensionInformationAttribute per assembly (azure-functions-dotnet-worker#3423). Microsoft.Agents.AI.Hosting.AzureFunctions already spends its single attribute on the MCP extension, so Durable Task was left to implicit discovery — which only scans the user's assembly for Durable triggers.

Changes

  • New project Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask — an assembly with no code whose only purpose is to carry the Durable Task registration with implicit registration enabled:

    <AssemblyAttribute Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions.ExtensionInformationAttribute">
      <_Parameter1>Microsoft.Azure.WebJobs.Extensions.DurableTask</_Parameter1>
      <_Parameter2>$(DurableTaskWebJobsExtensionVersion)</_Parameter2>
      <_Parameter3>true</_Parameter3>
      <_Parameter3_IsLiteral>true</_Parameter3_IsLiteral>
    </AssemblyAttribute>

    The WebJobs extension version (3.8.2) is defined as a property in that csproj next to a comment tying it to the Microsoft.Azure.Functions.Worker.Extensions.DurableTask package reference it must track.

  • Hosting package references the new project, so consumers pick it up transitively as a NuGet dependency. RT0002 is suppressed there since the reference is deliberately unused at the API level.

  • Solution and pipelines — project added to agent-framework-durable-extension.slnx, and pack steps added to the GitHub workflow and the official build template so the new package ships alongside the hosting package.

  • CHANGELOG entry for the hosting package.

With this, ConfigureDurableAgents(...) alone is sufficient; the app's generated extensions.json includes the DurableTask extension with no Durable trigger declared by the user.

Copilot AI lite review requested due to automatic review settings September 1, 2026 14:45

Copilot AI 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.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: kshyju <144469+kshyju@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 1, 2026 14:54

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/CHANGELOG.md Outdated
Copilot AI changed the title [WIP] Fix Azure Functions hosting issue requiring dummy OrchestrationTrigger Register the Durable Task Functions extension from a dedicated assembly Sep 1, 2026
@kshyju

Copy link
Copy Markdown
Contributor

Copilot Can we update one ore more samples so that they don't have a package dependency on Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged with the new changes this PR is bringing.

…registers Durable Task

Co-authored-by: kshyju <144469+kshyju@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 1, 2026 16:37
…ns samples

Co-authored-by: kshyju <144469+kshyju@users.noreply.github.com>

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Copilot Can we update one ore more samples so that they don't have a package dependency on Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged with the new ch...

Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged has to stay: it's a pure attribute-carrier package whose ExtensionInformationAttribute points at Microsoft.Azure.WebJobs.Extensions.DurableTask.AzureManaged, the WebJobs extension that supplies the AzureManaged (Durable Task Scheduler) storage provider our samples select in host.json. That provider ships in its own assembly and isn't part of Microsoft.Azure.WebJobs.Extensions.DurableTask 3.8.2, so dropping the reference removes AzureManagedProvider from the generated extensions.json (verified by building without it). Registering it from the hosting package would force the DTS backend on every consumer, including those using the Azure Storage backend.

What this PR does make redundant is Microsoft.Azure.Functions.Worker.Extensions.DurableTask itself, so in f502a93 I removed it from the two samples that don't use Durable APIs directly (01_SingleAgent and 07_AgentAsMcpTool) and added a short comment explaining why. Both still produce an extensions.json containing the DurableTask extension, now sourced from the new shim assembly. The other Functions samples keep the reference because they declare orchestration/activity triggers or use DurableTaskClient in code.

If you do want the DTS registration bundled too, I can add a second shim project (one ExtensionInformationAttribute per assembly) — just say the word.

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/CHANGELOG.md:5

  • Changelog entries under "## [Unreleased]" should include a change title and a link to the pull request itself (per the repo Durable Task changelog guideline). This new entry links to the issue instead of the PR, which makes it harder to trace the shipped change back to its implementation. Consider updating the trailing link to point to this PR (and optionally mention the issue separately, e.g. "Fixes #77").
- Fixed the Durable Task Azure Functions extension not being registered unless the application declared a Durable Functions trigger of its own, which required a dummy `[OrchestrationTrigger]` function for the agent endpoints to become available ([#77](https://github.com/microsoft/agent-framework-durable-extension/issues/77))

Copilot AI review requested due to automatic review settings September 1, 2026 16:41

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/CHANGELOG.md:5

  • Changelog entries in this package consistently link to the PR (e.g., #67, #60). This new entry links to the issue instead, which breaks that convention and the repo guideline to include a PR link.
- Fixed the Durable Task Azure Functions extension not being registered unless the application declared a Durable Functions trigger of its own, which required a dummy `[OrchestrationTrigger]` function for the agent endpoints to become available ([#77](https://github.com/microsoft/agent-framework-durable-extension/issues/77))

Copilot AI review requested due to automatic review settings September 1, 2026 17:08

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/CHANGELOG.md:5

  • Changelog entries in this repo link to the PR (see the surrounding entries using /pull/...), but this new entry links to the issue instead (/issues/77). To match the established format and release traceability, update this bullet to link to the PR that fixed the issue (you can still mention the issue separately if desired).
- Fixed the Durable Task Azure Functions extension not being registered unless the application declared a Durable Functions trigger of its own, which required a dummy `[OrchestrationTrigger]` function for the agent endpoints to become available ([#77](https://github.com/microsoft/agent-framework-durable-extension/issues/77))

Co-authored-by: kshyju <144469+kshyju@users.noreply.github.com>

Copilot AI 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.

🔵 Needs a closer look

The new changelog entry links to the issue instead of the PR, which breaks the established changelog linking convention in that file.

Review details

Suppressed comments (1)

dotnet/src/Microsoft.Agents.AI.Hosting.AzureFunctions/CHANGELOG.md:5

  • Changelog entries in this file consistently link to the PR (e.g., [#67], [#60]), but this new entry links to the issue instead. To match the established format (and make releases traceable), please update the link target to this PR (optionally also referencing the issue separately).
- Fixed the Durable Task Azure Functions extension not being registered unless the application declared a Durable Functions trigger of its own, which required a dummy `[OrchestrationTrigger]` function for the agent endpoints to become available ([#77](https://github.com/microsoft/agent-framework-durable-extension/issues/77))
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@kshyju
Shyju Krishnankutty (kshyju) marked this pull request as ready for review September 2, 2026 01:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 2, 2026 18:23

Copilot AI 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.

🟢 Approval recommended

The change cleanly addresses the single-attribute limitation by isolating Durable Task registration into a dedicated assembly and updates CI/packaging/samples consistently to ship and consume it.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 2, 2026 20:42

Copilot AI 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.

🔵 Needs a closer look

The change relies on Azure Functions extension-loading/version-coupling behavior that is difficult to fully validate via static review alone.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI 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.

🟡 Changes recommended

The new package inherits a nonexistent 1.0.0 validation baseline, which will break its first GA package build.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 2, 2026 21:16

Copilot AI 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.

🟡 Changes recommended

The fixed helper-package version will cause duplicate-package publication failures on later releases unless its release lifecycle is handled explicitly.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 2, 2026 21:33

Copilot AI 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.

🟢 Approval recommended

The dedicated assembly, transitive dependency, packaging updates, and sample validation consistently address the missing extension registration.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@kshyju
Shyju Krishnankutty (kshyju) marked this pull request as draft September 10, 2026 00:31
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.

.NET: [Bug]: Hosting.AzureFunctions requires a user-defined dummy [OrchestrationTrigger] to start

3 participants