Set DTS as default backend, remove preview bundles#5108
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Durable Functions creation flow to prioritize the Durable Task Scheduler (DTS) option and removes preview/prerelease configuration previously applied to DTS in project setup.
Changes:
- Reorders durable storage type quick-pick items and shifts the “default” description to DTS.
- Removes the DTS-specific preview extension bundle update for non-.NET projects.
- Removes prerelease package installation behavior for DTS .NET dependencies.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/commands/createFunction/durableSteps/DurableStorageTypePromptStep.ts | Reorders quick-pick options and changes which option is labeled as default. |
| src/commands/createFunction/durableSteps/DurableProjectConfigureStep.ts | Removes preview bundle wiring and prerelease NuGet installation flags for DTS setup. |
| { label: 'Durable Task Scheduler', description: defaultDescription, data: DurableBackend.DTS }, | ||
| { label: 'Azure Storage', data: DurableBackend.Storage }, |
There was a problem hiding this comment.
Extension owners - is this valid? Where is the default defined, is it always just the first list item, or is there a different system for this?
There was a problem hiding this comment.
I'm not sure why the description was originally chosen as "default". It may have been because the Azure Storage setup required very little extra configuration.
Either way though, I don't think there's any defaulting happening on the extension side so the way you have it is okay. The user still has to explicitly choose the storage option. That said, feel free to change the description label to something else more fitting!
| case DurableBackend.DTS: | ||
| hostJson.extensions.durableTask = this.getDefaultDTSTaskConfig(); | ||
| // Non- .NET projects require a special preview extension bundle to work properly | ||
| // Todo: Remove once this functionality is out of preview | ||
| if (context.language !== ProjectLanguage.CSharp && context.language !== ProjectLanguage.FSharp) { | ||
| hostJson.extensionBundle = { | ||
| id: 'Microsoft.Azure.Functions.ExtensionBundle.Preview', | ||
| version: '[4.29.0, 5.0.0)', | ||
| }; | ||
| ext.outputChannel.appendLog(localize('extensionBundlePreview', 'Updated "host.json" extension bundle to preview version to enable new DTS features.')); | ||
| } | ||
| await setLocalAppSetting(context, context.projectPath, ConnectionKey.DTS, '', MismatchBehavior.Overwrite); | ||
| await setLocalAppSetting(context, context.projectPath, nonNullValue(tryGetVariableSubstitutedKey(ConnectionKey.DTSHub)), '', MismatchBehavior.Overwrite); |
There was a problem hiding this comment.
I'll let the extension owners weigh in here - the setting [4.*, 5.0.0) will now pull in a compatible bundles version, but I'm not sure if we need to think about pinned bundle versions less than the first one that brought in DTS or not
There was a problem hiding this comment.
For new projects this likely isn't a concern, since the default range will automatically pull in a compatible version like you mentioned. For existing projects, it could become an issue if a user has pinned their range below 4.29.
We could add a check. If the configured range would resolve to an incompatible version, we warn the user and/or update the bundle setting.
Feel free to address that here or open it as a separate issue.
Sets the Durable Task Scheduler (DTS) as the default storage backend for durable Azure Functions.
Also removes the special-casing we had to configure for preview extension bundles, as the DTS extensions have been present in the public extension bundles for a long time.