Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export class MCPDownloadSnippetsExecuteStep extends AzureWizardExecuteStepWithAc
}

private async downloadFilesRecursively(context: MCPProjectWizardContext, items: GitHubFileMetadata[], basePath: string): Promise<void> {
for (const item of items) {
// Download all files and directories at this level in parallel
await Promise.all(items.map(async (item) => {
if (item.type === 'file') {
await MCPDownloadSnippetsExecuteStep.downloadSingleFile({
context, item,
Expand All @@ -59,7 +60,7 @@ export class MCPDownloadSnippetsExecuteStep extends AzureWizardExecuteStepWithAc
// Recursively download directory contents
await this.downloadFilesRecursively(context, dirContents, dirPath);
}
}
}));
}

public shouldExecute(context: MCPProjectWizardContext): boolean {
Expand Down
17 changes: 11 additions & 6 deletions src/commands/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { type Site, type SiteConfigResource, type StringDictionary } from '@azure/arm-appservice';
import { type Site, type SiteConfigResource } from '@azure/arm-appservice';
import { getDeployFsPath, getDeployNode, deploy as innerDeploy, showDeployConfirmation, type IDeployContext, type IDeployPaths, type InnerDeployContext, type ParsedSite } from '@microsoft/vscode-azext-azureappservice';
import { ResourceGroupListStep } from '@microsoft/vscode-azext-azureutils';
import { AzureWizard, DialogResponses, subscriptionExperience, type ExecuteActivityContext, type IActionContext, type ISubscriptionContext } from '@microsoft/vscode-azext-utils';
Expand Down Expand Up @@ -133,8 +133,11 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string |
void showCoreToolsWarning(context, version, site.fullName);

const client = await site.createClient(actionContext);
const siteConfig: SiteConfigResource = await client.getSiteConfig();
const isConsumption: boolean = await client.getIsConsumption(actionContext);
// Parallelize independent read-only calls: site config and consumption check
const [siteConfig, isConsumption] = await Promise.all([
client.getSiteConfig(),
client.getIsConsumption(actionContext),
]);
let isZipDeploy: boolean = siteConfig.scmType !== ScmType.LocalGit && siteConfig.scmType !== ScmType.GitHub;
if (!isZipDeploy && site.isLinux && isConsumption) {
ext.outputChannel.appendLog(localize('linuxConsZipOnly', 'WARNING: Using zip deploy because scm type "{0}" is not supported on Linux consumption', siteConfig.scmType), { resourceName: site.fullName });
Expand Down Expand Up @@ -167,9 +170,11 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string |
context.deployMethod = 'flexconsumption';
}

const appSettings: StringDictionary = await client.listApplicationSettings();

const durableStorageType: DurableBackend | undefined = await durableUtils.getStorageTypeFromWorkspace(language, context.projectPath);
// Parallelize remote app settings fetch and local workspace durable storage detection
const [appSettings, durableStorageType] = await Promise.all([
client.listApplicationSettings(),
durableUtils.getStorageTypeFromWorkspace(language, context.projectPath),
]);
context.telemetry.properties.durableStorageType = durableStorageType;

if (durableStorageType === DurableBackend.SQL && isFlexConsumption) {
Expand Down