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

increasing retry #8983

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"loc.messages.WindowMysqlClientMissingError": "MySQL client is missing on the Windows agent machine. Please install it by running the MySQL client installer 'https://aka.ms/window-mysqlcli-installer' script file on the agent machine.",
"loc.messages.LinuxMysqlClientMissingError": "MySQL client is missing on the Linux agent machine. Please install it by running 'sudo apt-get install mysql-client'.",
"loc.messages.CouldNotFetchAccessTokenforAzureStatusCode": "Could not retrieve an access token for Azure. Status code: %s. Status message: %s",
"loc.messages.CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode": "Could not retrieve an access token for the managed service principal. Please configure Managed Service Identity (MSI) for the virtual machine. See 'https://aka.ms/azure-msi-docs'. Status code: %s. Status message: %s",
"loc.messages.CouldNotFetchAccessTokenforMSIStatusCode": "Could not retrieve an access token for the managed service principal. Status code: %s. Status message: %s"
"loc.messages.CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode": "Could not retrieve an access token for the managed service principal. Please configure Managed Service Identity (MSI) for the virtual machine. See 'https://aka.ms/azure-msi-docs'.Assign role to created MSI Identity. See 'https://aka.ms/assign-role-msi'. Status code: %s. Status message: %s",
"loc.messages.CouldNotFetchAccessTokenforMSIStatusCode": "Could not retrieve an access token for the managed service principal. Status code: %s. Status message: %s",
"loc.messages.NotAbleToCreateFirewallRule": "Getting error during adding firewall rule to azure mysql server. Error: %s"
}
7 changes: 4 additions & 3 deletions Tasks/AzureMysqlDeploymentV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 12
"Patch": 13
},
"demands": [],
"minimumAgentVersion": "1.100.0",
Expand Down Expand Up @@ -220,7 +220,8 @@
"WindowMysqlClientMissingError": "MySQL client is missing on the Windows agent machine. Please install it by running the MySQL client installer 'https://aka.ms/window-mysqlcli-installer' script file on the agent machine.",
"LinuxMysqlClientMissingError": "MySQL client is missing on the Linux agent machine. Please install it by running 'sudo apt-get install mysql-client'.",
"CouldNotFetchAccessTokenforAzureStatusCode": "Could not retrieve an access token for Azure. Status code: %s. Status message: %s",
"CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode": "Could not retrieve an access token for the managed service principal. Please configure Managed Service Identity (MSI) for the virtual machine. See 'https://aka.ms/azure-msi-docs'. Status code: %s. Status message: %s",
"CouldNotFetchAccessTokenforMSIStatusCode": "Could not retrieve an access token for the managed service principal. Status code: %s. Status message: %s"
"CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode": "Could not retrieve an access token for the managed service principal. Please configure Managed Service Identity (MSI) for the virtual machine. See 'https://aka.ms/azure-msi-docs'.Assign role to created MSI Identity. See 'https://aka.ms/assign-role-msi'. Status code: %s. Status message: %s",
"CouldNotFetchAccessTokenforMSIStatusCode": "Could not retrieve an access token for the managed service principal. Status code: %s. Status message: %s",
"NotAbleToCreateFirewallRule": "Getting error during adding firewall rule to azure mysql server. Error: %s"
}
}
5 changes: 3 additions & 2 deletions Tasks/AzureMysqlDeploymentV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 12
"Patch": 13
},
"demands": [],
"minimumAgentVersion": "1.100.0",
Expand Down Expand Up @@ -221,6 +221,7 @@
"LinuxMysqlClientMissingError": "ms-resource:loc.messages.LinuxMysqlClientMissingError",
"CouldNotFetchAccessTokenforAzureStatusCode": "ms-resource:loc.messages.CouldNotFetchAccessTokenforAzureStatusCode",
"CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode": "ms-resource:loc.messages.CouldNotFetchAccessTokenforMSIDueToMSINotConfiguredProperlyStatusCode",
"CouldNotFetchAccessTokenforMSIStatusCode": "ms-resource:loc.messages.CouldNotFetchAccessTokenforMSIStatusCode"
"CouldNotFetchAccessTokenforMSIStatusCode": "ms-resource:loc.messages.CouldNotFetchAccessTokenforMSIStatusCode",
"NotAbleToCreateFirewallRule": "ms-resource:loc.messages.NotAbleToCreateFirewallRule"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,6 @@
"loc.messages.ASE_SSLIssueRecommendation": "To use a certificate in App Service, the certificate must be signed by a trusted certificate authority. If your web app gives you certificate validation errors, you're probably using a self-signed certificate and to resolve them you need to set a variable named VSTS_ARM_REST_IGNORE_SSL_ERRORS to the value true in the build or release definition",
"loc.messages.FailedToGetAzureMetricAlerts": "Failed to get Azure metric alerts: %s. Error: %s",
"loc.messages.FailedToUpdateAzureMetricAlerts": "Failed to update Azure metric alert rule '%s' Resource. Error: %s",
"loc.messages.ResponseNotValid": "Response is not in a valid format"
"loc.messages.ResponseNotValid": "Response is not in a valid format",
"loc.messages.NotAbleToCreateFirewallRule": "Getting error during adding firewall rule to azure mysql server. Error: %s"
}
2 changes: 1 addition & 1 deletion Tasks/Common/azure-arm-rest/azure-arm-mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class FirewallRules {
deferred.reject(new azureServiceClient.ApiResult(azureServiceClient.ToError(response)));
}
else if(statusCode === 202){
this._recursiveGetCall(resourceGroupName, serverName, firewallRuleName, 3, 0).then((response) => {
this._recursiveGetCall(resourceGroupName, serverName, firewallRuleName, 5, 0).then((response) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of making it a constant. Can we make it a secondary variable so that user can customize the time, he need to retry?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can also help in checking the L2 by changing the variable in RD json.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good idea but no customer has reported any issue due to this . Once they will ask We will add this one .

deferred.resolve(new azureServiceClient.ApiResult(null, response));
},(error) => {
deferred.reject(error);
Expand Down
3 changes: 2 additions & 1 deletion Tasks/Common/azure-arm-rest/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
"ASE_SSLIssueRecommendation": "To use a certificate in App Service, the certificate must be signed by a trusted certificate authority. If your web app gives you certificate validation errors, you're probably using a self-signed certificate and to resolve them you need to set a variable named VSTS_ARM_REST_IGNORE_SSL_ERRORS to the value true in the build or release definition",
"FailedToGetAzureMetricAlerts": "Failed to get Azure metric alerts: %s. Error: %s",
"FailedToUpdateAzureMetricAlerts": "Failed to update Azure metric alert rule '%s' Resource. Error: %s",
"ResponseNotValid": "Response is not in a valid format"
"ResponseNotValid": "Response is not in a valid format",
"NotAbleToCreateFirewallRule": "Getting error during adding firewall rule to azure mysql server. Error: %s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: change azure to Azure. Please verify the help string with PM once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}
}