Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users/suaggar/correlation #11824

Merged
merged 5 commits into from
Nov 23, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion Tasks/AzureAppServiceManageV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 62
"Patch": 63
},
"minimumAgentVersion": "1.102.0",
"instanceNameFormat": "$(Action): $(WebAppName)",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureAppServiceManageV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 62
"Patch": 63
},
"minimumAgentVersion": "1.102.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureAppServiceSettingsV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 3
"Minor": 160,
"Patch": 0
},
"preview": "true",
"minimumAgentVersion": "2.104.1",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureAppServiceSettingsV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 3
"Minor": 160,
"Patch": 0
},
"preview": "true",
"minimumAgentVersion": "2.104.1",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 2,
"Minor": 154,
"Patch": 13
"Patch": 14
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 2,
"Minor": 154,
"Patch": 13
"Patch": 14
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 3,
"Minor": 154,
"Patch": 13
"Patch": 14
},
"preview": true,
"demands": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopyV3/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 3,
"Minor": 154,
"Patch": 13
"Patch": 14
},
"preview": true,
"demands": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureFunctionAppContainerV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 3
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureFunctionAppContainerV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 3
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFunctionAppV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 1,
"Minor": 160,
"Patch": 0
"Patch": 1
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFunctionAppV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 1,
"Minor": 160,
"Patch": 0
"Patch": 1
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureKeyVaultV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 1,
"Minor": 155,
"Patch": 6
"Patch": 7
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureKeyVaultV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 1,
"Minor": 155,
"Patch": 6
"Patch": 7
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureMonitorAlertsV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 159,
"Patch": 2
"Patch": 3
},
"minimumAgentVersion": "2.111.0",
"instanceNameFormat": "Configure Azure Alerts : $(ResourceName)",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureMonitorAlertsV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 159,
"Patch": 2
"Patch": 3
},
"minimumAgentVersion": "2.111.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 4,
"Minor": 159,
"Patch": 5
"Patch": 6
},
"releaseNotes": "Added support for Az Module and cross platform agents.",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 4,
"Minor": 159,
"Patch": 5
"Patch": 6
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 5,
"Minor": 162,
"Patch": 0
"Patch": 1
},
"preview": "true",
"releaseNotes": "Added support for Az Module and cross platform agents.",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 5,
"Minor": 162,
"Patch": 0
"Patch": 1
},
"preview": "true",
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureResourceGroupDeploymentV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 2,
"Minor": 157,
"Patch": 6
"Patch": 7
},
"demands": [],
"minimumAgentVersion": "2.119.1",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureResourceGroupDeploymentV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 2,
"Minor": 157,
"Patch": 6
"Patch": 7
},
"demands": [],
"minimumAgentVersion": "2.119.1",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureResourceManagerTemplateDeploymentV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 3,
"Minor": 1,
"Patch": 3
"Patch": 4
},
"preview": "true",
"demands": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 3,
"Minor": 1,
"Patch": 3
"Patch": 4
},
"preview": "true",
"demands": [],
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureVmssDeploymentV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureVmssDeploymentV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureWebAppContainerV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 3
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureWebAppContainerV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 3
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureWebAppV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 1,
"Minor": 160,
"Patch": 0
"Patch": 1
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureWebAppV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 1,
"Minor": 160,
"Patch": 0
"Patch": 1
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,6 @@
"loc.messages.FailedToGetAppServiceConnectionStringSlotSettings": "Failed to get App service '%s' Connection string slot settings. Error: %s",
"loc.messages.FailedToGetAppServiceSlotConfigurationNames": "Failed to get App service '%s' Slot Configuration Names. Error: %s",
"loc.messages.FailedToPatchAppServiceConfiguration": "Failed to patch App Service '%s' configuration. Error: %s",
"loc.messages.KuduStackTraceURL": "To debug further please check Kudu stack trace URL : %s"
"loc.messages.KuduStackTraceURL": "To debug further please check Kudu stack trace URL : %s",
"loc.messages.CorrelationIdForARM": "Correlation ID from ARM api call response : %s"
}
3 changes: 2 additions & 1 deletion Tasks/Common/AzureRmDeploy-common/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"FailedToGetAppServiceConnectionStringSlotSettings": "Failed to get App service '%s' Connection string slot settings. Error: %s",
"FailedToGetAppServiceSlotConfigurationNames" : "Failed to get App service '%s' Slot Configuration Names. Error: %s",
"FailedToPatchAppServiceConfiguration": "Failed to patch App Service '%s' configuration. Error: %s",
"KuduStackTraceURL" : "To debug further please check Kudu stack trace URL : %s"
"KuduStackTraceURL" : "To debug further please check Kudu stack trace URL : %s",
"CorrelationIdForARM" : "Correlation ID from ARM api call response : %s"
}
}
7 changes: 6 additions & 1 deletion Tasks/Common/azure-arm-rest-v2/AzureServiceClientBase.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import tl = require('azure-pipelines-task-lib/task');
import util = require("util")
import msRestAzure = require("./azure-arm-common");
import webClient = require("./webClient");
import { DeploymentsBase } from './DeploymentsBase';

const CorrelationIdInResponse = "x-ms-correlation-request-id";

export class ApiResult {
public error;
public result;
Expand Down Expand Up @@ -119,6 +120,10 @@ export class AzureServiceClientBase {
request.headers["Authorization"] = "Bearer " + token;
httpResponse = await webClient.sendRequest(request);
}

if(!!httpResponse.headers[CorrelationIdInResponse]) {
tl.debug(tl.loc('CorrelationIdForARM', httpResponse.headers[CorrelationIdInResponse]));
}
} catch(exception) {
let exceptionString: string = exception.toString();
if(exceptionString.indexOf("Hostname/IP doesn't match certificates's altnames") != -1
Expand Down
7 changes: 6 additions & 1 deletion Tasks/Common/azure-arm-rest/AzureServiceClient.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import tl = require('vsts-task-lib/task');
import util = require("util")
import msRestAzure = require("./azure-arm-common");
import webClient = require("./webClient");

const CorrelationIdInResponse = "x-ms-correlation-request-id";

export class ApiResult {
public error;
public result;
Expand Down Expand Up @@ -133,6 +134,10 @@ export class ServiceClient {
request.headers["Authorization"] = "Bearer " + token;
httpResponse = await webClient.sendRequest(request);
}

if(!!httpResponse.headers[CorrelationIdInResponse]) {
tl.debug(tl.loc('CorrelationIdForARM', httpResponse.headers[CorrelationIdInResponse]));
}
} catch(exception) {
let exceptionString: string = exception.toString();
if(exceptionString.indexOf("Hostname/IP doesn't match certificates's altnames") != -1
Expand Down
2 changes: 1 addition & 1 deletion Tasks/ContainerBuildV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 161,
"Patch": 0
"Patch": 1
},
"demands": [],
"satisfies": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/ContainerBuildV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 161,
"Patch": 0
"Patch": 1
},
"demands": [],
"satisfies": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/HelmDeployV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 162,
"Patch": 1
"Patch": 2
},
"demands": [],
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/HelmDeployV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 162,
"Patch": 1
"Patch": 2
},
"demands": [],
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PackerBuildV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 1,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/PackerBuildV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 1,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"demands": [],
"minimumAgentVersion": "2.0.0",
Expand Down