Skip to content

Commit bccde31

Browse files
authored
Allow flex consumption deployments for DTS but keep a warning for SQL (#4862)
1 parent 0bceb62 commit bccde31

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/commands/appSettings/connectionSettings/durableTaskScheduler/azure/DurableTaskSchedulerGetConnectionStep.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class DurableTaskSchedulerGetConnectionStep<T extends IDTSAzureConnection
1111
public priority: number = 200;
1212

1313
public async execute(context: T): Promise<void> {
14-
context.newDTSConnectionSettingValue = getSchedulerConnectionString(context.dts?.properties.endpoint ?? '', SchedulerAuthenticationType.UserAssignedIdentity);
14+
context.newDTSConnectionSettingValue ??= getSchedulerConnectionString(context.dts?.properties.endpoint ?? '', SchedulerAuthenticationType.UserAssignedIdentity);
1515

1616
if (context.managedIdentity) {
1717
context.newDTSConnectionSettingValue = context.newDTSConnectionSettingValue.replace(clientIdKey, context.managedIdentity?.clientId ?? clientIdKey);
@@ -20,7 +20,7 @@ export class DurableTaskSchedulerGetConnectionStep<T extends IDTSAzureConnection
2020
context.valuesToMask.push(context.newDTSConnectionSettingValue);
2121
}
2222

23-
public shouldExecute(context: T): boolean {
24-
return !context.newDTSConnectionSettingValue;
23+
public shouldExecute(): boolean {
24+
return true;
2525
}
2626
}

src/commands/deploy/deploy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string |
172172
const durableStorageType: DurableBackend | undefined = await durableUtils.getStorageTypeFromWorkspace(language, context.projectPath);
173173
context.telemetry.properties.durableStorageType = durableStorageType;
174174

175+
if (durableStorageType === DurableBackend.SQL && isFlexConsumption) {
176+
const warning: string = localize('durableStorageTypeWarning', 'SQL storage provider support has not yet been verified for apps on a flex consumption plan.');
177+
ext.outputChannel.appendLog(warning);
178+
await context.ui.showWarningMessage(warning, { modal: true }, { title: localize('continue', 'Continue') });
179+
}
180+
175181
if (durableStorageType) {
176182
switch (durableStorageType) {
177183
case DurableBackend.DTS:
@@ -187,12 +193,6 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string |
187193
}
188194
}
189195

190-
if (durableStorageType === DurableBackend.DTS && isFlexConsumption) {
191-
const warning: string = localize('durableStorageTypeWarning', 'The Durable Task Scheduler (DTS) storage provider is not yet supported for apps on a flex consumption plan.');
192-
ext.outputChannel.appendLog(warning);
193-
await context.ui.showWarningMessage(warning, { modal: true }, { title: localize('continue', 'Continue') });
194-
}
195-
196196
Object.assign(context, await getStorageConnectionIfNeeded(Object.assign(context, subscriptionContext), appSettings, site, context.projectPath));
197197

198198
const deploymentWarningMessages: string[] = [];

0 commit comments

Comments
 (0)