From 6d663eea554eaad70e060ba3f7195030d0547156 Mon Sep 17 00:00:00 2001 From: himanshu yadav Date: Wed, 10 Jul 2019 22:22:53 +0530 Subject: [PATCH] Added retry if fetching token for SPN auth fails with status code 403 (#10447) * added 403 status code for retry * Update all dependent tasks version --- Tasks/AzureResourceGroupDeploymentV2/task.json | 2 +- Tasks/AzureResourceGroupDeploymentV2/task.loc.json | 2 +- Tasks/AzureRmWebAppDeploymentV3/task.json | 2 +- Tasks/AzureRmWebAppDeploymentV3/task.loc.json | 2 +- Tasks/AzureVmssDeploymentV0/task.json | 2 +- Tasks/AzureVmssDeploymentV0/task.loc.json | 2 +- Tasks/Common/azure-arm-rest/azure-arm-common.ts | 4 ++-- Tasks/JavaToolInstallerV0/task.json | 2 +- Tasks/JavaToolInstallerV0/task.loc.json | 2 +- Tasks/JenkinsDownloadArtifactsV1/task.json | 2 +- Tasks/JenkinsDownloadArtifactsV1/task.loc.json | 2 +- Tasks/PackerBuildV0/task.json | 2 +- Tasks/PackerBuildV0/task.loc.json | 2 +- Tasks/PackerBuildV1/task.json | 2 +- Tasks/PackerBuildV1/task.loc.json | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Tasks/AzureResourceGroupDeploymentV2/task.json b/Tasks/AzureResourceGroupDeploymentV2/task.json index 4049329526fb..10538527de12 100644 --- a/Tasks/AzureResourceGroupDeploymentV2/task.json +++ b/Tasks/AzureResourceGroupDeploymentV2/task.json @@ -15,7 +15,7 @@ "version": { "Major": 2, "Minor": 152, - "Patch": 3 + "Patch": 4 }, "demands": [], "minimumAgentVersion": "2.119.1", diff --git a/Tasks/AzureResourceGroupDeploymentV2/task.loc.json b/Tasks/AzureResourceGroupDeploymentV2/task.loc.json index b002c0acacbd..2287ded0b014 100644 --- a/Tasks/AzureResourceGroupDeploymentV2/task.loc.json +++ b/Tasks/AzureResourceGroupDeploymentV2/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 2, "Minor": 152, - "Patch": 3 + "Patch": 4 }, "demands": [], "minimumAgentVersion": "2.119.1", diff --git a/Tasks/AzureRmWebAppDeploymentV3/task.json b/Tasks/AzureRmWebAppDeploymentV3/task.json index 4dbae18f381d..6728c3eff441 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/task.json +++ b/Tasks/AzureRmWebAppDeploymentV3/task.json @@ -18,7 +18,7 @@ "version": { "Major": 3, "Minor": 4, - "Patch": 30 + "Patch": 31 }, "releaseNotes": "What's new in Version 3.0:
  Supports File Transformations (XDT)
  Supports Variable Substitutions(XML, JSON)
Click [here](https://aka.ms/azurermwebdeployreadme) for more information.", "minimumAgentVersion": "2.104.1", diff --git a/Tasks/AzureRmWebAppDeploymentV3/task.loc.json b/Tasks/AzureRmWebAppDeploymentV3/task.loc.json index dde7ac926614..8937472a251a 100644 --- a/Tasks/AzureRmWebAppDeploymentV3/task.loc.json +++ b/Tasks/AzureRmWebAppDeploymentV3/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 3, "Minor": 4, - "Patch": 30 + "Patch": 31 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.104.1", diff --git a/Tasks/AzureVmssDeploymentV0/task.json b/Tasks/AzureVmssDeploymentV0/task.json index 073c577515d0..7fe284c0e17d 100644 --- a/Tasks/AzureVmssDeploymentV0/task.json +++ b/Tasks/AzureVmssDeploymentV0/task.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 34 + "Patch": 35 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/AzureVmssDeploymentV0/task.loc.json b/Tasks/AzureVmssDeploymentV0/task.loc.json index 755dc392d8ac..c3b44f8f3d43 100644 --- a/Tasks/AzureVmssDeploymentV0/task.loc.json +++ b/Tasks/AzureVmssDeploymentV0/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 34 + "Patch": 35 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/Common/azure-arm-rest/azure-arm-common.ts b/Tasks/Common/azure-arm-rest/azure-arm-common.ts index d839cb103eff..06b15ee97868 100644 --- a/Tasks/Common/azure-arm-rest/azure-arm-common.ts +++ b/Tasks/Common/azure-arm-rest/azure-arm-common.ts @@ -221,7 +221,7 @@ export class ApplicationTokenCredentials { let webRequestOptions: webClient.WebRequestOptions = { retriableErrorCodes: null, - retriableStatusCodes: [400, 408, 409, 500, 502, 503, 504], + retriableStatusCodes: [400, 403, 408, 409, 500, 502, 503, 504], retryCount: null, retryIntervalInSeconds: null }; @@ -300,4 +300,4 @@ function getJWT(url: string, clientId: string, tenantId: string, pemFilePath: st var token = jwt.sign(jwtObject, pemFileContent,{ algorithm: 'RS256', header :additionalHeaders }); return token; -} \ No newline at end of file +} diff --git a/Tasks/JavaToolInstallerV0/task.json b/Tasks/JavaToolInstallerV0/task.json index 7871ee10a80f..7127a2a5fc9d 100644 --- a/Tasks/JavaToolInstallerV0/task.json +++ b/Tasks/JavaToolInstallerV0/task.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 151, - "Patch": 3 + "Patch": 4 }, "satisfies": [ "Java" diff --git a/Tasks/JavaToolInstallerV0/task.loc.json b/Tasks/JavaToolInstallerV0/task.loc.json index f435a5279568..025cebb04a8f 100644 --- a/Tasks/JavaToolInstallerV0/task.loc.json +++ b/Tasks/JavaToolInstallerV0/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 151, - "Patch": 3 + "Patch": 4 }, "satisfies": [ "Java" diff --git a/Tasks/JenkinsDownloadArtifactsV1/task.json b/Tasks/JenkinsDownloadArtifactsV1/task.json index 8e7f263e84ba..42f0a568ea28 100644 --- a/Tasks/JenkinsDownloadArtifactsV1/task.json +++ b/Tasks/JenkinsDownloadArtifactsV1/task.json @@ -19,7 +19,7 @@ "version": { "Major": 1, "Minor": 155, - "Patch": 0 + "Patch": 1 }, "groups": [ { diff --git a/Tasks/JenkinsDownloadArtifactsV1/task.loc.json b/Tasks/JenkinsDownloadArtifactsV1/task.loc.json index 51b3496efb59..57383b7cd4c8 100644 --- a/Tasks/JenkinsDownloadArtifactsV1/task.loc.json +++ b/Tasks/JenkinsDownloadArtifactsV1/task.loc.json @@ -19,7 +19,7 @@ "version": { "Major": 1, "Minor": 155, - "Patch": 0 + "Patch": 1 }, "groups": [ { diff --git a/Tasks/PackerBuildV0/task.json b/Tasks/PackerBuildV0/task.json index dca0bf421a63..e8e6733fe748 100644 --- a/Tasks/PackerBuildV0/task.json +++ b/Tasks/PackerBuildV0/task.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 26 + "Patch": 27 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/PackerBuildV0/task.loc.json b/Tasks/PackerBuildV0/task.loc.json index 076a044083ab..43348890c644 100644 --- a/Tasks/PackerBuildV0/task.loc.json +++ b/Tasks/PackerBuildV0/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 26 + "Patch": 27 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/PackerBuildV1/task.json b/Tasks/PackerBuildV1/task.json index 2f6b6c1460c1..c60eebbb1b36 100644 --- a/Tasks/PackerBuildV1/task.json +++ b/Tasks/PackerBuildV1/task.json @@ -15,7 +15,7 @@ "version": { "Major": 1, "Minor": 0, - "Patch": 13 + "Patch": 14 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/PackerBuildV1/task.loc.json b/Tasks/PackerBuildV1/task.loc.json index 00ed245c4a75..b4a97cb30571 100644 --- a/Tasks/PackerBuildV1/task.loc.json +++ b/Tasks/PackerBuildV1/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 1, "Minor": 0, - "Patch": 13 + "Patch": 14 }, "demands": [], "minimumAgentVersion": "2.0.0",