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

function app failure fix #14251

Merged
merged 10 commits into from
Jan 27, 2021
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": 170,
"Patch": 2
"Minor": 182,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
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": 170,
"Patch": 2
"Minor": 182,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
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": 163,
"Patch": 7
"Minor": 182,
"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": 163,
"Patch": 7
"Minor": 182,
"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 @@ -17,7 +17,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 181,
"Minor": 182,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
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 @@ -17,7 +17,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 181,
"Minor": 182,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
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": 178,
"Patch": 1
"Minor": 182,
"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": 178,
"Patch": 1
"Minor": 182,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureWebAppV1/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": 168,
"Patch": 3
"Minor": 182,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureWebAppV1/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": 168,
"Patch": 3
"Minor": 182,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,12 @@ export class Kudu {
httpRequest.method = 'POST';
httpRequest.uri = this._client.getRequestUri(`/api/zipdeploy`, queryParameters);
httpRequest.body = fs.createReadStream(webPackage);
let requestOptions = new webClient.WebRequestOptions();
requestOptions.retriableStatusCodes = [500, 502, 503, 504];
requestOptions.retryIntervalInSeconds = 5;

try {
let response = await this._client.beginRequest(httpRequest, null, 'application/octet-stream');
let response = await this._client.beginRequest(httpRequest, requestOptions, 'application/octet-stream');
AmrutaKawade marked this conversation as resolved.
Show resolved Hide resolved
tl.debug(`ZIP Deploy response: ${JSON.stringify(response)}`);
if(response.statusCode == 200) {
tl.debug('Deployment passed');
Expand Down Expand Up @@ -633,16 +636,16 @@ export class Kudu {
}

private _getFormattedError(error: any) {
if(error && error.statusCode) {
return `${error.statusMessage} (CODE: ${error.statusCode})`;
}
else if(error && error.message) {
if(error && error.message) {
if(error.statusCode) {
error.message = `${typeof error.message.valueOf() == 'string' ? error.message : error.message.Code + " - " + error.message.Message } (CODE: ${error.statusCode})`
}

return error.message;
}
else if(error && error.statusCode) {
return `${error.statusMessage} (CODE: ${error.statusCode})`;
}

return error;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export class KuduServiceUtility {
console.log(tl.loc('PackageDeploymentInitiated'));

let queryParameters: Array<string> = [
'isAsync=true',
AmrutaKawade marked this conversation as resolved.
Show resolved Hide resolved
'deployer=' + VSTS_DEPLOY
];
var deploymentMessage = this._getUpdateHistoryRequest(null, null, customMessage).message;
Expand Down