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

Use WebSite_Enable_sync_update_site value along with App settings update to avoid polling #10973

Merged
merged 14 commits into from
Jul 26, 2019
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": 55
"Patch": 56
},
"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": 55
"Patch": 56
},
"minimumAgentVersion": "1.102.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
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": 3
"Patch": 4
},
"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": 3
"Patch": 4
},
"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": 3
"Patch": 4
},
"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": 3
"Patch": 4
},
"preview": true,
"demands": [
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": 0
"Patch": 1
},
"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": 0
"Patch": 1
},
"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": 3,
"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": 3,
"Patch": 2
"Patch": 3
},
"minimumAgentVersion": "2.111.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureMysqlDeploymentV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 156,
"Patch": 1
"Patch": 2
},
"demands": [],
"minimumAgentVersion": "1.100.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureMysqlDeploymentV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 156,
"Patch": 1
"Patch": 2
},
"demands": [],
"minimumAgentVersion": "1.100.0",
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": 154,
"Patch": 4
"Patch": 5
},
"preview": true,
"releaseNotes": "Added support for Az Module and cross platform agents.",
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": 154,
"Patch": 4
"Patch": 5
},
"preview": true,
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,38 +173,6 @@ export class AzureAppServiceUtility {
return isNewValueUpdated;
}

var kuduService = await this.getKuduService();
var noOftimesToIterate: number = 12;
tl.debug('retrieving values from Kudu service to check if new values are updated');
while(noOftimesToIterate > 0) {
var kuduServiceAppSettings = await kuduService.getAppSettings();
var propertiesChanged: boolean = true;
for(var property in addProperties) {
if(kuduServiceAppSettings[property] != addProperties[property]) {
tl.debug('New properties are not updated in Kudu service :(');
propertiesChanged = false;
break;
}
}
for(var property in deleteProperties) {
if(kuduServiceAppSettings[property]) {
tl.debug('Deleted properties are not reflected in Kudu service :(');
propertiesChanged = false;
break;
}
}

if(propertiesChanged) {
tl.debug('New properties are updated in Kudu service.');
console.log(tl.loc('UpdatedAppServiceApplicationSettings'));
return isNewValueUpdated;
}

noOftimesToIterate -= 1;
await webClient.sleepFor(5);
}

tl.debug('Timing out from app settings check');
return isNewValueUpdated;
}

Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureRmWebAppDeploymentV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 4,
"Minor": 156,
"Patch": 2
"Patch": 3
},
"releaseNotes": "What's new in version 4.*<br />Supports Zip Deploy, Run From Package, War Deploy [Details here](https://aka.ms/appServiceDeploymentMethods)<br />Supports App Service Environments<br />Improved UI for discovering different App service types supported by the task<br/>Run From Package is the preferred deployment method, which makes files in wwwroot folder read-only<br/>Click [here](https://aka.ms/azurermwebdeployreadme) for more information.",
"minimumAgentVersion": "2.104.1",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureRmWebAppDeploymentV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 4,
"Minor": 156,
"Patch": 2
"Patch": 3
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"minimumAgentVersion": "2.104.1",
Expand Down
1 change: 1 addition & 0 deletions Tasks/Common/azure-arm-rest-v2/azure-arm-app-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export class AzureAppService {
}

if(isNewValueUpdated) {
applicationSettings.properties["WEBSITE_ENABLE_SYNC_UPDATE_SITE"] = 'true';
eaarora-ms marked this conversation as resolved.
Show resolved Hide resolved
await this.updateApplicationSettings(applicationSettings);
}

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": 156,
"Patch": 0
"Patch": 1
},
"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": 156,
"Patch": 0
"Patch": 1
},
"demands": [],
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/KubernetesV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 155,
"Patch": 3
"Patch": 4
},
"demands": [],
"releaseNotes": "What's new in Version 1.0:<br/>&nbsp;Added new service connection type input for easy selection of Azure AKS cluster.<br/>&nbsp;Replaced output variable input with output variables section that we had added in all tasks.",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/KubernetesV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 155,
"Patch": 3
"Patch": 4
},
"demands": [],
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down