From 4ebdbc11287069d51fec1e8bb209290ba9af4537 Mon Sep 17 00:00:00 2001 From: Janaki Priya Karri <87686529+v-jkarri@users.noreply.github.com> Date: Mon, 25 Oct 2021 18:31:45 +0530 Subject: [PATCH] =?UTF-8?q?Enable=20Continuous=20Monitoring=20Task=20faili?= =?UTF-8?q?ng=20on=20Azure=20DevOps=20Pipeline=20#1=E2=80=A6=20(#15414)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Enable Continuous Monitoring Task failing on Azure DevOps Pipeline #15188 * fix for Enable Continuous Monitoring Task failing on Azure DevOps Pipeline --- .../operations/ContinuousMonitoringUtils.ts | 10 +++++++++- Tasks/AzureAppServiceManageV0/task.json | 4 ++-- Tasks/AzureAppServiceManageV0/task.loc.json | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Tasks/AzureAppServiceManageV0/operations/ContinuousMonitoringUtils.ts b/Tasks/AzureAppServiceManageV0/operations/ContinuousMonitoringUtils.ts index 958ffa0cd7cc..19b72c628e1c 100644 --- a/Tasks/AzureAppServiceManageV0/operations/ContinuousMonitoringUtils.ts +++ b/Tasks/AzureAppServiceManageV0/operations/ContinuousMonitoringUtils.ts @@ -24,8 +24,16 @@ export async function enableContinuousMonitoring(endpoint: AzureEndpoint, appSer } appInsightsResource.tags["hidden-link:" + appDetails.id] = "Resource"; + tl.debug('Modifying request to call update API'); + var appInsightsResourceTemp=appInsightsResource; + if(appInsightsResourceTemp.properties.WorkspaceResourceId ){ + delete appInsightsResourceTemp.properties.WorkspaceResourceId; + } + if(appInsightsResourceTemp.properties.IngestionMode ){ + delete appInsightsResourceTemp.properties.IngestionMode; + } tl.debug('Link app insights with app service via tag'); - await appInsights.update(appInsightsResource); + await appInsights.update(appInsightsResourceTemp); tl.debug('Link app service with app insights via instrumentation key'); await appService.patchApplicationSettings({ "APPINSIGHTS_INSTRUMENTATIONKEY": appInsightsResource.properties['InstrumentationKey'] diff --git a/Tasks/AzureAppServiceManageV0/task.json b/Tasks/AzureAppServiceManageV0/task.json index 803ca2a10344..46cdd4af94d8 100644 --- a/Tasks/AzureAppServiceManageV0/task.json +++ b/Tasks/AzureAppServiceManageV0/task.json @@ -18,8 +18,8 @@ "demands": [], "version": { "Major": 0, - "Minor": 184, - "Patch": 1 + "Minor": 195, + "Patch": 0 }, "minimumAgentVersion": "1.102.0", "instanceNameFormat": "$(Action): $(WebAppName)", diff --git a/Tasks/AzureAppServiceManageV0/task.loc.json b/Tasks/AzureAppServiceManageV0/task.loc.json index cbeab0d752cd..705a37098e59 100644 --- a/Tasks/AzureAppServiceManageV0/task.loc.json +++ b/Tasks/AzureAppServiceManageV0/task.loc.json @@ -18,8 +18,8 @@ "demands": [], "version": { "Major": 0, - "Minor": 184, - "Patch": 1 + "Minor": 195, + "Patch": 0 }, "minimumAgentVersion": "1.102.0", "instanceNameFormat": "ms-resource:loc.instanceNameFormat",