Skip to content

Commit 2c97ddb

Browse files
authored
Fix custom handler runtimes response due to Stacks API regression (#4712)
* Register debugpy as a python debugProvider * If using local emulator, set the task.json to use azurite connection string * Add SKU query parameter to flex stack API call * Remove storage stuff
1 parent ae9fd10 commit 2c97ddb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/commands/createFunctionApp/stacks/FunctionAppStackStep.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export class FunctionAppStackStep extends AzureWizardPromptStep<IFlexFunctionApp
5050
}
5151

5252
if (isFlex) {
53-
context.newFlexSku = result.minorVersion.stackSettings.linuxRuntimeSettings?.Sku && result.minorVersion.stackSettings.linuxRuntimeSettings?.Sku[0];
53+
if (result.minorVersion.stackSettings.linuxRuntimeSettings?.Sku?.length) {
54+
context.newFlexSku = result.minorVersion.stackSettings.linuxRuntimeSettings.Sku.find(s => s.skuCode === context.newPlanSku?.name);
55+
}
5456
}
5557
}
5658

src/commands/createFunctionApp/stacks/getStackPicks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ async function getFlexStacks(context: ISubscriptionActionContext & { _stacks?: F
195195
url: requestUtils.createRequestUrl(`providers/Microsoft.Web/locations/${location}/functionAppStacks`, {
196196
'api-version': '2023-12-01',
197197
stack,
198+
'sku': 'FC1',
198199
removeDeprecatedStacks: String(!getWorkspaceSetting<boolean>('showDeprecatedStacks'))
199200
}),
200201
}));

0 commit comments

Comments
 (0)