Skip to content

Commit 396a956

Browse files
committed
Merge main
2 parents f70da16 + 14f15f4 commit 396a956

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## 1.17.2 - 2025-05-01
4+
5+
### Fixes
6+
* [[4494]](https://github.com/microsoft/vscode-azurefunctions/pull/4494) Fixes function triggers not appearing under the "Functions" node in the remote view after deploying
7+
* [[4493]](https://github.com/microsoft/vscode-azurefunctions/pull/4493) Incomplete telemetry data capture in specific scenarios.
8+
39
## 1.17.1 - 2025-04-09
410

511
### Fixes

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-azurefunctions",
33
"displayName": "Azure Functions",
44
"description": "%azureFunctions.description%",
5-
"version": "1.17.1",
5+
"version": "1.17.2",
66
"publisher": "ms-azuretools",
77
"icon": "resources/azure-functions.png",
88
"aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",

src/commands/SubscriptionListStep.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export class SubscriptionListStep extends AzureWizardPromptStep<IFuncDeployConte
2727
if (this._picks.length === 1) {
2828
this._oneSubscription = true;
2929
context.subscription = this._picks[0].data;
30+
context.telemetry.properties.subscriptionId = context.subscription.subscriptionId;
3031
}
3132
}
3233

src/commands/createFunctionApp/FunctionAppCreateStep.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { type NameValuePair, type Site, type SiteConfig, type WebSiteManagementClient } from '@azure/arm-appservice';
6+
import { type FunctionsDeploymentStorageAuthentication, type NameValuePair, type Site, type SiteConfig, type WebSiteManagementClient } from '@azure/arm-appservice';
77
import { type Identity } from '@azure/arm-resources';
88
import { BlobServiceClient } from '@azure/storage-blob';
99
import { ParsedSite, WebsiteOS, type CustomLocation, type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice';
@@ -96,11 +96,7 @@ export class FunctionAppCreateStep extends AzureWizardExecuteStepWithActivityOut
9696
storage: {
9797
type: 'blobContainer',
9898
value: `${context.storageAccount?.primaryEndpoints?.blob}app-package-${context.newSiteName?.substring(0, 32)}-${randomUtils.getRandomHexString(7)}`,
99-
authentication: {
100-
userAssignedIdentityResourceId: undefined,
101-
type: 'StorageAccountConnectionString',
102-
storageAccountConnectionStringName: 'DEPLOYMENT_STORAGE_CONNECTION_STRING'
103-
}
99+
authentication: createDeploymentStorageAuthentication(context)
104100
}
105101
},
106102
runtime: {
@@ -116,6 +112,15 @@ export class FunctionAppCreateStep extends AzureWizardExecuteStepWithActivityOut
116112
}
117113

118114
return site;
115+
116+
function createDeploymentStorageAuthentication(context: IFlexFunctionAppWizardContext): FunctionsDeploymentStorageAuthentication {
117+
const hasManagedIdentity: boolean = !!context.managedIdentity;
118+
return {
119+
userAssignedIdentityResourceId: hasManagedIdentity ? context.managedIdentity?.id : undefined,
120+
type: hasManagedIdentity ? 'UserAssignedIdentity' : 'StorageAccountConnectionString',
121+
storageAccountConnectionStringName: hasManagedIdentity ? undefined : 'DEPLOYMENT_STORAGE_CONNECTION_STRING',
122+
};
123+
}
119124
}
120125

121126
private async createNewSite(context: IFunctionAppWizardContext, stack?: FullFunctionAppStack): Promise<Site> {
@@ -190,7 +195,8 @@ export class FunctionAppCreateStep extends AzureWizardExecuteStepWithActivityOut
190195
name: contentShareKey,
191196
value: getNewFileShareName(nonNullProp(context, 'newSiteName'))
192197
});
193-
} else if (isFlex) {
198+
// only add this setting for flex apps, if we're not using managed identity
199+
} else if (isFlex && !context.managedIdentity) {
194200
appSettings.push({
195201
name: 'DEPLOYMENT_STORAGE_CONNECTION_STRING',
196202
value: storageConnectionString

0 commit comments

Comments
 (0)