Migrate sample to Azure Durable Task Scheduler (DTS) backend#29
Open
torosent wants to merge 7 commits into
Open
Migrate sample to Azure Durable Task Scheduler (DTS) backend#29torosent wants to merge 7 commits into
torosent wants to merge 7 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Drop .Preview suffix from extension bundle id (Microsoft.Azure.Functions.ExtensionBundle) where the standard bundle already provides azureManaged support. - Bump .NET package versions to match GA samples in Azure-Samples/Durable-Task-Scheduler: Worker 2.1.0, Worker.Sdk 2.0.7, Worker.Extensions.DurableTask 1.2.2, Worker.Extensions.DurableTask.AzureManaged 0.4.1-alpha. - Add TaskHub=default segment to the emulator connection string in local.settings.json.sample. - Update README wording to reflect DTS GA status (not preview). Refs: https://github.com/Azure-Samples/Durable-Task-Scheduler/tree/main/samples/durable-functions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update Microsoft.DurableTask/schedulers and Microsoft.DurableTask/schedulers/taskHubs from 2025-04-01-preview to the GA API version 2026-02-01 in dts.bicep / dts-Access.bicep. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Switching the Durable Task backend to DTS does not eliminate the need for queue and table services on the AzureWebJobsStorage account. They are still required by the Functions host and by several non-Durable triggers/bindings (timer singleton leases, host metadata, OpenAI bindings, MCP trigger, etc.). Revert enableQueue/enableTable to true and update the surrounding comment accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The migration commit accidentally bumped durable-functions from ^1.5.3 to ^3.1.0, but durable-functions v3 requires the v4 programming model (app.generic registrations) — incompatible with this sample's v2 model (folder-per-function with function.json + df.orchestrator()). DTS support flows through the host extension bundle / storageProvider config, NOT the npm package, so v2 of durable-functions works perfectly with DTS as long as the host loads a DTS-aware extension bundle. Verified locally with the DTS emulator: blob_trigger, orchestrator, and activity functions all execute through the DTS task hub. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-tables + DefaultAzureCredential; default vnetEnabled=false; drop dead skuCapacity plumbing; remove legacy provision.ps1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Round-2 review found that principalType was parameterized for the DTS dashboard role assignment but the four deployer storage/queue/table/ appInsights role assignments in app/rbac.bicep still hardcoded 'User'. Under a service-principal deployer in CI this can fail with PrincipalNotFound. Threaded principalType -> userIdentityPrincipalType through the rbac module to keep the principal-type story consistent across all deployer assignments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
greenie-msft
approved these changes
Apr 23, 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.
Migrate to Azure Durable Task Scheduler (DTS) + modern Node SDK
This PR brings the JavaScript fan-out/fan-in API-scraping sample onto the modern stack:
azure-storageSDK →@azure/data-tables+@azure/identityfor theRepositoriesTable read/write, with managed-identity auth in cloud.What changed
FanOutFanInCrawler/host.json—storageProvider.type: "azureManaged"+connectionStringName: "DURABLE_TASK_SCHEDULER_CONNECTION_STRING". Default Azure-Storage bindings remain enabled.FanOutFanInCrawler/package.json— droppedazure-storage@^2.10.4(deprecated, no MI support); added@azure/data-tables@^13.3.1+@azure/identity@^4.5.0.durable-functionsretained.FanOutFanInCrawler/SaveRepositories/index.js— rewritten to useTableClientfrom@azure/data-tableswith this precedence:StorageConnectionStringenv var (test/local override).AzureWebJobsStorage__tableServiceUri+ optionalAzureWebJobsStorage__clientIdandDefaultAzureCredential(cloud).AzureWebJobsStorageconnection string (Azurite/local fallback).Inserts now use Table Storage transactional batches in chunks of 100 (the service limit).
FanOutFanInCrawler/local.settings.json.sample— addedDURABLE_TASK_SCHEDULER_CONNECTION_STRING+TASKHUB_NAME.infra/— newapp/dts.bicepprovisioningMicrosoft.DurableTask/schedulers@2026-02-01+taskHubs@2026-02-01. UAMI getsDurable Task Data Contributoron the task hub andStorage Table Data Contributoron the Storage account.vnetEnableddefaults tofalse.provision.ps1— removed (legacy pre-DTS provisioning script).README.md— DTS-first instructions.Verification
npm installclean.func start+ Azurite, fan-out/fan-in completes,Repositoriestable populated.azd up, orchestration completes, table populated under managed identity, run appears in DTS dashboard,azd down --force --purgeclean.Notes
2026-02-01(DTS GA).skuCapacityparameter removed fromdts.bicepandmain.bicep.