Skip to content

Comments

Add Durable Task Scheduler skill#919

Open
greenie-msft wants to merge 3 commits intomicrosoft:mainfrom
greenie-msft:add-dts-skill
Open

Add Durable Task Scheduler skill#919
greenie-msft wants to merge 3 commits intomicrosoft:mainfrom
greenie-msft:add-dts-skill

Conversation

@greenie-msft
Copy link

Adds a new reference skill for the Durable Task Scheduler enabling Copilot to guide users through building reliable, fault-tolerant workflows on Azure.

The skill covers:

Framework selection (Durable Functions vs. Durable Task SDKs)
Local development with the DTS emulator
Workflow patterns: chaining, fan-out/fan-in, async HTTP, monitor, human interaction, and saga
Orchestration determinism rules and replay-safe logging
Azure deployment with Bicep and managed identity configuration
Error handling and retry policies

Copilot AI review requested due to automatic review settings February 13, 2026 18:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Azure Prepare reference document for Durable Task Scheduler (DTS) to help guide users in building durable, fault-tolerant workflow orchestrations on Azure.

Changes:

  • Introduces a new durable-task-scheduler.md reference covering DTS fundamentals, local emulator setup, workflow patterns, and determinism rules.
  • Includes example snippets for .NET and Python (starter, patterns, logging, retry).
  • Adds Azure provisioning guidance including CLI, Bicep, and managed identity role assignment.

Comment on lines +28 to +30
# Start the emulator
docker pull mcr.microsoft.com/dts/dts-emulator:latest
docker run -d -p 8080:8080 -p 8082:8082 --name dts-emulator mcr.microsoft.com/dts/dts-emulator:latest
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The emulator instructions use the :latest image tag, which makes the setup non-reproducible and can break as the image changes over time. Consider pinning to a specific emulator version tag (and optionally note how to discover newer versions) so local dev matches CI/troubleshooting guidance.

Suggested change
# Start the emulator
docker pull mcr.microsoft.com/dts/dts-emulator:latest
docker run -d -p 8080:8080 -p 8082:8082 --name dts-emulator mcr.microsoft.com/dts/dts-emulator:latest
# Start the emulator (update the tag as needed; see DTS emulator image tags in MCR for newer versions)
docker pull mcr.microsoft.com/dts/dts-emulator:1.0.0
docker run -d -p 8080:8080 -p 8082:8082 --name dts-emulator mcr.microsoft.com/dts/dts-emulator:1.0.0

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +43
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version="1.*" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged" Version="*" />
<PackageReference Include="Azure.Identity" Version="1.*" />
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

PackageReference Version="*" can resolve to unexpected versions (including potentially breaking updates) and makes the guidance non-reproducible. Prefer an explicit version (or at least a bounded floating version like x.*) and/or add a note to check official docs for the current recommended version.

Suggested change
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version="1.*" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged" Version="*" />
<PackageReference Include="Azure.Identity" Version="1.*" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version="1.1.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged" Version="1.0.0" />
<PackageReference Include="Azure.Identity" Version="1.11.4" />

Copilot uses AI. Check for mistakes.
| Local Emulator | `Endpoint=http://localhost:8080;Authentication=None` |
| Azure (Managed Identity) | `Endpoint=https://<scheduler>.durabletask.io;Authentication=ManagedIdentity` |

> **⚠️ NOTE**: Durable Task Scheduler uses identity-based authentication only — no connection strings with keys.
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The note says Durable Task Scheduler uses identity-based auth only, but the table includes Authentication=None for the local emulator and the rest of the doc uses an endpoint-style connection string setting. Suggest rewording to clarify this is about Azure-hosted schedulers (no shared keys), while the emulator can run without auth.

Suggested change
> **⚠️ NOTE**: Durable Task Scheduler uses identity-based authentication only no connection strings with keys.
> **⚠️ NOTE**: Azure-hosted Durable Task Scheduler instances use identity-based authentication only (no shared-key connection strings). The local emulator can run without authentication (`Authentication=None`).

Copilot uses AI. Check for mistakes.
{
[Function("HttpStart")]
public static async Task<HttpResponseData> HttpStart(
[HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequestData req,
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Both minimal HTTP starter examples are configured as anonymous (AuthorizationLevel.Anonymous / AuthLevel.ANONYMOUS). Since this reference also covers Azure deployment guidance, add a clear note (or adjust the sample) to avoid encouraging anonymous endpoints in production (e.g., use Function auth or Entra ID).

Suggested change
[HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequestData req,
[HttpTrigger(AuthorizationLevel.Function, "post")] HttpRequestData req,

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,466 @@
# Durable Task Scheduler
Copy link
Member

Choose a reason for hiding this comment

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

This file needs to be referenced somewhere or else it will never be used by the language model. That is, there needs to be some chain of Markdown references that starts from plugin/skills/azure-prepare/SKILL.md and leads to this file.

asyncio.run(main())
```

## Azure Deployment
Copy link
Member

Choose a reason for hiding this comment

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

Consider putting deployment details under the azure-deploy skill.

Copilot AI review requested due to automatic review settings February 13, 2026 23:25
Copy link
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated 3 comments.


```bicep
@allowed(['consumption', 'dedicated'])
@description('Use consumption for QuickStarts/variable workloads, dedicated for high-demand/predictable throughput')
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The term "QuickStarts" appears to use non-standard capitalization. Consider using "quick starts" (lowercase, two words) or "quickstarts" (one word, lowercase) for consistency with common documentation style, unless "QuickStarts" is an official Azure terminology.

Copilot uses AI. Check for mistakes.
Comment on lines +477 to +499
resource uami 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: '<uami-name>'
location: location
}

// 2. Assign the UAMI to the Function App
// (include in functionApp resource properties)
// identity: {
// type: 'UserAssigned'
// userAssignedIdentities: { '${uami.id}': {} }
// }

// 3. Assign Durable Task Data Contributor to the UAMI
resource durableTaskUamiRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(scheduler.id, uami.id, durableTaskDataContributorRoleId)
scope: scheduler
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', durableTaskDataContributorRoleId)
principalId: uami.properties.principalId
principalType: 'ServicePrincipal'
}
}

Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The Bicep example shows both Option A (System-Assigned MI) and Option B (User-Assigned MI) as active resources that would both deploy if copied. The resource durableTaskRoleAssignment at line 465 should likely be commented out when using Option B, or vice versa, to avoid deploying both options simultaneously. Consider either:

  1. Making Option A a complete commented example, or
  2. Adding a conditional parameter to deploy only one based on user choice

This would prevent users from accidentally deploying both managed identity configurations when they likely only need one.

Suggested change
resource uami 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: '<uami-name>'
location: location
}
// 2. Assign the UAMI to the Function App
// (include in functionApp resource properties)
// identity: {
// type: 'UserAssigned'
// userAssignedIdentities: { '${uami.id}': {} }
// }
// 3. Assign Durable Task Data Contributor to the UAMI
resource durableTaskUamiRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(scheduler.id, uami.id, durableTaskDataContributorRoleId)
scope: scheduler
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', durableTaskDataContributorRoleId)
principalId: uami.properties.principalId
principalType: 'ServicePrincipal'
}
}
// OPTION B: User-Assigned Managed Identity (UAMI)
// Uncomment this block and comment out the System-Assigned MI example above
// if you prefer to use a user-assigned managed identity.
//
// resource uami 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
// name: '<uami-name>'
// location: location
// }
//
// // 2. Assign the UAMI to the Function App
// // (include in functionApp resource properties)
// // identity: {
// // type: 'UserAssigned'
// // userAssignedIdentities: { '${uami.id}': {} }
// // }
//
// // 3. Assign Durable Task Data Contributor to the UAMI
// resource durableTaskUamiRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
// name: guid(scheduler.id, uami.id, durableTaskDataContributorRoleId)
// scope: scheduler
// properties: {
// roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', durableTaskDataContributorRoleId)
// principalId: uami.properties.principalId
// principalType: 'ServicePrincipal'
// }
// }

Copilot uses AI. Check for mistakes.

| SKU | Best For |
|-----|----------|
| **Consumption** | QuickStarts, variable or bursty workloads, pay-per-use |
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The term "QuickStarts" appears to use non-standard capitalization. Consider using "quick starts" (lowercase, two words) or "quickstarts" (one word, lowercase) for consistency with common documentation style, unless "QuickStarts" is an official Azure terminology.

Suggested change
| **Consumption** | QuickStarts, variable or bursty workloads, pay-per-use |
| **Consumption** | quickstarts, variable or bursty workloads, pay-per-use |

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants